]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* Updates for automake 1.4 and autoconf 2.13
authorPaul Smith <psmith@gnu.org>
Fri, 19 Feb 1999 18:07:49 +0000 (18:07 +0000)
committerPaul Smith <psmith@gnu.org>
Fri, 19 Feb 1999 18:07:49 +0000 (18:07 +0000)
* Check for a libc version of GNU glob and, if found, don't use the local
  glob headers.
* Fix a bug in OpenVMS archive handling.
* Fix a bug in VMS siglist processing.

ChangeLog
Makefile.am
arscan.c
build.template
configure.in
read.c
signame.c

index 35f7e9a2fccd9ca5592d828eb1a7a48b4cd44888..cd2d73b1e196b5b7403917b8cf14a41c3c57a45b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+1999-02-19  Paul D. Smith  <psmith@gnu.org>
+
+       * configure.in: Check to see if the GNU glob library is already
+       installed on the system.  If so, _don't_ add -I./glob to the
+       compile line.  Using the system glob code with the local headers
+       is very bad mojo!
+       Rewrite SCCS macros to use more autoconf facilities.
+
+       * Makefile.am: Move -Iglob out of INCLUDES; it'll get added to
+       CPPFLAGS by configure now.
+       Automake 1.4 introduced its own "include" feature which conflicts
+       with the maintMakefile stuff.  A hack that seems to work is add a
+       space before the include :-/.
+
+       * build.template: Move -Iglob out of the compile line; it'll get
+       added to CPPFLAGS by configure now.
+
+1999-02-16  Glenn D. Wolf  <Glenn_Wolf@email.sps.mot.com>
+
+       * arscan.c (ar_scan): [VMS] Initialized VMS_member_date before
+       calling lbr$get_index since if the archive is empty,
+       VMS_get_member_info won't get called at all, and any leftover date
+       will be used.  This bug shows up if any member of any archive is
+       made, followed by a dependency check on a different, empty
+       archive.
+
+1998-11-30  Paul D. Smith  <psmith@gnu.org>
+
+       * signame.c (init_sig): Check the sizes of signals being set up to
+       avoid array overwrites (if the system headers have problems).
+
+1998-11-17  Paul D. Smith  <psmith@gnu.org>
+
+       * read.c (record_files): Clean up some indentation.
+
 1998-10-13  Paul D. Smith  <psmith@gnu.org>
 
        * job.c (new_job): If the command list resolves to empty (through
index ab1c1f187bf8064fbb9ffce7425e237500d7c862..3bfaf47c93f4f02e68fa51c532a64b2ff7507e26 100644 (file)
@@ -15,7 +15,7 @@ make_LDADD =  @LIBOBJS@ @ALLOCA@ glob/libglob.a
 info_TEXINFOS =        make.texinfo
 man_MANS =     make.1
 
-INCLUDES =     -I$(srcdir)/glob -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
+INCLUDES =     -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
 
 BUILT_SOURCES =        README build.sh.in
 
@@ -130,5 +130,7 @@ check-regression: all
 if MAINT_MAKEFILE
 # Note this requires GNU make.  Not to worry, since it will only be included
 # in the Makefile if we're in the maintainer's environment.
-include $(srcdir)/maintMakefile
+# Ulp!  Need a leading space to "hide" this include from automake's new (in
+# 1.4) include feature :(
+ include $(srcdir)/maintMakefile
 endif
index 1fc0a16f29251b646ce4b43cdb454a13cea0261b..558cc52fa61963ed79e72ddd33ed3d6fd75b65f4 100644 (file)
--- a/arscan.c
+++ b/arscan.c
@@ -177,6 +177,7 @@ ar_scan (archive, function, arg)
 
   VMS_function = function;
 
+  VMS_member_date = (time_t) -1;
   lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0);
 
   /* Undo the damage.  */
