summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane1999-08-29 20:09:44 +0000
committerTom Lane1999-08-29 20:09:44 +0000
commitf4add18557a5345c65a993f0b41eafd19229d50f (patch)
tree8cbd0256db3e747a81a8cb311b69e0e2516aa753 /src
parent1f14a9de74b08cb128d14d8bbaf8acb225b87f91 (diff)
Fix quoting problems in mkMakefile.tcldefs.sh.in and
mkMakefile.tkdefs.sh.in.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pgtclsh/mkMakefile.tcldefs.sh.in15
-rw-r--r--src/bin/pgtclsh/mkMakefile.tkdefs.sh.in13
-rw-r--r--src/pl/tcl/mkMakefile.tcldefs.sh.in13
3 files changed, 30 insertions, 11 deletions
diff --git a/src/bin/pgtclsh/mkMakefile.tcldefs.sh.in b/src/bin/pgtclsh/mkMakefile.tcldefs.sh.in
index a8c2cc374de..79e456b3b54 100644
--- a/src/bin/pgtclsh/mkMakefile.tcldefs.sh.in
+++ b/src/bin/pgtclsh/mkMakefile.tcldefs.sh.in
@@ -1,16 +1,23 @@
+#! /bin/sh
-if [ ! -f @TCL_CONFIG_SH@ ]; then
+if [ ! -r @TCL_CONFIG_SH@ ]; then
echo "@TCL_CONFIG_SH@ not found"
echo "I need this file! Please make a symbolic link to this file"
echo "and start make again."
exit 1
fi
+# Source the file to obtain the correctly expanded variable definitions
+. @TCL_CONFIG_SH@
+
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
cat @TCL_CONFIG_SH@ |
- egrep '^TCL_' |
- while read inp
+ egrep '^TCL_|^TK_' |
+ sed 's/^\([^=]*\)=.*$/\1/' |
+ while read var
do
- eval eval echo $inp
+ eval echo "\"$var = \$$var\""
done >Makefile.tcldefs
exit 0
diff --git a/src/bin/pgtclsh/mkMakefile.tkdefs.sh.in b/src/bin/pgtclsh/mkMakefile.tkdefs.sh.in
index 3b5fd2402f4..b739547f793 100644
--- a/src/bin/pgtclsh/mkMakefile.tkdefs.sh.in
+++ b/src/bin/pgtclsh/mkMakefile.tkdefs.sh.in
@@ -1,18 +1,23 @@
+#! /bin/sh
-if [ ! -f @TK_CONFIG_SH@ ]; then
+if [ ! -r @TK_CONFIG_SH@ ]; then
echo "@TK_CONFIG_SH@ not found"
echo "I need this file! Please make a symbolic link to this file"
echo "and start make again."
exit 1
fi
+# Source the file to obtain the correctly expanded variable definitions
. @TK_CONFIG_SH@
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
cat @TK_CONFIG_SH@ |
- egrep '^TK_' |
- while read inp
+ egrep '^TCL_|^TK_' |
+ sed 's/^\([^=]*\)=.*$/\1/' |
+ while read var
do
- eval eval echo $inp
+ eval echo "\"$var = \$$var\""
done >Makefile.tkdefs
exit 0
diff --git a/src/pl/tcl/mkMakefile.tcldefs.sh.in b/src/pl/tcl/mkMakefile.tcldefs.sh.in
index ea86a233371..79e456b3b54 100644
--- a/src/pl/tcl/mkMakefile.tcldefs.sh.in
+++ b/src/pl/tcl/mkMakefile.tcldefs.sh.in
@@ -1,16 +1,23 @@
+#! /bin/sh
-if [ ! -f @TCL_CONFIG_SH@ ]; then
+if [ ! -r @TCL_CONFIG_SH@ ]; then
echo "@TCL_CONFIG_SH@ not found"
echo "I need this file! Please make a symbolic link to this file"
echo "and start make again."
exit 1
fi
+# Source the file to obtain the correctly expanded variable definitions
+. @TCL_CONFIG_SH@
+
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
cat @TCL_CONFIG_SH@ |
egrep '^TCL_|^TK_' |
- while read inp
+ sed 's/^\([^=]*\)=.*$/\1/' |
+ while read var
do
- eval eval echo $inp
+ eval echo "\"$var = \$$var\""
done >Makefile.tcldefs
exit 0