aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1993-10-03 21:18:51 +0000
committerRoland McGrath1993-10-03 21:18:51 +0000
commit879dea9384f9c2a13d4c379088848a5b321d2af6 (patch)
tree3dac3bf23b308e1c1925f8a6c4ca2c8ec6ca7f2d
parentbbe097d0a59785e94f033c71fe8e9511c75e7794 (diff)
downloademacs-879dea9384f9c2a13d4c379088848a5b321d2af6.tar.gz
emacs-879dea9384f9c2a13d4c379088848a5b321d2af6.zip
Don't do seddery on config.status after AC_OUTPUT.
Instead just include the commands to make src/Makefile as the second arg to AC_OUTPUT.
-rwxr-xr-xconfigure1.in58
1 files changed, 14 insertions, 44 deletions
diff --git a/configure1.in b/configure1.in
index 630f3f23905..b4ec6c9a5a6 100755
--- a/configure1.in
+++ b/configure1.in
@@ -1389,48 +1389,18 @@ test -n "${prefix}" &&
1389test -n "${exec_prefix}" && 1389test -n "${exec_prefix}" &&
1390 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` 1390 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1391] 1391]
1392AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) 1392AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in, [
1393[
1394# Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done 1393# Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1395# after src/config.h is built, since we rely on that file. Only do the 1394# after src/config.h is built, since we rely on that file.
1396# build if "config.status" is present, since it's non-presence indicates 1395echo creating src/Makefile
1397# an error occured. 1396( cd src
1398status=$? 1397 rm -f junk.c
1399if [ ! -f ./config.status ]; then 1398 cp Makefile.in junk.c
1400 exit $status 1399 ${CPP} -I. -I${top_srcdir}/src ${CPPFLAGS} junk.c |
1401fi 1400 sed -e 's/^#.*$//' -e '/^[ ]*$/d' -e 's/^ / /' > Makefile.new
1402topsrcdir=${srcdir} 1401 # There is a window of lossage if you mv Makefile.new before chmoding it.
1403makefile_command='echo "creating src/Makefile"; 1402 chmod 444 Makefile.new
1404 topsrcdir='"${topsrcdir}"'; 1403 mv -f Makefile.new Makefile
1405( cd ./src; 1404 rm -f junk.c
1406 cp Makefile.in junk.c; 1405)
1407 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; 1406])
1408 < junk.cpp '\
1409' sed -e '\''s/^#.*//'\'' '\
1410' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\
1411' -e '\''s/^ / /'\'' '\
1412' | sed -n -e '\''/^..*$/p'\'' '\
1413' > Makefile.new;
1414 : 'There is a window of lossage if you mv Makefile.new before chmoding it.'
1415 chmod 444 Makefile.new;
1416 mv -f Makefile.new Makefile;
1417 rm -f junk.c junk.cpp;
1418)'
1419eval `echo $makefile_command`
1420# AC-OUTPUT has created `config.status' already. We need to add the above
1421# commands to re-create `src/Makefile', and we need to insert them before
1422# the final "exit 0" which appears at the end of `config.status'.
1423<config.status sed -e 's/^exit 0$//' >config.new
1424echo $makefile_command >>config.new
1425echo exit 0 >>config.new
1426mv -f config.new config.status
1427chmod +x config.status
1428# Don't let the fact that we just rewrote config.status make Makefile think
1429# that it is now newer. We have just rewritten all of the Makefiles as well.
1430MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile oldXMenu/Makefile"
1431for file in $MFS; do
1432 chmod a+w $file; touch $file; chmod 444 $file
1433done
1434exit 0
1435]
1436