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

Last change on this file since 31838 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
RevLine 
[16575]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
[19520]31DEBUG = 0
[16575]32DLL = 0
33DLLDEBUG = 0
34
[22140]35# tar file is "$(XLHTML_DIR)-gs.tar.gz
[22154]36XLHTML_DIR = packages\xlhtml\xlhtml-0.4.9.0
[22140]37
[16575]38MDEFINES = /f win32.mak
39
[20873]40INSTALLDIRS = src\hashfile src\phind\generate
41JAVADIR = src\java\org\nzdl\gsdl
[16575]42
43MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)"
44
45!IF $(GSDL_VC4)
46MAKECMD = $(MAKECMD) GSDL_VC4=1
47!ENDIF
[19520]48!IF $(DEBUG)
49MAKECMD = $(MAKECMD) DEBUG=1
50!ENDIF
[16575]51!IF $(DLL)
52MAKECMD = $(MAKECMD) DLL=1
53!ENDIF
54!IF $(DLLDEBUG)
55MAKECMD = $(MAKECMD) DLLDEBUG=1
56!ENDIF
57
[18176]58MAKECLEANCMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" clean
[16575]59
[22140]60all: win32.mak xlppt $(INSTALLDIRS) $(JAVADIR)
[16575]61
[22140]62install: win32.mak xlppt $(INSTALLDIRS)
[16575]63
[22140]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
[16575]74clean:
[16577]75 cd "$(BUILDHOME)"
[16575]76 cd src\phind\generate
77 $(MAKECLEANCMD)
[16577]78 cd "$(BUILDHOME)"
[16575]79 cd src\hashfile
80 $(MAKECLEANCMD)
[23664]81!IF EXIST ("$(XLHTML_DIR)")
[20873]82 cd "$(BUILDHOME)"
[22140]83 cd "$(XLHTML_DIR)"
84 $(MAKECLEANCMD)
[23664]85!ENDIF
[22140]86 cd "$(BUILDHOME)
[20873]87 cd src\java\org\nzdl\gsdl
88 call winMake.bat clean
[16575]89 cd "$(GSDLHOME)"
90
91$(INSTALLDIRS): FORCE
[16577]92 cd "$(BUILDHOME)"
[16575]93 cd "$@"
94 $(MAKECMD)
95 $(MAKECMD) install
96 cd "$(GSDLHOME)"
97
[20873]98$(JAVADIR): FORCE
99 cd "$(BUILDHOME)"
100 cd "$@"
101 call winMake.bat all
102 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
[20878]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
[20873]105
106
107
[16575]108FORCE:
109
Note: See TracBrowser for help on using the repository browser.