2006-11-29 20:49:31 +01:00
|
|
|
@echo off
|
2010-09-20 22:08:53 +02:00
|
|
|
REM src/tools/msvc/clean.bat
|
2008-02-06 16:13:25 +01:00
|
|
|
|
|
|
|
set DIST=0
|
|
|
|
if "%1"=="dist" set DIST=1
|
2006-11-29 20:49:31 +01:00
|
|
|
|
|
|
|
set D=%CD%
|
|
|
|
if exist ..\msvc if exist ..\..\..\src cd ..\..\..
|
|
|
|
|
|
|
|
if exist debug rd /s /q debug
|
|
|
|
if exist release rd /s /q release
|
2008-02-06 16:13:25 +01:00
|
|
|
for %%f in (*.vcproj) do del %%f
|
2012-01-03 14:44:26 +01:00
|
|
|
for %%f in (*.vcxproj) do del %%f
|
|
|
|
for %%f in (*.vcxproj.user) do del %%f
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist pgsql.sln del /q pgsql.sln
|
2010-01-01 17:58:53 +01:00
|
|
|
if exist pgsql.sln.cache del /q pgsql.sln.cache
|
2012-01-03 14:44:26 +01:00
|
|
|
if exist pgsql.sdf del /q pgsql.sdf
|
|
|
|
if exist pgsql.suo del /q /a:H pgsql.suo
|
2006-11-29 20:49:31 +01:00
|
|
|
del /s /q src\bin\win32ver.rc 2> NUL
|
|
|
|
del /s /q src\interfaces\win32ver.rc 2> NUL
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
|
2014-07-14 20:07:52 +02:00
|
|
|
if exist src\backend\replication\libpqwalreceiver\win32ver.rc del /q src\backend\replication\libpqwalreceiver\win32ver.rc
|
2014-08-19 04:59:53 +02:00
|
|
|
if exist src\backend\snowball\win32ver.rc del /q src\backend\snowball\win32ver.rc
|
|
|
|
if exist src\interfaces\ecpg\test\win32ver.rc del /q src\interfaces\ecpg\test\win32ver.rc
|
2014-07-14 20:07:52 +02:00
|
|
|
if exist src\pl\plperl\win32ver.rc del /q src\pl\plperl\win32ver.rc
|
|
|
|
if exist src\pl\plpgsql\src\win32ver.rc del /q src\pl\plpgsql\src\win32ver.rc
|
|
|
|
if exist src\pl\plpython\win32ver.rc del /q src\pl\plpython\win32ver.rc
|
|
|
|
if exist src\pl\tcl\win32ver.rc del /q src\pl\tcl\win32ver.rc
|
2014-08-19 04:59:53 +02:00
|
|
|
if exist src\test\isolation\win32ver.rc del /q src\test\isolation\win32ver.rc
|
|
|
|
if exist src\test\regress\win32ver.rc del /q src\test\regress\win32ver.rc
|
|
|
|
if exist src\timezone\win32ver.rc del /q src\timezone\win32ver.rc
|
|
|
|
|
2014-07-14 20:07:52 +02:00
|
|
|
for /d %%f in (src\interfaces\ecpg\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
|
2014-07-14 20:07:21 +02:00
|
|
|
for /d %%f in (contrib\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
|
|
|
|
for /d %%f in (src\backend\utils\mb\conversion_procs\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
|
2006-11-29 20:49:31 +01:00
|
|
|
|
|
|
|
REM Delete files created with GenerateFiles() in Solution.pm
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist src\include\pg_config.h del /q src\include\pg_config.h
|
2012-10-08 03:52:07 +02:00
|
|
|
if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
|
2016-01-20 05:30:29 +01:00
|
|
|
if exist src\include\dynloader.h del /q src\include\dynloader.h
|
2008-08-29 15:02:33 +02:00
|
|
|
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
|
2011-02-04 15:28:06 +01:00
|
|
|
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
|
2016-12-28 18:00:00 +01:00
|
|
|
if exist src\include\utils\fmgrprotos.h del /q src\include\utils\fmgrprotos.h
|
2008-08-18 15:42:49 +02:00
|
|
|
if exist src\include\utils\probes.h del /q src\include\utils\probes.h
|
2008-02-06 16:13:25 +01:00
|
|
|
|
2010-01-05 02:06:57 +01:00
|
|
|
if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h
|
2016-12-28 18:00:00 +01:00
|
|
|
if %DIST%==1 if exist src\backend\utils\fmgrprotos.h del /q src\backend\utils\fmgrprotos.h
|
2010-01-05 02:06:57 +01:00
|
|
|
if %DIST%==1 if exist src\backend\utils\fmgrtab.c del /q src\backend\utils\fmgrtab.c
|
|
|
|
if %DIST%==1 if exist src\backend\catalog\postgres.bki del /q src\backend\catalog\postgres.bki
|
|
|
|
if %DIST%==1 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description
|
|
|
|
if %DIST%==1 if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription
|
|
|
|
if %DIST%==1 if exist src\backend\catalog\schemapg.h del /q src\backend\catalog\schemapg.h
|
2008-02-06 16:13:25 +01:00
|
|
|
if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c
|
|
|
|
if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c
|
|
|
|
if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c
|
|
|
|
if %DIST%==1 if exist src\backend\bootstrap\bootparse.c del /q src\backend\bootstrap\bootparse.c
|
|
|
|
if %DIST%==1 if exist src\backend\utils\misc\guc-file.c del /q src\backend\utils\misc\guc-file.c
|
|
|
|
|
|
|
|
|
|
|
|
if exist src\bin\psql\sql_help.h del /q src\bin\psql\sql_help.h
|
|
|
|
|
|
|
|
if exist src\interfaces\libpq\libpq.rc del /q src\interfaces\libpq\libpq.rc
|
|
|
|
if exist src\interfaces\libpq\libpqdll.def del /q src\interfaces\libpq\libpqdll.def
|
|
|
|
if exist src\interfaces\ecpg\compatlib\compatlib.def del /q src\interfaces\ecpg\compatlib\compatlib.def
|
|
|
|
if exist src\interfaces\ecpg\ecpglib\ecpglib.def del /q src\interfaces\ecpg\ecpglib\ecpglib.def
|
|
|
|
if exist src\interfaces\ecpg\include\ecpg_config.h del /q src\interfaces\ecpg\include\ecpg_config.h
|
|
|
|
if exist src\interfaces\ecpg\pgtypeslib\pgtypeslib.def del /q src\interfaces\ecpg\pgtypeslib\pgtypeslib.def
|
|
|
|
if %DIST%==1 if exist src\interfaces\ecpg\preproc\pgc.c del /q src\interfaces\ecpg\preproc\pgc.c
|
|
|
|
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.c del /q src\interfaces\ecpg\preproc\preproc.c
|
|
|
|
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.h del /q src\interfaces\ecpg\preproc\preproc.h
|
|
|
|
|
|
|
|
if exist src\port\pg_config_paths.h del /q src\port\pg_config_paths.h
|
|
|
|
|
|
|
|
if exist src\pl\plperl\spi.c del /q src\pl\plperl\spi.c
|
|
|
|
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.c del /q src\pl\plpgsql\src\pl_gram.c
|
2008-08-30 04:32:24 +02:00
|
|
|
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.h del /q src\pl\plpgsql\src\pl_gram.h
|
2008-02-06 16:13:25 +01:00
|
|
|
|
2016-03-25 01:28:47 +01:00
|
|
|
if %DIST%==1 if exist src\fe_utils\psqlscan.c del /q src\fe_utils\psqlscan.c
|
Split psql's lexer into two separate .l files for SQL and backslash cases.
This gets us to a point where psqlscan.l can be used by other frontend
programs for the same purpose psql uses it for, ie to detect when it's
collected a complete SQL command from input that is divided across
line boundaries. Moreover, other programs can supply their own lexers
for backslash commands of their own choosing. A follow-on patch will
use this in pgbench.
The end result here is roughly the same as in Kyotaro Horiguchi's
0001-Make-SQL-parser-part-of-psqlscan-independent-from-ps.patch, although
the details of the method for switching between lexers are quite different.
Basically, in this patch we share the entire PsqlScanState, YY_BUFFER_STATE
stack, *and* yyscan_t between different lexers. The only thing we need
to do to switch to a different lexer is to make sure the start_state is
valid for the new lexer. This works because flex doesn't keep any other
persistent state that depends on the specific lexing tables generated for
a particular .l file. (We are assuming that both lexers are built with
the same flex version, or at least versions that are compatible with
respect to the contents of yyscan_t; but that doesn't seem likely to
be a big problem in practice, considering how slowly flex changes.)
Aside from being more efficient than Horiguchi-san's original solution,
this avoids possible corner-case changes in semantics: the original code
was capable of popping the input buffer stack while still staying in
backslash-related parsing states. I'm not sure that that equates to any
useful user-visible behaviors, but I'm not sure it doesn't either, so
I'm loath to assume that we only need to consider the topmost buffer when
parsing a backslash command.
I've attempted to update the MSVC build scripts for the added .l file,
but will rely on the buildfarm to see if I missed anything.
Kyotaro Horiguchi and Tom Lane
2016-03-19 05:24:55 +01:00
|
|
|
if %DIST%==1 if exist src\bin\psql\psqlscanslash.c del /q src\bin\psql\psqlscanslash.c
|
2008-02-06 16:13:25 +01:00
|
|
|
|
|
|
|
if %DIST%==1 if exist contrib\cube\cubescan.c del /q contrib\cube\cubescan.c
|
|
|
|
if %DIST%==1 if exist contrib\cube\cubeparse.c del /q contrib\cube\cubeparse.c
|
|
|
|
if %DIST%==1 if exist contrib\seg\segscan.c del /q contrib\seg\segscan.c
|
|
|
|
if %DIST%==1 if exist contrib\seg\segparse.c del /q contrib\seg\segparse.c
|
2006-11-29 20:49:31 +01:00
|
|
|
|
2007-02-13 16:36:32 +01:00
|
|
|
if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
|
2008-02-06 16:13:25 +01:00
|
|
|
if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll
|
|
|
|
if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll
|
|
|
|
if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll
|
2008-05-30 02:04:32 +02:00
|
|
|
if exist src\test\regress\refint.dll del /q src\test\regress\refint.dll
|
|
|
|
if exist src\test\regress\autoinc.dll del /q src\test\regress\autoinc.dll
|
2006-11-29 20:49:31 +01:00
|
|
|
|
2015-07-29 18:17:02 +02:00
|
|
|
if exist src\bin\initdb\tmp_check rd /s /q src\bin\initdb\tmp_check
|
|
|
|
if exist src\bin\pg_basebackup\tmp_check rd /s /q src\bin\pg_basebackup\tmp_check
|
|
|
|
if exist src\bin\pg_config\tmp_check rd /s /q src\bin\pg_config\tmp_check
|
2016-02-25 05:41:33 +01:00
|
|
|
if exist src\bin\pg_controldata\tmp_check rd /s /q src\bin\pg_controldata\tmp_check
|
2015-07-29 18:17:02 +02:00
|
|
|
if exist src\bin\pg_ctl\tmp_check rd /s /q src\bin\pg_ctl\tmp_check
|
|
|
|
if exist src\bin\pg_rewind\tmp_check rd /s /q src\bin\pg_rewind\tmp_check
|
2016-02-20 04:47:50 +01:00
|
|
|
if exist src\bin\pgbench\tmp_check rd /s /q src\bin\pgbench\tmp_check
|
2015-07-29 18:17:02 +02:00
|
|
|
if exist src\bin\scripts\tmp_check rd /s /q src\bin\scripts\tmp_check
|
2016-02-29 22:16:59 +01:00
|
|
|
if exist src\test\recovery\tmp_check rd /s /q src\test\recovery\tmp_check
|
2015-07-29 18:17:02 +02:00
|
|
|
|
2007-03-23 10:53:33 +01:00
|
|
|
REM Clean up datafiles built with contrib
|
2008-02-06 16:13:25 +01:00
|
|
|
REM cd contrib
|
|
|
|
REM for /r %%f in (*.sql) do if exist %%f.in del %%f
|
2007-03-23 10:53:33 +01:00
|
|
|
|
2006-11-29 20:49:31 +01:00
|
|
|
cd %D%
|
2007-06-12 13:07:34 +02:00
|
|
|
|
|
|
|
REM Clean up ecpg regression test files
|
2016-12-19 00:12:23 +01:00
|
|
|
msbuild ecpg_regression.proj /NoLogo /v:q %MSBFLAGS% /t:clean
|
2007-06-12 13:07:34 +02:00
|
|
|
|
2006-11-29 20:49:31 +01:00
|
|
|
goto :eof
|