|
1 | 1 | @echo off |
2 | | -REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.9 2007/12/19 12:31:35 mha Exp $ |
| 2 | +REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.10 2008/02/06 15:13:25 mha Exp $ |
| 3 | + |
| 4 | +set DIST=0 |
| 5 | +if "%1"=="dist" set DIST=1 |
3 | 6 |
|
4 | 7 | set D=%CD% |
5 | 8 | if exist ..\msvc if exist ..\..\..\src cd ..\..\.. |
6 | 9 |
|
7 | 10 | if exist debug rd /s /q debug |
8 | 11 | if exist release rd /s /q release |
9 | | -call :del *.vcproj |
10 | | -call :del pgsql.sln |
| 12 | +for %%f in (*.vcproj) do del %%f |
| 13 | +if exist pgsql.sln del /q pgsql.sln |
11 | 14 | del /s /q src\bin\win32ver.rc 2> NUL |
12 | 15 | del /s /q src\interfaces\win32ver.rc 2> NUL |
13 | | -call :del src\backend\win32ver.rc |
14 | | - |
| 16 | +if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc |
15 | 17 |
|
16 | 18 | REM Delete files created with GenerateFiles() in Solution.pm |
17 | | -call :del src\include\pg_config.h |
18 | | -call :del src\include\pg_config_os.h |
19 | | -call :del src\backend\parser\parse.h |
20 | | -call :del src\include\utils\fmgroids.h |
21 | | - |
22 | | -call :del src\backend\utils\fmgrtab.c |
23 | | -call :del src\backend\catalog\postgres.bki |
24 | | -call :del src\backend\catalog\postgres.description |
25 | | -call :del src\backend\catalog\postgres.shdescription |
26 | | -call :del src\backend\parser\gram.c |
27 | | -call :del src\backend\bootstrap\bootparse.c |
28 | | -call :del src\backend\bootstrap\bootstrap_tokens.h |
29 | | - |
30 | | -call :del src\bin\psql\sql_help.h |
31 | | - |
32 | | -call :del src\interfaces\libpq\libpq.rc |
33 | | -call :del src\interfaces\libpq\libpqdll.def |
34 | | -call :del src\interfaces\ecpg\compatlib\compatlib.def |
35 | | -call :del src\interfaces\ecpg\ecpglib\ecpglib.def |
36 | | -call :del src\interfaces\ecpg\include\ecpg_config.h |
37 | | -call :del src\interfaces\ecpg\pgtypeslib\pgtypeslib.def |
38 | | -call :del src\interfaces\ecpg\preproc\preproc.c |
39 | | -call :del src\interfaces\ecpg\preproc\preproc.h |
40 | | - |
41 | | -call :del src\port\pg_config_paths.h |
42 | | - |
43 | | -call :del src\pl\plperl\spi.c |
44 | | -call :del src\pl\plpgsql\src\pl_gram.c |
45 | | -call :del src\pl\plpgsql\src\pl.tab.h |
46 | | - |
47 | | -call :del contrib\cube\cubeparse.c |
48 | | -call :del contrib\cube\cubeparse.h |
49 | | -call :del contrib\seg\segparse.c |
50 | | -call :del contrib\seg\segparse.h |
| 19 | +if exist src\include\pg_config.h del /q src\include\pg_config.h |
| 20 | +if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h |
| 21 | +if %DIST%==1 if exist src\backend\parser\parse.h del /q src\backend\parser\parse.h |
| 22 | +if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h |
| 23 | + |
| 24 | +if exist src\backend\utils\fmgrtab.c del /q src\backend\utils\fmgrtab.c |
| 25 | +if exist src\backend\catalog\postgres.bki del /q src\backend\catalog\postgres.bki |
| 26 | +if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description |
| 27 | +if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription |
| 28 | +if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c |
| 29 | +if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c |
| 30 | +if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c |
| 31 | +if %DIST%==1 if exist src\backend\bootstrap\bootparse.c del /q src\backend\bootstrap\bootparse.c |
| 32 | +if %DIST%==1 if exist src\backend\bootstrap\bootstrap_tokens.h del /q src\backend\bootstrap\bootstrap_tokens.h |
| 33 | +if %DIST%==1 if exist src\backend\utils\misc\guc-file.c del /q src\backend\utils\misc\guc-file.c |
| 34 | + |
| 35 | + |
| 36 | +if exist src\bin\psql\sql_help.h del /q src\bin\psql\sql_help.h |
| 37 | + |
| 38 | +if exist src\interfaces\libpq\libpq.rc del /q src\interfaces\libpq\libpq.rc |
| 39 | +if exist src\interfaces\libpq\libpqdll.def del /q src\interfaces\libpq\libpqdll.def |
| 40 | +if exist src\interfaces\ecpg\compatlib\compatlib.def del /q src\interfaces\ecpg\compatlib\compatlib.def |
| 41 | +if exist src\interfaces\ecpg\ecpglib\ecpglib.def del /q src\interfaces\ecpg\ecpglib\ecpglib.def |
| 42 | +if exist src\interfaces\ecpg\include\ecpg_config.h del /q src\interfaces\ecpg\include\ecpg_config.h |
| 43 | +if exist src\interfaces\ecpg\pgtypeslib\pgtypeslib.def del /q src\interfaces\ecpg\pgtypeslib\pgtypeslib.def |
| 44 | +if %DIST%==1 if exist src\interfaces\ecpg\preproc\pgc.c del /q src\interfaces\ecpg\preproc\pgc.c |
| 45 | +if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.c del /q src\interfaces\ecpg\preproc\preproc.c |
| 46 | +if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.h del /q src\interfaces\ecpg\preproc\preproc.h |
| 47 | + |
| 48 | +if exist src\port\pg_config_paths.h del /q src\port\pg_config_paths.h |
| 49 | + |
| 50 | +if exist src\pl\plperl\spi.c del /q src\pl\plperl\spi.c |
| 51 | +if %DIST%==1 if exist src\pl\plpgsql\src\pl_scan.c del /q src\pl\plpgsql\src\pl_scan.c |
| 52 | +if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.c del /q src\pl\plpgsql\src\pl_gram.c |
| 53 | +if %DIST%==1 if exist src\pl\plpgsql\src\pl.tab.h del /q src\pl\plpgsql\src\pl.tab.h |
| 54 | + |
| 55 | +if %DIST%==1 if exist src\bin\psql\psqlscan.c del /q src\bin\psql\psqlscan.c |
| 56 | + |
| 57 | +if %DIST%==1 if exist contrib\cube\cubescan.c del /q contrib\cube\cubescan.c |
| 58 | +if %DIST%==1 if exist contrib\cube\cubeparse.c del /q contrib\cube\cubeparse.c |
| 59 | +if %DIST%==1 if exist contrib\cube\cubeparse.h del /q contrib\cube\cubeparse.h |
| 60 | +if %DIST%==1 if exist contrib\seg\segscan.c del /q contrib\seg\segscan.c |
| 61 | +if %DIST%==1 if exist contrib\seg\segparse.c del /q contrib\seg\segparse.c |
| 62 | +if %DIST%==1 if exist contrib\seg\segparse.h del /q contrib\seg\segparse.h |
51 | 63 |
|
52 | 64 | if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check |
53 | | -call :del contrib\spi\refint.dll |
54 | | -call :del contrib\spi\autoinc.dll |
55 | | -call :del src\test\regress\regress.dll |
| 65 | +if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll |
| 66 | +if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll |
| 67 | +if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll |
56 | 68 |
|
57 | 69 | REM Clean up datafiles built with contrib |
58 | | -cd contrib |
59 | | -for /r %%f in (*.sql) do if exist %%f.in del %%f |
| 70 | +REM cd contrib |
| 71 | +REM for /r %%f in (*.sql) do if exist %%f.in del %%f |
60 | 72 |
|
61 | 73 | cd %D% |
62 | 74 |
|
63 | 75 | REM Clean up ecpg regression test files |
64 | 76 | msbuild /NoLogo ecpg_regression.proj /t:clean /v:q |
65 | 77 |
|
66 | 78 | goto :eof |
67 | | - |
68 | | - |
69 | | -:del |
70 | | -if exist %1 del /q %1 |
71 | | -goto :eof |
|
0 commit comments