index 0cb0216d1208b2e2dc9609533eee348a6cf3c848..a4aa867c620530dbdbc223945a4add3e94d59638 100644 (file)
@@ -51,7 +51,7 @@ objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}"
 for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
   echo compiling ${file}...
   $CC $defines $CPPFLAGS $CFLAGS \
-      -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
+      -c -I. -I${srcdir} ${srcdir}/$file
 done
 
 # The object files were actually all put in the current directory.
index ebc9cdff46733d8237f463eda3d4469a6c660192..be51781ec16dd46a5b537189e249e06634524169 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_REVISION([$Id$])
-AC_PREREQ(2.12)dnl             dnl Minimum Autoconf version required.
+AC_PREREQ(2.13)dnl             dnl Minimum Autoconf version required.
 AC_INIT(vpath.c)dnl            dnl A distinctive file to look for in srcdir.
 
 AM_INIT_AUTOMAKE(make, 3.77.90)
@@ -16,7 +16,6 @@ AC_PROG_INSTALL
 AC_CHECK_PROG(AR, ar, ar, ar)
 AC_PROG_RANLIB
 AC_PROG_CPP                    dnl Later checks need this.
-dnl AC_ARG_PROGRAM -- implied by AM_INIT_AUTOMAKE; gives errors if run twice.
 AC_AIX
 AC_ISC_POSIX
 AC_MINIX
@@ -127,26 +126,51 @@ AC_ARG_WITH(customs,
      ;;
 esac])
 
-echo checking for location of SCCS get command
+AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
 if test -f /usr/sccs/get; then
-  SCCS_GET=/usr/sccs/get
-  AC_DEFINE(SCCS_GET, "/usr/sccs/get")
+  make_cv_path_sccs_get=/usr/sccs/get
 else
-  SCCS_GET=get
-  AC_DEFINE(SCCS_GET, "get")
-fi
+  make_cv_path_sccs_get=get
+fi])
+AC_DEFINE_UNQUOTED(SCCS_GET,["$make_cv_path_sccs_get"])
+
 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
    test -f s.conftest; then
   # We successfully created an SCCS file.
-  echo checking if SCCS get command understands -G
-  if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
-     test -f conftoast; then
-    AC_DEFINE(SCCS_GET_MINUS_G)
-  fi
+  AC_CACHE_CHECK(if SCCS get command understands -G, make_cv_sys_get_minus_G, [
+    if $make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
+       test -f conftoast; then
+       make_cv_sys_get_minus_G=yes
+    else
+       make_cv_sys_get_minus_G=no
+    fi])
+  case "$make_cv_sys_get_minus_G" in
+    yes) AC_DEFINE(SCCS_GET_MINUS_G);;
+  esac
 fi
 rm -f s.conftest conftoast
 
+AC_MSG_CHECKING(if system libc has GNU glob)
+AC_CACHE_VAL(make_cv_sys_gnu_glob, [
+ AC_TRY_CPP([
+#include <glob.h>
+#include <fnmatch.h>
+
+#define GLOB_INTERFACE_VERSION 1
+#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+# include <gnu-versions.h>
+# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
+#  error have gnu glob
+# endif
+#endif
+ ], make_cv_sys_gnu_glob=no, make_cv_sys_gnu_glob=yes)])
+case "$make_cv_sys_gnu_glob" in
+  yes) AC_MSG_RESULT(yes) ;;
+  no)  AC_MSG_RESULT([no; using local copy])
+       CPPFLAGS="$CPPFLAGS -I$srcdir/glob" ;;
+esac
+
 AC_OUTPUT(Makefile glob/Makefile build.sh)
 
 case "$make_badcust" in
@@ -173,8 +197,8 @@ case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
   no/no) echo
          echo "WARNING: Your system has neither waitpid() nor wait3()."
          echo "         Without one of these, signal handling is unreliable."
