|
| 1 | +@echooff |
| 2 | +REM Adjust path for your docbook installation |
| 3 | +SETROOT=c:\prog\pgsql\docbook |
| 4 | + |
| 5 | +SETLOCAL |
| 6 | +SETSTARTDIR=%CD% |
| 7 | +SETOPENJADE=openjade-1.3.1 |
| 8 | +SETDSSSL=docbook-dsssl-1.79 |
| 9 | + |
| 10 | +IFEXIST ..\msvcIFEXIST ..\..\..\srccd ..\..\.. |
| 11 | +IFNOTEXIST doc\src\sgml\version.sgmlgoto noversion |
| 12 | + |
| 13 | +IFNOTEXIST%ROOT%\%OPENJADE%SETNF=OpenJade |
| 14 | +IFNOTEXIST%ROOT%\docbookSETNF=docbook |
| 15 | +IFNOTEXIST%ROOT%\%DSSSL%setNF=docbook-dssl |
| 16 | + |
| 17 | +IFNOT"%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 | +SETSGML_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%%fin (ISO*)do ( |
| 43 | +setfoo=%%f |
| 44 | +IFNOT"!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 |