Annotation of kupu/make.bat, revision 1.1.1.1
1.1 dwinter 1: @echo off
2: if cmdextversion 2 goto :cmdok
3: echo Sorry, this batch file requires a more recent version of Windows.
4: goto :eof
5:
6: :cmdok
7: setlocal
8: setlocal enabledelayedexpansion
9:
10: call :searchpath xsltproc.exe
11: if errorlevel 1 goto :eof
12: set XSLTPROC=%RES%
13:
14: set NOOP=
15: set DEBUG=
16: set TRACE=
17: :getopt
18: if /I "%1" EQU "/n" set NOOP=1 && shift /1 && goto :getopt
19: if /I "%1" EQU "-n" set NOOP=1 && shift /1 && goto :getopt
20: if /I "%1" EQU "/d" set DEBUG=1 && shift /1 && goto :getopt
21: if /I "%1" EQU "-d" set DEBUG=1 && shift /1 && goto :getopt
22: if /I "%1" EQU "/t" set TRACE=1 && shift /1 && goto :getopt
23: if /I "%1" EQU "-t" set TRACE=1 && shift /1 && goto :getopt
24:
25: if DEFINED NOOP (
26: SET X=echo+
27: ) ELSE (
28: SET X=
29: )
30:
31: set XSL_DEBUG=--param debug true^^^(^^^)
32: set XSLTPROC_PARAMS=--nonet --novalid --xinclude
33: set XSL_FILE=make.xsl
34: if DEFINED DEBUG set XSLTPROC_PARAMS=%XSLTPROC_PARAMS% %XSL_DEBUG%
35: if DEFINED TRACE set XSLTPROC_PARAMS=%XSLTPROC_PARAMS% --load-trace
36: set TARGET_OK=
37: set TARGETS=
38: for /F "delims=:_ tokens=1,2" %%L in (%~sf0) DO (
39: if "%%L" EQU "target" (
40: set TARGETS=!TARGETS! %%M
41: if /I "%%M" EQU "%1" set TARGET_OK=yes
42: )
43: )
44: if "%TARGET_OK%"=="" goto :usage
45: goto :target_%1
46: :usage
47: echo Usage: make [-n][-d][-t] target
48: echo where target is one of %TARGETS%
49: echo -n (or /n) Display but don't execute commands
50: echo -d (or /d) Include XML comments in output files.
51: echo -t (or /t) Show XML files as they are loaded
52: goto :eof
53:
54: :target_kupu.html
55: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o common\kupu.html %XSL_FILE% dist.kupu
56: goto :eof
57:
58: :target_zope2macros
59: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o common\kupumacros.html %XSL_FILE% dist-zope2.kupu
60: goto :eof
61:
62: :target_kupuform.html:
63: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o common\kupuform.html %XSL_FILE% dist-form.kupu
64: goto :eof
65:
66: :target_kupumulti.html:
67: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o common\kupumulti.html %XSL_FILE% dist-multi.kupu
68: goto :eof
69:
70: :target_kupucnf.html:
71: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o common\kupucnf.html %XSL_FILE% dist-cnf.kupu
72: goto :eof
73:
74: :target_plonemacros
75: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o plone\kupu_plone_layer\kupu_wysiwyg_support.html %XSL_FILE% dist-plone.kupu
76: goto :eof
77:
78: :target_silvamacros
79: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o silva\kupumacros.html %XSL_FILE% dist-silva.kupu
80: goto :eof
81:
82: :target_lenyamacros
83: %X%%XSLTPROC% %XSLTPROC_PARAMS% -o apache-lenya\kupu\kupumacros.html %XSL_FILE% dist-apache-lenya.kupu
84: goto :eof
85:
86: :target_
87: :target_all
88: call :target_clean
89: call :target_kupu.html
90: call :target_kupuform.html
91: call :target_kupumulti.html
92: call :target_zope2macros
93: call :target_plonemacros
94: call :target_silvamacros
95: call :target_lenyamacros
96: call :target_kupucnf.html
97: goto :eof
98:
99: :target_clean
100: SET FILES=common\kupumacros.html common\kupu.html common\kupuform.html
101: SET FILES=%FILES% plone\kupu_plone_layer\kupu_wysiwyg_support.html silva\kupumacros.html
102: SET FILES=%FILES% apache-lenya\kupu\kupumacros.html
103: SET FILES=%FILES% common\kupumulti.html common\kupucnf.html
104: for %%F in (%FILES%) DO (
105: IF EXIST %%F ( %X%echo del %%F && %X%del %%F )
106: )
107: goto :eof
108:
109: :searchpath
110: REM Search the path for the specified file. Also, for added
111: REM friendliness, we extend the path with a few other 'potential'
112: REM directories.
113: SET PATHX=%PATH%;C:\libxslt;c:\Program Files\libxml\util
114: set RES=%~s$PATHX:1
115: if not errorlevel 1 goto :eof
116: echo File %1 was not found in the PATH environment
117: goto :eof
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>