-         echo "         You should be aware that run GNU make with -j could"
-         echo "         result in erratic behavior."
+         echo "         You should be aware that running GNU make with -j"
+         echo "         could result in erratic behavior."
          echo ;;
 esac
 
diff --git a/read.c b/read.c
index 242f95344760e1153013e99c7140c73e84944d59..b5efca2d461c96e370c2c72b47b678794b42124d 100644 (file)
--- a/read.c
+++ b/read.c
@@ -1597,16 +1597,13 @@ record_files (filenames, pattern, pattern_percent, deps, cmds_started,
 
          if (f->double_colon)
            fatal (flocp,
-                           "target file `%s' has both : and :: entries",
-                           f->name);
+                   "target file `%s' has both : and :: entries", f->name);
 
          /* If CMDS == F->CMDS, this target was listed in this rule
             more than once.  Just give a warning since this is harmless.  */
          if (cmds != 0 && cmds == f->cmds)
-           error
-             (flocp,
-              "target `%s' given more than once in the same rule.",
-              f->name);
+           error (flocp, "target `%s' given more than once in the same rule.",
+                   f->name);
 
          /* Check for two single-colon entries both with commands.
             Check is_target so that we don't lose on files such as .c.o
@@ -1614,11 +1611,10 @@ record_files (filenames, pattern, pattern_percent, deps, cmds_started,
          else if (cmds != 0 && f->cmds != 0 && f->is_target)
            {
              error (&cmds->fileinfo,
-                             "warning: overriding commands for target `%s'",
-                             f->name);
+                     "warning: overriding commands for target `%s'", f->name);
              error (&f->cmds->fileinfo,
-                             "warning: ignoring old commands for target `%s'",
-                             f->name);
+                     "warning: ignoring old commands for target `%s'",
+                     f->name);
            }
 
          f->is_target = 1;
@@ -1699,8 +1695,7 @@ record_files (filenames, pattern, pattern_percent, deps, cmds_started,
             we don't lose on default suffix rules or makefiles.  */
          if (f != 0 && f->is_target && !f->double_colon)
            fatal (flocp,
-                           "target file `%s' has both : and :: entries",
-                           f->name);
+                   "target file `%s' has both : and :: entries", f->name);
          f = enter_file (name);
          /* If there was an existing entry and it was a double-colon
             entry, enter_file will have returned a new one, making it the
index ea02443c1fcf7bd26b4540aa12547b2f72c3bd74..dd73723e9a35ababb880b327e942ee189bcb9d15 100644 (file)
--- a/signame.c
+++ b/signame.c
@@ -70,12 +70,14 @@ extern char *sys_siglist[];
 
 /* Table of abbreviations for signals.  Note:  A given number can
    appear more than once with different abbreviations.  */
+#define SIG_TABLE_SIZE  (NSIG*2)
+
 typedef struct
   {
     int number;
     const char *abbrev;
   } num_abbrev;
-static num_abbrev sig_table[NSIG*2];
+static num_abbrev sig_table[SIG_TABLE_SIZE];
 /* Number of elements of sig_table used.  */
 static int sig_table_nelts = 0;
 
@@ -88,10 +90,18 @@ init_sig (number, abbrev, name)
      const char *name;
 {
 #ifndef HAVE_SYS_SIGLIST
-  sys_siglist[number] = name;
-#endif
-  sig_table[sig_table_nelts].number = number;
-  sig_table[sig_table_nelts++].abbrev = abbrev;
+  /* If this value is ever greater than NSIG it seems like it'd be a bug in
+     the system headers, but... better safe than sorry.  We know, for
+     example, that this isn't always true on VMS.  */
+
+  if (number >= 0 && number < NSIG)
+    sys_siglist[number] = name;
+#endif
+  if (sig_table_nelts < SIG_TABLE_SIZE)
+    {
+      sig_table[sig_table_nelts].number = number;
+      sig_table[sig_table_nelts++].abbrev = abbrev;
+    }
 }
 
 void