Skip to content

Commit 1918703

Browse files
committed
A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
1 parent 99212a4 commit 1918703

10 files changed

+39
-72
lines changed

configure

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8903,10 +8903,7 @@ trap 'rm -fr `echo "GNUmakefile
89038903
src/backend/port/Makefile
89048904
src/backend/catalog/genbki.sh
89058905
src/backend/utils/Gen_fmgrtab.sh
8906-
src/bin/pgtclsh/mkMakefile.tcldefs.sh
8907-
src/bin/pgtclsh/mkMakefile.tkdefs.sh
89088906
src/include/version.h
8909-
src/pl/tcl/mkMakefile.tcldefs.sh
89108907
src/test/regress/GNUmakefile
89118908
src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
89128909
EOF
@@ -9077,10 +9074,7 @@ CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
90779074
src/backend/port/Makefile
90789075
src/backend/catalog/genbki.sh
90799076
src/backend/utils/Gen_fmgrtab.sh
9080-
src/bin/pgtclsh/mkMakefile.tcldefs.sh
9081-
src/bin/pgtclsh/mkMakefile.tkdefs.sh
90829077
src/include/version.h
9083-
src/pl/tcl/mkMakefile.tcldefs.sh
90849078
src/test/regress/GNUmakefile
90859079
"}
90869080
EOF

configure.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,6 @@ AC_OUTPUT(
11991199
src/backend/port/Makefile
12001200
src/backend/catalog/genbki.sh
12011201
src/backend/utils/Gen_fmgrtab.sh
1202-
src/bin/pgtclsh/mkMakefile.tcldefs.sh
1203-
src/bin/pgtclsh/mkMakefile.tkdefs.sh
12041202
src/include/version.h
1205-
src/pl/tcl/mkMakefile.tcldefs.sh
12061203
src/test/regress/GNUmakefile
12071204
)

src/Makefile.global.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.82 2000/06/28 18:29:13 petere Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.83 2000/07/01 15:02:16 petere Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -129,6 +129,8 @@ python_moduledir = @python_moduledir@
129129
USE_TCL= @USE_TCL@
130130
USE_TK= @USE_TK@
131131
WISH= @WISH@
132+
TCL_CONFIG_SH = @TCL_CONFIG_SH@
133+
TK_CONFIG_SH = @TK_CONFIG_SH@
132134

133135
X_CFLAGS= @X_CFLAGS@
134136
X_LIBS= @X_LIBS@

src/bin/Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.26 2000/06/27 00:30:49 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.27 2000/07/01 15:02:19 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -15,8 +15,6 @@ include ../Makefile.global
1515
DIRS := initdb initlocation ipcclean pg_ctl pg_dump pg_id \
1616
pg_passwd pg_version psql scripts
1717

18-
ALLDIRS := $(DIRS) pg_encoding pgaccess pgtclsh
19-
2018
ifdef MULTIBYTE
2119
DIRS += pg_encoding
2220
endif
@@ -32,8 +30,5 @@ endif
3230
all install installdirs uninstall depend:
3331
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done
3432

35-
clean:
36-
@for dir in $(DIRS); do $(MAKE) -C $$dir $@; done
37-
38-
distclean maintainer-clean:
39-
@for dir in $(ALLDIRS); do $(MAKE) -C $$dir $@; done
33+
clean distclean maintainer-clean:
34+
-@for dir in $(DIRS); do $(MAKE) -C $$dir $@; done

src/bin/pgtclsh/Makefile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.29 2000/06/30 16:10:47 petere Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.30 2000/07/01 15:02:23 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -60,20 +60,13 @@ uninstall:
6060
rm -f $(bindir)/pgtclsh $(bindir)/pgtksh
6161

6262
Makefile.tcldefs: mkMakefile.tcldefs.sh
63-
$(SHELL) $<
63+
$(SHELL) $< '$(TCL_CONFIG_SH)' '$@'
6464

6565
Makefile.tkdefs: mkMakefile.tkdefs.sh
66-
$(SHELL) $<
66+
$(SHELL) $< '$(TK_CONFIG_SH)' '$@'
6767

68-
mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: $(top_builddir)/config.status
69-
mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: % : %.in
70-
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
71-
72-
clean:
68+
clean distclean maintainer-clean:
7369
rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh
7470

75-
distclean maintainer-clean: clean
76-
rm -f mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh
77-
7871
dep depend:
7972
$(CC) -MM $(CFLAGS) *.c > depend
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#! /bin/sh
22

3-
if [ ! -r @TCL_CONFIG_SH@ ]; then
4-
echo "@TCL_CONFIG_SH@ not found"
5-
echo "I need this file! Please make a symbolic link to this file"
6-
echo "and start make again."
7-
exit 1
3+
# $1 = path to tclConfig.sh ; $2 = output file
4+
5+
if test x"$1" = x ; then
6+
echo "$0: No tclConfig.sh file specified. Did you use \`configure --with-tcl'?" 1>&2
7+
exit 1
88
fi
99

