aboutsummaryrefslogtreecommitdiff
path: root/src/tools/release_prep
blob: 7b3352265934c423401d5abf5da91fc00c5dd154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/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}

cd src

# Configure ... should we run autoconf here???

./configure

# Generate parser's yacc and lex files

cd backend/parser
rm -f gram.c parse.h scan.c
$MAKE gram.c parse.h scan.c
cd ../..

# Generate bootstrap parser's yacc and lex files

cd backend/bootstrap
rm -f bootstrap_tokens.h bootparse.c bootscanner.c
$MAKE bootstrap_tokens.h bootparse.c bootscanner.c
cd ../..

# Generate ecpg preprocessor's yacc and lex files

cd interfaces/ecpg/preproc
rm -f preproc.c preproc.h pgc.c
$MAKE preproc.c preproc.h pgc.c
cd ../../..

# Generate plpgsql's yacc and lex files

cd pl/plpgsql/src
rm -f pl_scan.c pl.tab.h pl_gram.c
$MAKE pl_scan.c pl.tab.h pl_gram.c
cd ../../..

# Generate psql's help on SQL command from the SGML docs

cd bin/psql
rm -f sql_help.h
$MAKE sql_help.h
cd ../..

# Clean up

$MAKE distclean

exit 0