This file contains diffs from version 3.65 of GNU Make to version 3.67. Changes in files that are generated by etags and TeX have been omitted. diff -ruN make-3.65/ChangeLog make-3.67/ChangeLog --- make-3.65/ChangeLog Sun May 9 15:41:34 1993 +++ make-3.67/ChangeLog Sat May 22 21:00:00 1993 @@ -1,3 +1,62 @@ +Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.67. + + * file.c (remove_intermediates): Don't write extra space after `rm'. + + * main.c (struct command_switch.type): Remove `usage_and_exit'. + (print_usage_flag): New variable. + (switches: --help): Make type `flag', to set print_usage_flag. + (init_switches): Remove `usage_and_exit' case. + (decode_switches): Likewise. + (decode_switches): Print usage if print_usage_flag is set. + When printing usage, die with status of BAD. + (main): Die with 0 if print_version_flag. + +Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.66. + +Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * compatMakefile (installdirs): New target. + (install): Depend on it. + +Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.65.2. + +Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0, + set LASTPATH to PATH, not NEXT. + + * dir.c (read_dirstream): Break out of loop after incrementing + DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to + dereference DS->contents->files[DIRFILE_BUCKETS]. + + * read.c (read_makefile): Clear no_targets after reading a + targetful rule line. + + * main.c (main): If print_version_flag is set, exit after printing + the version. + (switches): Change --version docstring to say it exits. + + * make.h [butterfly]: #undef POSIX. + +Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.65.1. + + * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME. + [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero. + + * function.c (handle_function): Use fatal instead of + makefile_fatal when reading_filename is nil. + + * configure.in: Add AC_GETGROUPS_T. + * job.c (search_path): Use GETGROUPS_T in place of gid_t. + Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Version 3.65. diff -ruN make-3.65/INSTALL make-3.67/INSTALL --- make-3.65/INSTALL Fri Jan 22 12:16:53 1993 +++ make-3.67/INSTALL Fri May 14 19:31:53 1993 @@ -33,11 +33,12 @@ DIR is the directory that contains the source code. By default, `make install' will install the package's files in -/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify -an installation prefix other than /usr/local by giving `configure' the -option `--prefix=PATH'. Alternately, you can do so by giving a value +/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify an +installation prefix other than /usr/local by giving `configure' the option +`--prefix=PATH'. Alternately, you can do so by consistently giving a value for the `prefix' variable when you run `make', e.g., make prefix=/usr/gnu + make prefix=/usr/gnu install You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If diff -ruN make-3.65/Makefile.in make-3.67/Makefile.in --- make-3.65/Makefile.in Sun May 9 15:46:58 1993 +++ make-3.67/Makefile.in Sat May 22 21:02:06 1993 @@ -1,3 +1,6 @@ +# NOTE: If you have no `make' program at all to process this makefile, run +# `build.sh' instead. +# # Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. # This file is part of GNU Make. # @@ -173,9 +176,13 @@ tags: $(tagsrcs) $(CTAGS) $(tagsrcs) -.PHONY: install -install: $(bindir)/$(instname) $(infodir)/$(instname).info \ +.PHONY: install installdirs +install: installdirs \ + $(bindir)/$(instname) $(infodir)/$(instname).info \ $(mandir)/$(instname).$(manext) + +installdirs: + $(SHELL) ${srcdir}/mkinstalldirs $(bindir)/$(instname): make $(INSTALL_PROGRAM) make $@.new diff -ruN make-3.65/NEWS make-3.67/NEWS --- make-3.65/NEWS Sun May 9 15:43:00 1993 +++ make-3.67/NEWS Fri May 14 17:50:04 1993 @@ -5,6 +5,11 @@ Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. +Version 3.66 + +* The `make --version' (or `make -v') now exits immediately after printing + the version number. + Version 3.65 * Make now supports long-named members in `ar' archive files. diff -ruN make-3.65/README make-3.67/README --- make-3.65/README Sun May 9 15:46:57 1993 +++ make-3.67/README Sat May 22 21:01:24 1993 @@ -1,4 +1,4 @@ -This directory contains the 3.65 test release of GNU Make. +This directory contains the 3.67 test release of GNU Make. All bugs reported for previous test releases have been fixed. Some bugs surely remain. @@ -9,6 +9,10 @@ build the program, type `sh build.sh'. This should compile the program in the current directory. Then you will have a Make program that you can use for `make install', or whatever else. + +It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such +that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. +It is said that using `cc' without `-O' does work. See the file NEWS for what has changed since previous releases. diff -ruN make-3.65/alloca.c make-3.67/alloca.c --- make-3.65/alloca.c Sat May 8 13:42:29 1993 +++ make-3.67/alloca.c Fri May 21 19:39:17 1993 @@ -5,6 +5,7 @@ which is used to allocate space off the run-time stack so that it is automatically reclaimed upon procedure exit, was inspired by discussions with J. Q. Johnson of Cornell. + J.Otto Tennant contributed the Cray support. There are some preprocessor constants that can be defined when compiling for your specific system, for @@ -41,10 +42,6 @@ #endif /* static */ #endif /* emacs */ -#ifdef emacs -#define free xfree -#endif - /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ @@ -63,8 +60,6 @@ #define NULL 0 -extern pointer xmalloc (); - /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. @@ -180,7 +175,7 @@ /* Allocate combined header + user data storage. */ { - register pointer new = xmalloc (sizeof (header) + size); + register pointer new = malloc (sizeof (header) + size); /* Address of header. */ ((header *) new)->h.next = last_alloca_header; diff -ruN make-3.65/arscan.c make-3.67/arscan.c --- make-3.65/arscan.c Mon May 3 17:03:37 1993 +++ make-3.67/arscan.c Wed May 12 17:05:03 1993 @@ -82,9 +82,10 @@ { #ifdef AIAMAG FL_HDR fl_header; +#else + int long_name = 0; #endif char *namemap = 0; - int long_name = 0; register int desc = open (archive, O_RDONLY, 0); if (desc < 0) return -1; @@ -191,8 +192,6 @@ name[name_len] = 0; - long_name = 1; - sscanf (member_header.ar_date, "%12ld", &dateval); sscanf (member_header.ar_uid, "%12d", &uidval); sscanf (member_header.ar_gid, "%12d", &gidval); @@ -203,7 +202,8 @@ ++data_offset; fnval = - (*function) (desc, name, member_offset, data_offset, eltsize, + (*function) (desc, name, 0, + member_offset, data_offset, eltsize, dateval, uidval, gidval, eltmode, arg); diff -ruN make-3.65/config.h.in make-3.67/config.h.in --- make-3.65/config.h.in Sun May 9 15:58:36 1993 +++ make-3.67/config.h.in Sat May 22 21:02:24 1993 @@ -105,6 +105,10 @@ */ #undef STACK_DIRECTION +/* Define to the type of elements in the array set by `getgroups'. + Usually this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + /* Define to the name of the SCCS `get' command. */ #undef SCCS_GET diff -ruN make-3.65/configure make-3.67/configure --- make-3.65/configure Sun May 9 15:54:09 1993 +++ make-3.67/configure Sat May 22 21:01:41 1993 @@ -80,6 +80,11 @@ trap 'rm -f conftest* core; exit 1' 1 3 15 +# Needed for some versions of `tr' so that character classes in `[]' work. +if test "${LANG+set}" = "set" ; then + LANG=C +fi + rm -f conftest* compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' @@ -120,10 +125,10 @@ test -z "$LDFLAGS" && LDFLAGS=-g if test -z "$CC"; then - echo checking for gcc - IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" # Extract the first word of `gcc', so it can be a program name with args. set dummy gcc; word=$2 + echo checking for $word + IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/$word; then @@ -152,9 +157,9 @@ # /usr/sbin/install, which might be in PATH before a BSD-like install, # or the SunOS /usr/etc/install directory, or the AIX /bin/install, # or the AFS install, which mishandles nonexistent args, or -# /usr/ucb/install on SVR4 (which tries to use the nonexistent group +# /usr/ucb/install on SVR4, which tries to use the nonexistent group # `staff'. On most BSDish systems install is in /usr/bin, not /usr/ucb -# anyway). Sigh. +# anyway. Sigh. if test "z${INSTALL}" = "z" ; then echo checking for install IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" @@ -189,10 +194,10 @@ INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'} if test -z "$RANLIB"; then - echo checking for ranlib - IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" # Extract the first word of `ranlib', so it can be a program name with args. set dummy ranlib; word=$2 + echo checking for $word + IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/$word; then @@ -202,7 +207,7 @@ done IFS="$saveifs" fi -test -z "$RANLIB" && RANLIB="@:" +test -z "$RANLIB" && RANLIB=":" test -n "$RANLIB" -a -n "$verbose" && echo " setting RANLIB to $RANLIB" echo checking how to run the C preprocessor @@ -211,7 +216,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then : else @@ -226,7 +231,7 @@ #endif EOF -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then { test -n "$verbose" && \ @@ -268,7 +273,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then MINIX=1 fi @@ -315,11 +320,11 @@ #include #include EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. echo '#include ' > conftest.c -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "memchr" conftest.out >/dev/null 2>&1; then # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.c < conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -466,7 +471,7 @@ cat > conftest.c < #include <$dirheader> -int closedir(); main() { exit(0); } +int closedir(); main() { exit(closedir(opendir(".")) != 0); } EOF eval $compile if test -s conftest && (./conftest; exit) 2>/dev/null; then @@ -487,7 +492,7 @@ echo checking for uid_t in sys/types.h echo '#include ' > conftest.c -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "uid_t" conftest.out >/dev/null 2>&1; then : else @@ -512,9 +517,59 @@ fi rm -f conftest* - echo checking for pid_t in sys/types.h + echo checking for type of array argument to getgroups +prog='/* Thanks to Mike Rendell for this test. */ +#include +#define NGID 256 +#undef MAX +#define MAX(x,y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +}' +cat > conftest.c </dev/null; then + { +test -n "$verbose" && \ +echo ' defining' GETGROUPS_T to be 'gid_t' +DEFS="$DEFS -DGETGROUPS_T=gid_t" +SEDDEFS="${SEDDEFS}\${SEDdA}GETGROUPS_T\${SEDdB}GETGROUPS_T\${SEDdC}gid_t\${SEDdD} +\${SEDuA}GETGROUPS_T\${SEDuB}GETGROUPS_T\${SEDuC}gid_t\${SEDuD} +\${SEDeA}GETGROUPS_T\${SEDeB}GETGROUPS_T\${SEDeC}gid_t\${SEDeD} +" +} + +else + { +test -n "$verbose" && \ +echo ' defining' GETGROUPS_T to be 'int' +DEFS="$DEFS -DGETGROUPS_T=int" +SEDDEFS="${SEDDEFS}\${SEDdA}GETGROUPS_T\${SEDdB}GETGROUPS_T\${SEDdC}int\${SEDdD} +\${SEDuA}GETGROUPS_T\${SEDuB}GETGROUPS_T\${SEDuC}int\${SEDuD} +\${SEDeA}GETGROUPS_T\${SEDeB}GETGROUPS_T\${SEDeC}int\${SEDeD} +" +} + +fi +rm -f conftest* + +echo checking for pid_t in sys/types.h echo '#include ' > conftest.c -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "pid_t" conftest.out >/dev/null 2>&1; then : else @@ -575,7 +630,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -704,7 +759,7 @@ trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` echo checking for ${func} cat > conftest.c < +#include int main() { exit(0); } int t() { /* The GNU C library defines this for functions which it implements @@ -780,19 +835,19 @@ else alloca_missing=1 cat > conftest.c </dev/null; then +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" +if egrep "winnitude" conftest.out >/dev/null 2>&1; then echo checking for _getb67 cat > conftest.c < +#include int main() { exit(0); } int t() { /* The GNU C library defines this for functions which it implements @@ -820,7 +875,7 @@ else echo checking for GETB67 cat > conftest.c < +#include int main() { exit(0); } int t() { /* The GNU C library defines this for functions which it implements @@ -848,7 +903,7 @@ else echo checking for getb67 cat > conftest.c < +#include int main() { exit(0); } int t() { /* The GNU C library defines this for functions which it implements @@ -885,6 +940,7 @@ fi rm -f conftest* + fi rm -f conftest* @@ -930,7 +986,7 @@ if (addr == 0) { addr = &dummy; - find_stack_direction (); + return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; @@ -972,7 +1028,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1200,7 +1256,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1220,7 +1276,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1242,7 +1298,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1283,7 +1339,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1313,7 +1369,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1337,7 +1393,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1359,7 +1415,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1403,7 +1459,7 @@ Yowza Am I SETGID yet #endif EOF -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "Yowza Am I SETGID yet" conftest.out >/dev/null 2>&1; then { test -n "$verbose" && \ @@ -1460,7 +1516,7 @@ cat > conftest.c < EOF -err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` if test -z "$err"; then { test -n "$verbose" && \ @@ -1480,7 +1536,7 @@ trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` echo checking for ${func} cat > conftest.c < +#include int main() { exit(0); } int t() { /* The GNU C library defines this for functions which it implements @@ -1572,7 +1628,7 @@ #endif EOF -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then SEQUENT=1 fi @@ -1588,7 +1644,7 @@ #endif EOF -eval "$CPP $DEFS conftest.c > conftest.out 2>&1" +eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" if egrep "yes" conftest.out >/dev/null 2>&1; then XENIX=1 fi @@ -1595,16 +1651,6 @@ rm -f conftest* if test -n "$XENIX"; then - { -test -n "$verbose" && \ -echo ' defining' VOID_CLOSEDIR -DEFS="$DEFS -DVOID_CLOSEDIR=1" -SEDDEFS="${SEDDEFS}\${SEDdA}VOID_CLOSEDIR\${SEDdB}VOID_CLOSEDIR\${SEDdC}1\${SEDdD} -\${SEDuA}VOID_CLOSEDIR\${SEDuB}VOID_CLOSEDIR\${SEDuC}1\${SEDuD} -\${SEDeA}VOID_CLOSEDIR\${SEDeB}VOID_CLOSEDIR\${SEDeC}1\${SEDeD} -" -} - LIBS="$LIBS -lx" case "$DEFS" in *SYSNDIR*) ;; @@ -1655,6 +1701,7 @@ s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\ exec_prefix\\1=\\2$exec_prefix%" fi +DEFS="`echo \"$DEFS\" | sed 's%[&\\\]%\\\&%g'`" trap 'rm -f config.status; exit 1' 1 3 15 echo creating config.status @@ -1700,7 +1747,11 @@ cat >> config.status <<\EOF top_srcdir=$srcdir -for file in .. Makefile build.sh glob/Makefile; do if [ "x$file" != "x.." ]; then + +# Allow make-time overrides of the generated file list. +test -n "$gen_files" || gen_files="Makefile build.sh glob/Makefile" + +for file in .. $gen_files; do if [ "x$file" != "x.." ]; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` @@ -1730,7 +1781,8 @@ s%@srcdir@%$srcdir%g s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file fi; done -echo creating config.h +test -n "$gen_config" || gen_config=config.h +echo creating $gen_config # These sed commands are put into SEDDEFS when defining a macro. # They are broken into pieces to make the sed script easier to manage. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME @@ -1794,7 +1846,7 @@ rm -f conftest.h # Break up the sed commands because old seds have small limits. maxsedlines=20 -cp $top_srcdir/config.h.in conftest.h1 +cp $top_srcdir/$gen_config.in conftest.h1 while : do lines=`grep -c . conftest.sed` @@ -1808,15 +1860,15 @@ mv conftest.s2 conftest.sed done rm -f conftest.sed conftest.h -echo "/* config.h. Generated automatically by configure. */" > conftest.h +echo "/* $gen_config. Generated automatically by configure. */" > conftest.h cat conftest.h1 >> conftest.h rm -f conftest.h1 -if cmp -s config.h conftest.h 2>/dev/null; then +if cmp -s $gen_config conftest.h 2>/dev/null; then # The file exists and we would not be changing it. rm -f conftest.h else - rm -f config.h - mv conftest.h config.h + rm -f $gen_config + mv conftest.h $gen_config fi diff -ruN make-3.65/configure.in make-3.67/configure.in --- make-3.65/configure.in Thu Apr 15 20:54:50 1993 +++ make-3.67/configure.in Wed May 12 15:24:14 1993 @@ -17,6 +17,7 @@ AC_UNISTD_H AC_DIR_HEADER AC_UID_T dnl Also does gid_t. +AC_GETGROUPS_T AC_PID_T AC_RETSIGTYPE AC_HAVE_HEADERS(limits.h sys/param.h fcntl.h string.h memory.h) diff -ruN make-3.65/dir.c make-3.67/dir.c --- make-3.65/dir.c Mon Apr 12 16:51:44 1993 +++ make-3.67/dir.c Fri May 14 18:41:07 1993 @@ -543,7 +543,9 @@ if (!df->impossible) return df->name; } - ds->elt = ds->contents->files[++ds->bucket]; + if (++ds->bucket == DIRFILE_BUCKETS) + break; + ds->elt = ds->contents->files[ds->bucket]; } return 0; diff -ruN make-3.65/file.c make-3.67/file.c --- make-3.65/file.c Wed Mar 10 15:24:57 1993 +++ make-3.67/file.c Sat May 22 16:24:37 1993 @@ -336,12 +336,13 @@ error ("*** Deleting file `%s'", f->name); else if (!silent_flag) { - if (!doneany) + if (! doneany) { fputs ("rm ", stdout); doneany = 1; } - putchar (' '); + else + putchar (' '); fputs (f->name, stdout); fflush (stdout); } diff -ruN make-3.65/function.c make-3.67/function.c --- make-3.65/function.c Fri May 7 18:34:49 1993 +++ make-3.67/function.c Wed May 12 15:44:41 1993 @@ -1120,9 +1120,15 @@ } if (count >= 0) - makefile_fatal (reading_filename, *reading_lineno_ptr, - "unterminated call to function `%s': missing `%c'", - function_table[code].name, closeparen); + { + static const char errmsg[] + = "unterminated call to function `%s': missing `%c'"; + if (reading_filename == 0) + fatal (errmsg, function_table[code].name, closeparen); + else + makefile_fatal (reading_filename, *reading_lineno_ptr, errmsg, + function_table[code].name, closeparen); + } /* We found the end; expand the function call. */ diff -ruN make-3.65/getloadavg.c make-3.67/getloadavg.c --- make-3.65/getloadavg.c Sun May 9 15:21:25 1993 +++ make-3.67/getloadavg.c Thu May 20 16:22:34 1993 @@ -31,6 +31,7 @@ the nlist n_name element is a pointer, not an array. NLIST_NAME_UNION struct nlist has an n_un member, not n_name. + LINUX_LDAV_FILE [LINUX]: Name of file containing load averages. Specific system predefines this file uses, aside from setting default values if not emacs: @@ -48,6 +49,8 @@ UMAX UMAX4_3 VMS + LINUX Linux: assumes /proc filesystem mounted. + Support from Michael K. Johnson. In addition, to avoid nesting many #ifdefs, we internally set LDAV_DONE to indicate that the load average has been computed. @@ -125,6 +128,11 @@ #define OSF_ALPHA #endif +#if defined (__osf__) && (defined (mips) || defined (__mips__)) +#define OSF_MIPS +#include +#endif + /* UTek's /bin/cc on the 4300 has no architecture specific cpp define by default, but _MACH_IND_SYS_TYPES is defined in . Combine that with a couple of other things and we'll have a unique match. */ @@ -170,7 +178,7 @@ #endif /* VAX C can't handle multi-line #ifs. */ -#if !defined(NLIST_STRUCT) && (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(hpux) || defined(_SEQUENT_) || defined(sequent) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined (OSF_ALPHA) || (defined (ardent) && defined (titan)) || defined (tek4300)) +#if !defined(NLIST_STRUCT) && (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(hpux) || defined(_SEQUENT_) || defined(sequent) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined (OSF_ALPHA) || (defined (ardent) && defined (titan)) || defined (tek4300) || defined (butterfly)) #define NLIST_STRUCT #endif @@ -347,6 +355,38 @@ { int elem = 0; /* Return value. */ +#if !defined (LDAV_DONE) && defined (LINUX) +#define LDAV_DONE +#undef LOAD_AVE_TYPE + +#ifndef LINUX_LDAV_FILE +#define LINUX_LDAV_FILE "/proc/loadavg" +#endif + + char ldavgbuf[40]; + double load_ave[3]; + int fd, count; + + fd = open (LINUX_LDAV_FILE, O_RDONLY); + if (fd == -1) + return -1; + count = read (fd, ldavgbuf, 40); + (void) close (fd); + if (count <= 0) + return -1; + + count = sscanf (ldavgbuf, "%lf %lf %lf", + &load_ave[0], &load_ave[1], &load_ave[2]); + if (count < 1) + return -1; + + for (elem = 0; elem < nelem && elem < count; elem++) + loadavg[elem] = load_ave[elem]; + + return elem; + +#endif /* LINUX */ + #if !defined (LDAV_DONE) && defined (NeXT) #define LDAV_DONE /* The NeXT code was adapted from iscreen 3.2. */ @@ -497,6 +537,17 @@ if (nelem > 2) loadavg[elem++] = load_ave[2] / 65536.0; #endif /* apollo */ + +#if !defined (LDAV_DONE) && defined (OSF_MIPS) +#define LDAV_DONE +#define LDAV_PRIVILEGED + + struct tbl_loadavg load_ave; + table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); + loadavg[elem++] = (load_ave.tl_lscale == 0 + ? load_ave.tl_avenrun.d[0] + : (load_ave.tl_avenrun.l[0] / load_ave.tl_lscale)); +#endif /* OSF_MIPS */ #if !defined (LDAV_DONE) && defined (VMS) /* VMS specific code -- read from the Load Ave driver. */ diff -ruN make-3.65/glob/glob.c make-3.67/glob/glob.c --- make-3.65/glob/glob.c Sun May 9 16:00:12 1993 +++ make-3.67/glob/glob.c Sat May 22 21:02:36 1993 @@ -43,6 +43,15 @@ #include #endif +#ifdef HAVE_UNISTD_H +#include +#ifndef POSIX +#ifdef _POSIX_VERSION +#define POSIX +#endif +#endif +#endif + #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) extern int errno; #endif @@ -79,10 +88,6 @@ #else #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) #endif /* POSIX */ - -#ifdef HAVE_UNISTD_H -#include -#endif #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)) #include diff -ruN make-3.65/job.c make-3.67/job.c --- make-3.65/job.c Thu May 6 17:30:10 1993 +++ make-3.67/job.c Wed May 12 15:20:45 1993 @@ -975,15 +975,15 @@ #endif static int ngroups = -1; #ifdef NGROUPS_MAX - static gid_t groups[NGROUPS_MAX]; + static GETGROUPS_T groups[NGROUPS_MAX]; #define ngroups_max NGROUPS_MAX #else - static gid_t *groups = 0; + static GETGROUPS_T *groups = 0; static int ngroups_max; if (groups == 0) { ngroups_max = GET_NGROUPS_MAX; - groups = (gid_t *) malloc (ngroups_max * sizeof (gid_t)); + groups = (GETGROUPS_T *) malloc (ngroups_max * sizeof (GETGROUPS_T)); } #endif if (groups != 0 && ngroups == -1) diff -ruN make-3.65/main.c make-3.67/main.c --- make-3.65/main.c Mon Apr 26 16:05:02 1993 +++ make-3.67/main.c Sat May 22 16:20:16 1993 @@ -91,8 +91,7 @@ string, /* One string per switch. */ positive_int, /* A positive integer. */ floating, /* A floating-point number (double). */ - ignore, /* Ignored. */ - usage_and_exit /* Ignored; exit after processing switches. */ + ignore /* Ignored. */ } type; char *value_ptr; /* Pointer to the value-holding variable. */ @@ -219,6 +218,10 @@ /* List of files given with -W switches. */ static struct stringlist *new_files = 0; + +/* If nonzero, we should just print usage and exit. */ + +static int print_usage_flag = 0; /* The table of command switches. */ @@ -239,7 +242,7 @@ { 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0, "file", "FILE", "Read FILE as a makefile" }, - { 'h', usage_and_exit, 0, 0, 0, 0, 0, 0, + { 'h', flag, (char *) &print_usage_flag, 0, 0, 0, 0, 0, "help", 0, "Print this message and exit" }, { 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0, @@ -290,7 +293,7 @@ "Touch targets instead of remaking them" }, { 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0, "version", 0, - "Print the version number of make" }, + "Print the version number of make and exit" }, { 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0, "print-directory", 0, "Print the current directory" }, @@ -498,6 +501,10 @@ if (print_version_flag || print_data_base_flag || debug_flag) print_version (); + /* `make --version' is supposed to just print the version and exit. */ + if (print_version_flag) + die (0); + /* Search for command line arguments that define variables, and do the definitions. Also save up the text of these arguments in CMD_DEFS so we can put them into the values @@ -1081,7 +1088,6 @@ case flag: case flag_off: case ignore: - case usage_and_exit: long_options[i].has_arg = no_argument; break; @@ -1169,10 +1175,6 @@ case ignore: break; - case usage_and_exit: - bad = 1; - break; - case flag: case flag_off: if (doit) @@ -1265,7 +1267,7 @@ other_args->list[other_args->idx] = 0; } - if (bad && !env) + if (!env && (bad || print_usage_flag)) { /* Print a nice usage message. */ @@ -1351,7 +1353,7 @@ buf, cs->description); } - die (1); + die (bad); } } diff -ruN make-3.65/make-stds.texi make-3.67/make-stds.texi --- make-3.65/make-stds.texi Thu Apr 8 12:40:51 1993 +++ make-3.67/make-stds.texi Sat May 15 17:26:30 1993 @@ -253,6 +253,28 @@ Perform installation tests (if any). The user must build and install the program before running the tests. You should not assume that @file{$(bindir)} is in the search path. + +@item installdirs +It's useful to add a target named @samp{installdirs} to create the +directories where files are installed, and their parent directories. +You can use a rule like this: + +@example +# Make sure all installation directories, e.g. $(bindir) actually exist by +# making them if necessary. +installdirs: + for file in $(bindir) $(datadir) $(libdir) $(infodir) $(mandir) ; do \ + oIFS="$$@{IFS@}"; IFS='/'; set - $$@{file@}; IFS="$$@{oIFS@}"; \ + pathcomp=''; test ".$$@{1@}" = "." && shift; \ + while test $$# -ne 0 ; do \ + pathcomp="$$@{pathcomp@}/$$@{1@}"; shift; \ + if test ! -d "$$@{pathcomp@}"; then \ + echo "making directory $$pathcomp" 1>&2 ; \ + mkdir "$$@{pathcomp@}"; \ + fi; \ + done; \ + done +@end example @end table @node Command Variables diff -ruN make-3.65/make.h make-3.67/make.h --- make-3.65/make.h Thu May 6 17:30:40 1993 +++ make-3.67/make.h Fri May 14 16:40:38 1993 @@ -55,6 +55,12 @@ #endif #endif +#ifdef butterfly +/* The BBN Butterfly has that defines _POSIX_VERSION, + but isn't really a POSIX.1 system. */ +#undef POSIX +#endif + #if !defined (HAVE_SYS_SIGLIST) && defined (HAVE__SYS_SIGLIST) #define sys_siglist _sys_siglist #define HAVE_SYS_SIGLIST /* Now we have it. */ diff -ruN make-3.65/make.man make-3.67/make.man --- make-3.65/make.man Mon Mar 8 13:38:35 1993 +++ make-3.67/make.man Wed May 19 13:56:38 1993 @@ -127,10 +127,6 @@ .BR "\-C " /etc. This is typically used with recursive invocations of .IR make . -.B \-e -Give variables taken from the environment precedence -over variables from makefiles. -.TP 0.5i .TP 0.5i .B \-d Print debugging information in addition to normal processing. @@ -140,6 +136,10 @@ considered and which are applied---everything interesting about how .I make decides what to do. +.TP 0.5i +.B \-e +Give variables taken from the environment precedence +over variables from makefiles. .TP 0.5i .BI "\-f " file Use diff -ruN make-3.65/make.texinfo make-3.67/make.texinfo --- make-3.65/make.texinfo Mon Apr 19 15:42:09 1993 +++ make-3.67/make.texinfo Sun May 16 20:24:00 1993 @@ -7,10 +7,10 @@ @c For publication, format makebook.texi instead of using this file directly. -@set EDITION 0.41 -@set VERSION 3.64 Beta -@set UPDATED 16 April 1993 -@set UPDATE-MONTH April 1993 +@set EDITION 0.42 +@set VERSION 3.66 Beta +@set UPDATED 14 May 1993 +@set UPDATE-MONTH May 1993 @c finalout @@ -436,7 +436,7 @@ @noindent Please include the version number of @code{make} you are using. You can -get this information with the command @samp{make --version -f /dev/null}. +get this information with the command @samp{make --version}. Be sure also to include the type of machine and operating system you are using. If possible, include the contents of the file @file{config.h} that is generated by the configuration process. @@ -6063,10 +6063,7 @@ @itemx --version @cindex @code{--version} Print the version of the @code{make} program plus a copyright, a list -of authors, and a notice that there is no warranty. After this -information is printed, continue processing normally. To get this -information without doing anything else, use -@w{@samp{make --version -f /dev/null}}. +of authors, and a notice that there is no warranty; then exit. @item -w @cindex @code{-w} diff -ruN make-3.65/mkinstalldirs make-3.67/mkinstalldirs --- make-3.65/mkinstalldirs +++ make-3.67/mkinstalldirs Sat May 22 20:14:19 1993 @@ -0,0 +1,33 @@ +#!/bin/sh +# Make directory hierarchy. +# Written by Noah Friedman +# Public domain. + +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +for file in ${1+"$@"} ; do + oIFS="${IFS}" + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS="${oIFS}" + test ".${1}" = "." && shift + + pathcomp='' + + while test $# -ne 0 ; do + pathcomp="${pathcomp}${1}" + shift + + if test ! -d "${pathcomp}"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "${pathcomp}" + fi + + pathcomp="${pathcomp}/" + done +done + +# eof diff -ruN make-3.65/read.c make-3.67/read.c --- make-3.65/read.c Mon May 3 17:14:22 1993 +++ make-3.67/read.c Wed May 19 17:15:51 1993 @@ -154,7 +154,7 @@ while (d->next != tail) d = d->next; - /* Use the storage read_filename allocates. */ + /* Use the storage read_makefile allocates. */ free (*makefiles); *makefiles = dep_name (d); ++num_makefiles; @@ -622,6 +622,9 @@ two_colon = *p2 == ':'; if (two_colon) p2++; + + /* We have some targets, so don't ignore the following commands. */ + no_targets = 0; /* Is this a static pattern rule: `target: %targ: %dep; ...'? */ p = index (p2, ':'); diff -ruN make-3.65/version.c make-3.67/version.c --- make-3.65/version.c Sun May 9 15:41:24 1993 +++ make-3.67/version.c Sat May 22 20:59:55 1993 @@ -1,4 +1,4 @@ -char *version_string = "3.65"; +char *version_string = "3.67"; /* Local variables: diff -ruN make-3.65/vpath.c make-3.67/vpath.c --- make-3.65/vpath.c Wed Mar 24 15:13:56 1993 +++ make-3.67/vpath.c Fri May 14 19:09:34 1993 @@ -147,7 +147,7 @@ free ((char *) path); } - lastpath = next; + lastpath = path; path = next; }