]> granicus.if.org Git - postgresql/blob - src/tools/msvc/clean.bat
9b3b278bad90eb3e57c7f85ab035c766005f7169
[postgresql] / src / tools / msvc / clean.bat
1 @echo off
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
6
7 set D=%CD%
8 if exist ..\msvc if exist ..\..\..\src cd ..\..\..
9
10 if exist debug rd /s /q debug
11 if exist release rd /s /q release
12 for %%f in (*.vcproj) do del %%f
13 if exist pgsql.sln del /q pgsql.sln
14 del /s /q src\bin\win32ver.rc 2> NUL
15 del /s /q src\interfaces\win32ver.rc 2> NUL
16 if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
17
18 REM Delete files created with GenerateFiles() in Solution.pm
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
63
64 if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
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
68
69 REM Clean up datafiles built with contrib
70 REM cd contrib
71 REM for /r %%f in (*.sql) do if exist %%f.in del %%f
72
73 cd %D%
74
75 REM Clean up ecpg regression test files
76 msbuild /NoLogo ecpg_regression.proj /t:clean /v:q
77
78 goto :eof