1999-03-20 18:53:54 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# release_prep: prepare the Postgres source tree for distribution
|
|
|
|
#
|
|
|
|
# This script should be run after checking out a fileset from the Postgres
|
|
|
|
# CVS repository, and just before creating a tarfile from the checked-out
|
|
|
|
# fileset. It does cleanup tasks to ensure that we have a good tarball.
|
|
|
|
#
|
|
|
|
# Run the script from the toplevel Postgres directory, ie, do
|
|
|
|
# cd pgsql
|
|
|
|
# src/tools/release_prep
|
|
|
|
# (Right now, the cleanup tasks are all in the src subdirectory, but we
|
|
|
|
# might want to add housekeeping in doc too?)
|
|
|
|
#
|
|
|
|
# The script's tasks are:
|
|
|
|
# 1. Run configure to prepare usable Makefiles on the local system.
|
|
|
|
# 2. Generate distribution copies of some derived files such as gram.c.
|
|
|
|
# (We do this so that recipients of the distribution don't have to have
|
|
|
|
# tools that can create these files.)
|
|
|
|
# Note we force these files to be recreated, to ensure they will have
|
|
|
|
# newer timestamps than their master files.
|
|
|
|
# 3. "make distclean" to get rid of the configure outputs, as well as any
|
|
|
|
# other cruft that might be laying about.
|
|
|
|
|
|
|
|
# Select make to use --- default gmake, can be overridden by env var
|
|
|
|
MAKE=${MAKE:-gmake}
|
|
|
|
|
|
|
|
# Configure ... should we run autoconf here???
|
|
|
|
|
|
|
|
./configure
|
|
|
|
|
2000-01-16 21:05:00 +01:00
|
|
|
# Generate parser's yacc and lex files
|
1999-03-20 18:53:54 +01:00
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/backend/parser
|
1999-03-20 18:53:54 +01:00
|
|
|
rm -f gram.c parse.h scan.c
|
|
|
|
$MAKE gram.c parse.h scan.c
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../..
|
2000-01-16 21:05:00 +01:00
|
|
|
|
|
|
|
# Generate bootstrap parser's yacc and lex files
|
1999-03-20 18:53:54 +01:00
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/backend/bootstrap
|
2000-01-16 21:05:00 +01:00
|
|
|
rm -f bootstrap_tokens.h bootparse.c bootscanner.c
|
|
|
|
$MAKE bootstrap_tokens.h bootparse.c bootscanner.c
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../..
|
1999-03-20 18:53:54 +01:00
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
# Generate configuration file scanner
|
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/backend/utils/misc
|
2000-05-31 02:28:42 +02:00
|
|
|
rm -f guc-file.c lex.yy.c
|
|
|
|
$MAKE guc-file.c
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../../..
|
2000-05-31 02:28:42 +02:00
|
|
|
|
2000-01-16 21:05:00 +01:00
|
|
|
# Generate ecpg preprocessor's yacc and lex files
|
1999-03-20 18:53:54 +01:00
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/interfaces/ecpg/preproc
|
1999-03-20 18:53:54 +01:00
|
|
|
rm -f preproc.c preproc.h pgc.c
|
|
|
|
$MAKE preproc.c preproc.h pgc.c
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../../..
|
1999-03-20 18:53:54 +01:00
|
|
|
|
2000-01-16 21:05:00 +01:00
|
|
|
# Generate plpgsql's yacc and lex files
|
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/pl/plpgsql/src
|
2000-01-17 05:47:05 +01:00
|
|
|
rm -f pl_scan.c pl.tab.h pl_gram.c
|
2000-01-16 21:05:00 +01:00
|
|
|
$MAKE pl_scan.c pl.tab.h pl_gram.c
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../../..
|
2000-01-16 21:05:00 +01:00
|
|
|
|
1999-11-13 03:04:54 +01:00
|
|
|
# Generate psql's help on SQL command from the SGML docs
|
|
|
|
|
2000-06-07 00:01:15 +02:00
|
|
|
cd src/bin/psql
|
1999-11-13 03:04:54 +01:00
|
|
|
rm -f sql_help.h
|
|
|
|
$MAKE sql_help.h
|
2000-06-07 00:01:15 +02:00
|
|
|
cd ../../..
|
1999-11-13 03:04:54 +01:00
|
|
|
|
1999-03-20 18:53:54 +01:00
|
|
|
# Clean up
|
|
|
|
|
|
|
|
$MAKE distclean
|
|
|
|
|
|
|
|
exit 0
|