source: main/trunk/greenstone2/common-src/src/jdbmedit/winMake.bat@ 22124

Last change on this file since 22124 was 22090, checked in by ak19, 14 years ago

Windows makefiles to work with USE_GDBM and USE_JDBM: 1. Added winMake.bat to both gs-jdbm-1.0.tar.gz and common-src's jdbmedit so that jdbm java files can now get compiled up. 2. These new winMake bat files are then called from the updated windows makefiles in common-src and common-src's src-lib folder. 3. Changed win32.mak files to work with USE_GDBM and USE_JDBM: these set their USE_DBDEFINES flag when on to prevent memory errors due to makefiles' inconsistent setting of USE_DEFINES between folders. Also certain gdbm related lib, includes and dir statements are moved out of the general part of the windows makefiles into the USE_GDBM section of the makefiles.

File size: 1.5 KB
Line 
1@echo off
2setlocal
3
4set GSDL_DIR=..\..\..
5echo GSDL_DIR is %GSDL_DIR%
6
7set OBJECTS=JdbmAPI.class Jdb2Txt.class Txt2Jdb.class JdbGet.class JdbSet.class JdbDel.class JdbKeys.class
8
9echo %OBJECTS%
10
11set JDBM_JAR=..\..\packages\jdbm\jdbm-1.0\dist\jdbm-1.0.jar
12
13rem ---- Where to put class files ----
14set JDBMHOME=.
15
16rem ---- Name and location of java programs ----
17set JAVAC="%JAVA_HOME%\bin\javac"
18set JAVAH="%JAVA_HOME%\bin\javah"
19set JAVA="%JAVA_HOME%\bin\java"
20set JAVADOC="%JAVA_HOME%\bin\javadoc"
21set JAR="%JAVA_HOME%\bin\jar"
22
23set JAVACOPTIONS=-deprecation -g -O
24
25
26if "%DEBUG%" == "" (
27 set MAKE_VARS=DEBUG=0
28) else (
29 set MAKE_VARS=DEBUG=%DEBUG%
30)
31
32if ""%1"" == """" goto all
33if ""%1"" == ""all"" goto all
34if ""%1"" == ""install"" goto install
35if ""%1"" == ""clean"" goto clean
36
37:unknown
38 echo Error: Unrecognized argument %1.
39 goto done
40
41:all
42 for %%G in (*.java) DO %JAVAC% -classpath %JDBM_JAR%;. "%%G"
43 %JAR% cvf JDBMWrapper.jar %OBJECTS%
44 @echo Done
45 goto done
46
47:install
48 copy JDBMWrapper.jar "%GSDL_DIR%\bin\java"
49 goto done
50
51:clean
52 for /f %%G in (*.class test.lg test.jdb) if exist %%G del /q %%G
53 if exist JDBMWrapper.jar del JDBMWrapper.jar
54 goto done
55
56:test-api
57 %JAVA% -classpath %JDBM_JAR%:JDBMWrapper.jar JdbmAPI test
58 goto done
59
60:done
61:: http://ss64.com/nt/endlocal.html
62:: If SETLOCAL is used without a corresponding ENDLOCAL then local
63:: environment variables will be discarded when the batch file ends.
Note: See TracBrowser for help on using the repository browser.