mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Set root of docbook stuff from buildenv.bat and not from builddoc.bat.
Fix calling for file renaming when cd:ed into a different directory.
This commit is contained in:
		@@ -1,6 +1,5 @@
 | 
				
			|||||||
@echo off
 | 
					@echo off
 | 
				
			||||||
REM Adjust path for your docbook installation
 | 
					REM Adjust path for your docbook installation in buildenv.bat
 | 
				
			||||||
SET ROOT=c:\prog\pgsql\docbook
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
SETLOCAL
 | 
					SETLOCAL
 | 
				
			||||||
SET STARTDIR=%CD%
 | 
					SET STARTDIR=%CD%
 | 
				
			||||||
@@ -9,27 +8,27 @@ SET DSSSL=docbook-dsssl-1.79
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
IF EXIST ..\msvc IF EXIST ..\..\..\src cd ..\..\..
 | 
					IF EXIST ..\msvc IF EXIST ..\..\..\src cd ..\..\..
 | 
				
			||||||
IF NOT EXIST doc\src\sgml\version.sgml goto noversion
 | 
					IF NOT EXIST doc\src\sgml\version.sgml goto noversion
 | 
				
			||||||
 | 
					IF EXIST src\tools\msvc\buildenv.bat CALL src\tools\msvc\buildenv.bat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IF NOT EXIST %ROOT%\%OPENJADE% SET NF=OpenJade
 | 
					IF NOT EXIST %DOCROOT%\%OPENJADE% SET NF=OpenJade
 | 
				
			||||||
IF NOT EXIST %ROOT%\docbook SET NF=docbook
 | 
					IF NOT EXIST %DOCROOT%\docbook SET NF=docbook
 | 
				
			||||||
IF NOT EXIST %ROOT%\%DSSSL% set NF=docbook-dssl
 | 
					IF NOT EXIST %DOCROOT%\%DSSSL% set NF=docbook-dssl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IF NOT "%NF%" == "" GOTO notfound
 | 
					IF NOT "%NF%" == "" GOTO notfound
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IF "%1" == "renamefiles" GOTO renamefiles
 | 
					IF "%1" == "renamefiles" GOTO renamefiles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cmd /v /c "%0" renamefiles
 | 
					cmd /v /c src\tools\msvc\builddoc renamefiles
 | 
				
			||||||
 | 
					 | 
				
			||||||
cd doc\src\sgml
 | 
					cd doc\src\sgml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SET SGML_CATALOG_FILES=%ROOT%\%OPENJADE%\dsssl\catalog;%ROOT%\docbook\docbook.cat
 | 
					SET SGML_CATALOG_FILES=%DOCROOT%\%OPENJADE%\dsssl\catalog;%DOCROOT%\docbook\docbook.cat
 | 
				
			||||||
perl %ROOT%\%DSSSL%\bin\collateindex.pl -f -g -o bookindex.sgml -N
 | 
					perl %DOCROOT%\%DSSSL%\bin\collateindex.pl -f -g -o bookindex.sgml -N
 | 
				
			||||||
perl mk_feature_tables.pl YES ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-supported.sgml
 | 
					perl mk_feature_tables.pl YES ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-supported.sgml
 | 
				
			||||||
perl mk_feature_tables.pl NO ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-unsupported.sgml
 | 
					perl mk_feature_tables.pl NO ..\..\..\src\backend\catalog\sql_feature_packages.txt ..\..\..\src\backend\catalog\sql_features.txt > features-unsupported.sgml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%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
 | 
					%DOCROOT%\%OPENJADE%\bin\openjade -V draft-mode -wall -wno-unused-param -wno-empty -D . -c %DOCROOT%\%DSSSL%\catalog -d stylesheet.dsl -i output-html -t sgml postgres.sgml
 | 
				
			||||||
perl %ROOT%\%DSSSL%\bin\collateindex.pl -f -g -i 'bookindex' -o bookindex.sgml HTML.index
 | 
					perl %DOCROOT%\%DSSSL%\bin\collateindex.pl -f -g -i 'bookindex' -o bookindex.sgml HTML.index
 | 
				
			||||||
%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
 | 
					%DOCROOT%\%OPENJADE%\bin\openjade -V draft-mode -wall -wno-unused-param -wno-empty -D . -c %DOCROOT%\%DSSSL%\catalog -d stylesheet.dsl -i output-html -t sgml postgres.sgml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cd %STARTDIR%
 | 
					cd %STARTDIR%
 | 
				
			||||||
echo Docs build complete.
 | 
					echo Docs build complete.
 | 
				
			||||||
@@ -38,7 +37,7 @@ exit /b
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:renamefiles
 | 
					:renamefiles
 | 
				
			||||||
REM Rename ISO entity files
 | 
					REM Rename ISO entity files
 | 
				
			||||||
CD %ROOT%\docbook
 | 
					CD %DOCROOT%\docbook
 | 
				
			||||||
FOR %%f in (ISO*) do (
 | 
					FOR %%f in (ISO*) do (
 | 
				
			||||||
   set foo=%%f
 | 
					   set foo=%%f
 | 
				
			||||||
   IF NOT "!foo:~-4!" == ".gml" ren !foo! !foo:~0,3!-!foo:~3!.gml
 | 
					   IF NOT "!foo:~-4!" == ".gml" ren !foo! !foo:~0,3!-!foo:~3!.gml
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user