1010
# Source the file to obtain the correctly expanded variable definitions
11-
. @TCL_CONFIG_SH@
11+
. "$1"
1212

1313
# Read the file a second time as an easy way of getting the list of variable
1414
# definitions to output.
15-
cat @TCL_CONFIG_SH@ |
15+
cat "$1" |
1616
egrep '^TCL_|^TK_' |
1717
sed 's/^\([^=]*\)=.*$/\1/' |
1818
while read var
1919
do
2020
eval echo "\"$var = \$$var\""
21-
done >Makefile.tcldefs
21+
done > "$2"
2222

2323
exit 0
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#! /bin/sh
22

3-
if [ ! -r @TK_CONFIG_SH@ ]; then
4-
echo "@TK_CONFIG_SH@ not found"
5-
echo "I need this file! Please make a symbolic link to this file"
6-
echo "and start make again."
3+
# $1 = path to tkConfig.sh ; $2 = output file
4+
5+
if test x"$1" = x; then
6+
echo "$0: No tkConfig.sh file specified. Did you use \`configure --with-tcl --with-x'?" 1>&2
77
exit 1
88
fi
99

1010
# Source the file to obtain the correctly expanded variable definitions
11-
. @TK_CONFIG_SH@
11+
. "$1"
1212

1313
# Read the file a second time as an easy way of getting the list of variable
1414
# definitions to output.
15-
cat @TK_CONFIG_SH@ |
15+
cat "$1" |
1616
egrep '^TCL_|^TK_' |
1717
sed 's/^\([^=]*\)=.*$/\1/' |
1818
while read var
1919
do
2020
eval echo "\"$var = \$$var\""
21-
done >Makefile.tkdefs
21+
done > "$2"
2222

2323
exit 0

src/pl/Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.9 2000/06/27 00:31:48 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.10 2000/07/01 15:02:27 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -20,17 +20,11 @@ endif
2020

2121
# Disabled because it doesn't work
2222
#ifeq ($(with_perl), yes)
23-
# $(MAKE) -C plperl $@
23+
#DIRS += plperl
2424
#endif
2525

26-
ALLDIRS := plpgsql tcl plperl
27-
28-
2926
all install installdirs uninstall depend:
3027
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done
3128

32-
clean:
29+
clean distclean maintainer-clean:
3330
@for dir in $(DIRS); do $(MAKE) -C $$dir $@; done
34-
35-
distclean maintainer-clean:
36-
@for dir in $(ALLDIRS); do $(MAKE) -C $$dir $@; done

src/pl/tcl/Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for the pltcl shared object
44
#
5-
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.19 2000/06/30 16:10:56 petere Exp $
5+
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.20 2000/07/01 15:02:31 petere Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -108,16 +108,8 @@ all install:
108108
echo "*****"
109109
endif
110110

111-
112111
Makefile.tcldefs: mkMakefile.tcldefs.sh
113-
$(SHELL) $<
114-
115-
mkMakefile.tcldefs.sh: mkMakefile.tcldefs.sh.in $(top_builddir)/config.status
116-
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
112+
$(SHELL) $< '$(TCL_CONFIG_SH)' '$@'
117113

118-
119-
clean:
114+
clean distclean maintainer-clean:
120115
rm -f $(INFILES) *.o Makefile.tcldefs
121-
122-
distclean maintainer-clean: clean
123-
rm -f mkMakefile.tcldefs.sh
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#! /bin/sh
22

3-
if [ ! -r @TCL_CONFIG_SH@ ]; then
4-
echo "@TCL_CONFIG_SH@ not found"
5-
echo "I need this file! Please make a symbolic link to this file"
6-
echo "and start make again."
7-
exit 1
3+
# $1 = path to tclConfig.sh ; $2 = output file
4+
5+
if test x"$1" = x ; then
6+
echo "$0: No tclConfig.sh file specified. Did you use \`configure --with-tcl'?" 1>&2
7+
exit 1
88
fi
99

1010
# Source the file to obtain the correctly expanded variable definitions
11-
. @TCL_CONFIG_SH@
11+
. "$1"
1212

1313
# Read the file a second time as an easy way of getting the list of variable
1414
# definitions to output.
15-
cat @TCL_CONFIG_SH@ |
15+
cat "$1" |
1616
egrep '^TCL_|^TK_' |
1717
sed 's/^\([^=]*\)=.*$/\1/' |
1818
while read var
1919
do
2020
eval echo "\"$var = \$$var\""
21-
done >Makefile.tcldefs
21+
done > "$2"
2222

2323
exit 0

0 commit comments

Comments
 (0)