|
| 1 | +@echo off |
| 2 | +REM Adjust path for your docbook installation |
| 3 | +SET ROOT=c:\prog\pgsql\docbook |
| 4 | + |
| 5 | +SETLOCAL |
| 6 | +SET STARTDIR=%CD% |
| 7 | +SET OPENJADE=openjade-1.3.1 |
| 8 | +SET DSSSL=docbook-dsssl-1.79 |
| 9 | + |
| 10 | +IF EXIST ..\msvc IF EXIST ..\..\..\src cd ..\..\.. |
| 11 | +IF NOT EXIST doc\src\sgml\version.sgml goto noversion |
| 12 | + |
| 13 | +IF NOT EXIST %ROOT%\%OPENJADE% SET NF=OpenJade |
| 14 | +IF NOT EXIST %ROOT%\docbook SET NF=docbook |
| 15 | +IF NOT EXIST %ROOT%\%DSSSL% set NF=docbook-dssl |
| 16 | + |
| 17 | +IF NOT "%NF%" == "" GOTO notfound |
| 18 | + |
| 19 | +IF "%1" == "renamefiles" GOTO renamefiles |
| 20 | + |
| 21 | +cmd /v /c "%0" renamefiles |
| 22 | + |
| 23 | +cd doc\src\sgml |
| 24 | + |
| 25 | +SET SGML_CATALOG_FILES=%ROOT%\%OPENJADE%\dsssl\catalog;%ROOT%\docbook\docbook.cat |
| 26 | +perl %ROOT%\%DSSSL%\bin\collateindex.pl -f -g -o bookindex.sgml -N |
| 27 | +perl mk_feature_tables.pl YES ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-supported.sgml |
| 28 | +perl mk_feature_tables.pl NO ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-unsupported.sgml |
| 29 | + |
| 30 | +%ROOT%\%OPENJADE%\bin\openjade -V draft-mode -wall -wno-unused-param -wno-empty -D . -c %ROOT%\%DSSSL%\catalog -d stylesheet.dsl -i output-html -t sgml postgres.sgml |
| 31 | +perl %ROOT%\%DSSSL%\bin\collateindex.pl -f -g -i 'bookindex' -o bookindex.sgml HTML.index |
| 32 | +%ROOT%\%OPENJADE%\bin\openjade -V draft-mode -wall -wno-unused-param -wno-empty -D . -c %ROOT%\%DSSSL%\catalog -d stylesheet.dsl -i output-html -t sgml postgres.sgml |
| 33 | + |
| 34 | +cd %STARTDIR% |
| 35 | +echo Docs build complete. |
| 36 | +exit /b |
| 37 | + |
| 38 | + |
| 39 | +:renamefiles |
| 40 | +REM Rename ISO entity files |
| 41 | +CD %ROOT%\docbook |
| 42 | +FOR %%f in (ISO*) do ( |
| 43 | + set foo=%%f |
| 44 | + IF NOT "!foo:~-4!" == ".gml" ren !foo! !foo:~0,3!-!foo:~3!.gml |
| 45 | +) |
| 46 | +exit /b |
| 47 | + |
| 48 | +:notfound |
| 49 | +echo Could not find directory for %NF%. |
| 50 | +cd %STARTDIR% |
| 51 | +goto :eof |
| 52 | + |
| 53 | +:noversion |
| 54 | +echo Could not find version.sgml. Please run mkvcbuild.pl first! |
| 55 | +cd %STARTDIR% |
| 56 | +goto :eof |
0 commit comments