# HG changeset patch # User Roland McGrath # Date 749683131 0 # Node ID 71aeda5d1b6ee0ea70d66e2cc1e220cf3b52ee3d # Parent f29e05dc032fae35195184e47c7f85eb459ecdc7 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. diff -r f29e05dc032f -r 71aeda5d1b6e configure1.in --- a/configure1.in Sun Oct 03 20:43:37 1993 +0000 +++ b/configure1.in Sun Oct 03 21:18:51 1993 +0000 @@ -1389,48 +1389,18 @@ test -n "${exec_prefix}" && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` ] -AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) -[ +AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in, [ # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done -# after src/config.h is built, since we rely on that file. Only do the -# build if "config.status" is present, since it's non-presence indicates -# an error occured. -status=$? -if [ ! -f ./config.status ]; then - exit $status -fi -topsrcdir=${srcdir} -makefile_command='echo "creating src/Makefile"; - topsrcdir='"${topsrcdir}"'; -( cd ./src; - cp Makefile.in junk.c; - eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; - < junk.cpp '\ -' sed -e '\''s/^#.*//'\'' '\ -' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\ -' -e '\''s/^ / /'\'' '\ -' | sed -n -e '\''/^..*$/p'\'' '\ -' > Makefile.new; - : 'There is a window of lossage if you mv Makefile.new before chmoding it.' - chmod 444 Makefile.new; - mv -f Makefile.new Makefile; - rm -f junk.c junk.cpp; -)' -eval `echo $makefile_command` -# AC-OUTPUT has created `config.status' already. We need to add the above -# commands to re-create `src/Makefile', and we need to insert them before -# the final "exit 0" which appears at the end of `config.status'. -config.new -echo $makefile_command >>config.new -echo exit 0 >>config.new -mv -f config.new config.status -chmod +x config.status -# Don't let the fact that we just rewrote config.status make Makefile think -# that it is now newer. We have just rewritten all of the Makefiles as well. -MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile oldXMenu/Makefile" -for file in $MFS; do - chmod a+w $file; touch $file; chmod 444 $file -done -exit 0 -] - +# after src/config.h is built, since we rely on that file. +echo creating src/Makefile +( cd src + rm -f junk.c + cp Makefile.in junk.c + ${CPP} -I. -I${top_srcdir}/src ${CPPFLAGS} junk.c | + sed -e 's/^#.*$//' -e '/^[ ]*$/d' -e 's/^ / /' > Makefile.new + # There is a window of lossage if you mv Makefile.new before chmoding it. + chmod 444 Makefile.new + mv -f Makefile.new Makefile + rm -f junk.c +) +])