diff options
| author | Brian Fox | 1993-10-05 00:54:01 +0000 |
|---|---|---|
| committer | Brian Fox | 1993-10-05 00:54:01 +0000 |
| commit | 1052acbf95d1767a2dcc9571768f5e8e79a79b51 (patch) | |
| tree | b4a0a4a641f8b61ba400807eab7566a01b4f8dca | |
| parent | 276d56c25441d4fde8a61f003a8505b8902eb919 (diff) | |
| download | emacs-1052acbf95d1767a2dcc9571768f5e8e79a79b51.tar.gz emacs-1052acbf95d1767a2dcc9571768f5e8e79a79b51.zip | |
Make sure that config.status contains the correct commands for
rebuilding src/Makefile.
| -rwxr-xr-x | configure1.in | 66 |
1 files changed, 49 insertions, 17 deletions
diff --git a/configure1.in b/configure1.in index e9564be49c0..6414e99e89c 100755 --- a/configure1.in +++ b/configure1.in | |||
| @@ -212,7 +212,7 @@ Set it to either \`yes' or \`no'." | |||
| 212 | echo "${short_usage}") >&2 | 212 | echo "${short_usage}") >&2 |
| 213 | exit 1 | 213 | exit 1 |
| 214 | fi | 214 | fi |
| 215 | val="$1"; shift | 215 | val="$1"; shift |
| 216 | fi | 216 | fi |
| 217 | srcdir="${val}" | 217 | srcdir="${val}" |
| 218 | ;; | 218 | ;; |
| @@ -256,6 +256,12 @@ Set it to either \`yes' or \`no'." | |||
| 256 | run_in_place=1 | 256 | run_in_place=1 |
| 257 | ;; | 257 | ;; |
| 258 | 258 | ||
| 259 | ## Should this use the "single tree" configuration? | ||
| 260 | "single_tree" ) | ||
| 261 | run_in_place= | ||
| 262 | single_tree=1 | ||
| 263 | ;; | ||
| 264 | |||
| 259 | ## Has the user specified one of the path options? | 265 | ## Has the user specified one of the path options? |
| 260 | prefix | exec_prefix | bindir | libdir | etcdir | datadir | \ | 266 | prefix | exec_prefix | bindir | libdir | etcdir | datadir | \ |
| 261 | archlibdir | statedir | mandir | infodir | lispdir | lockdir | \ | 267 | archlibdir | statedir | mandir | infodir | lispdir | lockdir | \ |
| @@ -999,7 +1005,7 @@ AC_PROG_YACC | |||
| 999 | dnl checks for UNIX variants that set `DEFS' | 1005 | dnl checks for UNIX variants that set `DEFS' |
| 1000 | 1006 | ||
| 1001 | dnl checks for header files | 1007 | dnl checks for header files |
| 1002 | AC_HAVE_HEADERS(sys/timeb.h sys/time.h) | 1008 | AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h) |
| 1003 | AC_STDC_HEADERS | 1009 | AC_STDC_HEADERS |
| 1004 | AC_TIME_WITH_SYS_TIME | 1010 | AC_TIME_WITH_SYS_TIME |
| 1005 | 1011 | ||
| @@ -1019,7 +1025,6 @@ AC_LONG_FILE_NAMES | |||
| 1019 | dnl other checks for UNIX variants | 1025 | dnl other checks for UNIX variants |
| 1020 | [ | 1026 | [ |
| 1021 | 1027 | ||
| 1022 | |||
| 1023 | #### Choose a window system. | 1028 | #### Choose a window system. |
| 1024 | echo "Checking window system." | 1029 | echo "Checking window system." |
| 1025 | 1030 | ||
| @@ -1392,18 +1397,45 @@ test -n "${prefix}" && | |||
| 1392 | test -n "${exec_prefix}" && | 1397 | test -n "${exec_prefix}" && |
| 1393 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | 1398 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` |
| 1394 | ] | 1399 | ] |
| 1395 | AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in, [ | 1400 | AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) [ |
| 1396 | # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done | 1401 | # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done |
| 1397 | # after src/config.h is built, since we rely on that file. | 1402 | # after src/config.h is built, since we rely on that file. Only do the |
| 1398 | echo creating src/Makefile | 1403 | # build if "config.status" is present, since it's non-presence indicates |
| 1399 | ( cd src | 1404 | # an error occured. |
| 1400 | rm -f junk.c | 1405 | status=$? |
| 1401 | cp Makefile.in junk.c | 1406 | if [ ! -f ./config.status ]; then |
| 1402 | ${CPP} -I. -I${top_srcdir}/src ${CPPFLAGS} junk.c | | 1407 | exit $status |
| 1403 | sed -e 's/^#.*$//' -e '/^[ ]*$/d' -e 's/^ / /' > Makefile.new | 1408 | fi |
| 1404 | # There is a window of lossage if you mv Makefile.new before chmoding it. | 1409 | topsrcdir=${srcdir} |
| 1405 | chmod 444 Makefile.new | 1410 | makefile_command='echo "creating src/Makefile"; |
| 1406 | mv -f Makefile.new Makefile | 1411 | topsrcdir='"${topsrcdir}"'; |
| 1407 | rm -f junk.c | 1412 | ( cd ./src; |
| 1408 | ) | 1413 | cp Makefile.in junk.c; |
| 1409 | ]) | 1414 | eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; |
| 1415 | < junk.cpp '\ | ||
| 1416 | ' sed -e '\''s/^#.*//'\'' '\ | ||
| 1417 | ' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\ | ||
| 1418 | ' -e '\''s/^ / /'\'' '\ | ||
| 1419 | ' | sed -n -e '\''/^..*$/p'\'' '\ | ||
| 1420 | ' > Makefile.new; | ||
| 1421 | chmod 444 Makefile.new; | ||
| 1422 | mv -f Makefile.new Makefile; | ||
| 1423 | rm -f junk.c junk.cpp; | ||
| 1424 | )' | ||
| 1425 | eval `echo $makefile_command` | ||
| 1426 | # AC-OUTPUT has created `config.status' already. We need to add the above | ||
| 1427 | # commands to re-create `src/Makefile', and we need to insert them before | ||
| 1428 | # the final "exit 0" which appears at the end of `config.status'. | ||
| 1429 | <config.status sed -e 's/^exit 0$//' >config.new | ||
| 1430 | echo $makefile_command >>config.new | ||
| 1431 | echo exit 0 >>config.new | ||
| 1432 | mv -f config.new config.status | ||
| 1433 | chmod +x config.status | ||
| 1434 | # Don't let the fact that we just rewrote config.status make Makefile think | ||
| 1435 | # that it is now newer. We have just rewritten all of the Makefiles as well. | ||
| 1436 | MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile oldXMenu/Makefile" | ||
| 1437 | for file in $MFS; do | ||
| 1438 | chmod a+w $file; touch $file; chmod 444 $file | ||
| 1439 | done | ||
| 1440 | exit 0 | ||
| 1441 | ] | ||