comparison configure1.in @ 4820:fdc2ebb95bed

Make sure that config.status contains the correct commands for rebuilding src/Makefile.
author Brian Fox <bfox@gnu.org>
date Tue, 05 Oct 1993 00:54:01 +0000
parents 682bab7525fb
children 17ff41a8348d
comparison
equal deleted inserted replaced
4819:22656ec8d019 4820:fdc2ebb95bed
210 (echo "${progname}: You must give a value for the \`--${optname}' option, as in 210 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
211 \`--${optname}=FOO'." 211 \`--${optname}=FOO'."
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 ;;
219 219
220 ## Has the user tried to tell us where the X files are? 220 ## Has the user tried to tell us where the X files are?
254 "run_in_place" ) 254 "run_in_place" )
255 single_tree= 255 single_tree=
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 | \
262 lisppath | locallisppath ) 268 lisppath | locallisppath )
263 ## If the value was omitted, get it from the next argument. 269 ## If the value was omitted, get it from the next argument.
997 AC_PROG_YACC 1003 AC_PROG_YACC
998 1004
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
1006 dnl checks for typedefs 1012 dnl checks for typedefs
1007 AC_RETSIGTYPE 1013 AC_RETSIGTYPE
1016 dnl checks for operating system services 1022 dnl checks for operating system services
1017 AC_LONG_FILE_NAMES 1023 AC_LONG_FILE_NAMES
1018 1024
1019 dnl other checks for UNIX variants 1025 dnl other checks for UNIX variants
1020 [ 1026 [
1021
1022 1027
1023 #### Choose a window system. 1028 #### Choose a window system.
1024 echo "Checking window system." 1029 echo "Checking window system."
1025 1030
1026 window_system='' 1031 window_system=''
1390 test -n "${prefix}" && 1395 test -n "${prefix}" &&
1391 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` 1396 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
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 ]