source: main/trunk/greenstone2/build-src/win32.mak@ 31162

Last change on this file since 31162 was 23664, checked in by ak19, 13 years ago

Need to check that the xlhtml dir is there before trying to make clean on its contents. Discovered this only when trying to clean the GS install of a binary to which the source component had just been added.

File size: 3.2 KB
Line 
1###########################################################################
2#
3# win32 makefile -- gsdl
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999 The New Zealand Digital Library Project
9#
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27GSDLHOME = $(GSDLHOME)
28BUILDHOME = $(MAKEDIR)
29
30GSDL_VC4 = 0
31DEBUG = 0
32DLL = 0
33DLLDEBUG = 0
34
35# tar file is "$(XLHTML_DIR)-gs.tar.gz
36XLHTML_DIR = packages\xlhtml\xlhtml-0.4.9.0
37
38MDEFINES = /f win32.mak
39
40INSTALLDIRS = src\hashfile src\phind\generate
41JAVADIR = src\java\org\nzdl\gsdl
42
43MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)"
44
45!IF $(GSDL_VC4)
46MAKECMD = $(MAKECMD) GSDL_VC4=1
47!ENDIF
48!IF $(DEBUG)
49MAKECMD = $(MAKECMD) DEBUG=1
50!ENDIF
51!IF $(DLL)
52MAKECMD = $(MAKECMD) DLL=1
53!ENDIF
54!IF $(DLLDEBUG)
55MAKECMD = $(MAKECMD) DLLDEBUG=1
56!ENDIF
57
58MAKECLEANCMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" clean
59
60all: win32.mak xlppt $(INSTALLDIRS) $(JAVADIR)
61
62install: win32.mak xlppt $(INSTALLDIRS)
63
64# Independent target for compiling xlhtml and ppthtml
65xlppt:
66 IF NOT EXIST $(XLHTML_DIR) IF EXIST "$(GSDLHOME)\bin\windows\gunzip.exe" IF EXIST "$(GSDLHOME)\bin\windows\tar.exe" "$(GSDLHOME)\bin\windows\gunzip.exe" -cd "$(XLHTML_DIR)-gs.tar.gz" | "$(GSDLHOME)\bin\windows\tar.exe" xv --directory=./packages/xlhtml
67 @IF NOT EXIST $(XLHTML_DIR) echo ****** Couldn't extract archive $(XLHTML_DIR).tar.gz. Extract it manually, or check that gunzip.exe and tar.exe exist in GSDLHOME\bin\windows. ******
68 @IF NOT EXIST $(XLHTML_DIR) exit /b 1
69 cd "$(XLHTML_DIR)"
70 $(MAKECMD)
71 $(MAKECMD) install
72 cd "$(BUILDHOME)"
73
74clean:
75 cd "$(BUILDHOME)"
76 cd src\phind\generate
77 $(MAKECLEANCMD)
78 cd "$(BUILDHOME)"
79 cd src\hashfile
80 $(MAKECLEANCMD)
81!IF EXIST ("$(XLHTML_DIR)")
82 cd "$(BUILDHOME)"
83 cd "$(XLHTML_DIR)"
84 $(MAKECLEANCMD)
85!ENDIF
86 cd "$(BUILDHOME)
87 cd src\java\org\nzdl\gsdl
88 call winMake.bat clean
89 cd "$(GSDLHOME)"
90
91$(INSTALLDIRS): FORCE
92 cd "$(BUILDHOME)"
93 cd "$@"
94 $(MAKECMD)
95 $(MAKECMD) install
96 cd "$(GSDLHOME)"
97
98$(JAVADIR): FORCE
99 cd "$(BUILDHOME)"
100 cd "$@"
101 call winMake.bat all
102 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
103 if EXIST "$(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar" copy "$(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar" "$(GSDLHOME)\bin\java"
104 if NOT EXIST "$(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar" echo Warning: Failed to find $(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar. Greenstone will not be able to use XSLT files during building
105
106
107
108FORCE:
109
Note: See TracBrowser for help on using the repository browser.