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

Last change on this file since 31960 was 31936, checked in by ak19, 7 years ago

Windows still needs to copy wgetrc-gs.in template file into bin\windows

File size: 3.4 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 wgetcfg $(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
74# Independent target for installing wget config file into final location
75wgetcfg:
76 IF NOT EXIST "$(GSDLHOME)\bin\windows\wgetrc" copy "$(BUILDHOME)\packages\wget\wgetrc-gs.in" "$(GSDLHOME)\bin\windows\wgetrc"
77
78clean:
79 cd "$(BUILDHOME)"
80 cd src\phind\generate
81 $(MAKECLEANCMD)
82 cd "$(BUILDHOME)"
83 cd src\hashfile
84 $(MAKECLEANCMD)
85!IF EXIST ("$(XLHTML_DIR)")
86 cd "$(BUILDHOME)"
87 cd "$(XLHTML_DIR)"
88 $(MAKECLEANCMD)
89!ENDIF
90 cd "$(BUILDHOME)
91 cd src\java\org\nzdl\gsdl
92 call winMake.bat clean
93 cd "$(GSDLHOME)"
94
95$(INSTALLDIRS): FORCE
96 cd "$(BUILDHOME)"
97 cd "$@"
98 $(MAKECMD)
99 $(MAKECMD) install
100 cd "$(GSDLHOME)"
101
102$(JAVADIR): FORCE
103 cd "$(BUILDHOME)"
104 cd "$@"
105 call winMake.bat all
106 if NOT EXIST "$(GSDLHOME)\bin\java" mkdir "$(GSDLHOME)\bin\java"
107 if EXIST "$(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar" copy "$(BUILDHOME)\$(JAVADIR)\ApplyXSLT.jar" "$(GSDLHOME)\bin\java"
108 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
109
110
111
112FORCE:
113
Note: See TracBrowser for help on using the repository browser.