summaryrefslogtreecommitdiff
path: root/src/scripts/Configure-Makefile
diff options
context:
space:
mode:
authorTony Finch <dot@dotat.at>2012-12-07 17:44:42 +0000
committerTony Finch <dot@dotat.at>2012-12-07 17:55:13 +0000
commit58ee1eb660af5f69de403aaf36019f5dcaf9760e (patch)
tree47413b84d485b56e59cb46ad029094accc684f78 /src/scripts/Configure-Makefile
parent14f3b4702d2a65d2139bbae2cf9d7d37603c2048 (diff)
Avoid spurious rebuilds of the dynamic lookups Makefile.
This was noticable when re-building as a non-privileged user after installing as root; lookups/Makefile had been rebuilt by root and when it was rebuilt again by the unprivileged user `mv` demanded confirmation before overwriting the file.
Diffstat (limited to 'src/scripts/Configure-Makefile')
-rwxr-xr-xsrc/scripts/Configure-Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/scripts/Configure-Makefile b/src/scripts/Configure-Makefile
index 3e901e6a6..58b2b5770 100755
--- a/src/scripts/Configure-Makefile
+++ b/src/scripts/Configure-Makefile
@@ -77,8 +77,9 @@ mf=Makefile
mft=$mf-t
mftt=$mf-tt
-look_mf=lookups/Makefile.predynamic
-look_mft=${look_mf}-t
+look_mf=lookups/Makefile
+look_mf_pre=${look_mf}.predynamic
+look_mf_post=${look_mf}.postdynamic
# Ensure the temporary does not exist and start the new one by setting
# the OSTYPE and ARCHTYPE variables.
@@ -195,10 +196,10 @@ fi
rm -f $mftt
# make the lookups Makefile with the definitions
+# the auxiliary script generates $look_mf_post from $look_mf_pre
-## prepend stuff here; eg: grep LOOKUP_ $mft > $look_mft
-## cat ../src/lookups/Makefile >> $look_mft
-cp ../src/lookups/Makefile $look_mft
+cp ../src/lookups/Makefile $look_mf_pre
+../scripts/lookups-Makefile
# See if there is a definition of EXIM_PERL in what we have built so far.
# If so, run Perl to find the default values for PERL_CC, PERL_CCOPTS,
@@ -249,14 +250,14 @@ cat ../OS/Makefile-Base >> $mft || exit 1
# If the new makefile is the same as the existing one, say so, and just
# update the timestamp. Otherwise remove the old and install the new.
-if [ -s $mf ] && cmp -s $mft $mf && [ -s $look_mf ] && cmp -s $look_mft $look_mf
+if [ -s $mf ] && cmp -s $mft $mf && [ -s $look_mf ] && cmp -s $look_mf_post $look_mf
then echo ">>> rebuilt $mf unchanged"
echo " "
touch $mf || exit
- rm -f $mft
-elif rm -f $mf $look_mf
+ rm -f $mft $look_mf_pre $look_mf_post
+elif rm -f $mf $look_mf $look_mf_pre
mv $mft $mf
- mv $look_mft $look_mf
+ mv $look_mf_post $look_mf
then echo ">>> New $mf & $look_mf installed"
echo '>>> Use "make makefile" if you need to force rebuilding of the makefile'
echo " "