[gnu.announce] GNU Make version 3.44

tower@WHEATIES.AI.MIT.EDU (03/26/89)

Forwarded-For: Roland McGrath <mcgrath%helen.Berkeley.EDU@ginger.berkeley.edu>

Another day, another version.  Sigh.
(One-person quality-control doesn't quite cut it.)

Well, releasing 3.43 has shown me how devoted the world
is to GNU software.  I got enough bug reports in one day
to warrant an immediate release of version 3.44.

This version fixes one "real" bug in version 3.43 (thanks to Dirk Grunwald
for pointing it out), and two dumb mistakes on my part.  It also adds
support in the Makefile for easily using a GNU-supplied alloca (from the
Emacs distribution) if your system doesn't provide one or provides a
nonfunctional one.

Since context diffs are very small (about 7 kilobytes), I am including them
in this announcement.  Apply these with `patch' to get version 3.44.
(Changes to TAGS and tags are not included; use etags and ctags to remake
those files.)

Version 3.44 is available for anonymous FTP from prep.ai.mit.edu in
/u/emacs/make.tar-3.44.Z.  Context diffs from version 3.43 (which you see
below) are in make.diff-3.43-3.44 (about 7k uncompressed) and
make.diff-3.43-3.44.Z (about 3k compressed) in the same place.

This software will soon be available for anonymous uucp on osu-cis and
anonymous ftp on gatekeeper.dec.com.

As always, bug reports to bug-gnu-utils@prep.ai.mit.edu.
Other suggestions, etc. to roland@wheaties.ai.mit.edu.

      Roland McGrath
      roland@wheaties.ai.mit.edu

diff -rc2 make-3.43/CHANGES make-3.44/CHANGES
*** make-3.43/CHANGES	Thu Mar 23 17:01:46 1989
--- make-3.44/CHANGES	Fri Mar 24 15:41:32 1989
***************
*** 2,5 ****
--- 2,11 ----
  =================================
  
+ Version 3.44
+ 
+ * A dependency is NOT considered newer than its dependent if
+ they have the same modification time.  The behavior implemented
+ in 3.43 conflicts with RCS.
+ 
  Version 3.43
  
diff -rc2 make-3.43/ChangeLog make-3.44/ChangeLog
*** make-3.43/ChangeLog	Thu Mar 23 17:25:25 1989
--- make-3.44/ChangeLog	Fri Mar 24 16:45:23 1989
***************
*** 1,2 ****
--- 1,24 ----
+ Fri Mar 24 15:08:46 1989  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
+ 
+ 	* Version 3.44.
+ 
+ 	* file.c (rename_file): If a `struct file' for the renamed-to name
+ 	exists, and it is a target or has deps or commands, barf.
+ 	If not just remove the old one for put in the new one.
+ 
+ 	* remake.c (update_file_1, check_dep): Changed it back so that equal
+ 	modtimes to NOT make dependencies be considered newer.  RCS checks
+ 	out files with equal modtimes as the RCS files, so this screws it.
+ 
+ 	* make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
+ 
+ 	* Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
+ 	without a good standard alloca can get it from the Emacs
+ 	distribution (or somewhere).
+ 
+ 	* dir.c: Don't include <sys/stat.h>, since make.h does.
+ 
+ 	* make.c: Removed debugging version of getwd.
+ 
  Thu Mar 23 16:16:27 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
  
diff -rc2 make-3.43/Makefile make-3.44/Makefile
*** make-3.43/Makefile	Thu Mar 23 17:48:09 1989
--- make-3.44/Makefile	Fri Mar 24 17:18:23 1989
***************
*** 39,49 ****
  LOAD_AVG =
  
  bindir = $(prefix)/usr/local/bin
  
  objs = arscan.o glob.o ar.o commands.o dir.o file.o load.o make.o	\
!        read.o remake.o remote.o rule.o variable.o vpath.o version.o
  srcs = arscan.c glob.c ar.c commands.c dir.c file.c load.c make.c	\
         read.c remake.c remote.c rule.c variable.c vpath.c version.c	\
!        commands.h dep.h file.h make.h variable.h
  
  
--- 39,56 ----
  LOAD_AVG =
  
+ # If your system doesn't have alloca, or the one provided is bad,
+ # get it from the Emacs distribution and define these.
+ 
+ #ALLOCA = alloca.o
+ #ALLOCASRC = alloca.c
+ 
  bindir = $(prefix)/usr/local/bin
  
  objs = arscan.o glob.o ar.o commands.o dir.o file.o load.o make.o	\
!        read.o remake.o remote.o rule.o variable.o vpath.o version.o	\
!        $(ALLOCA)
  srcs = arscan.c glob.c ar.c commands.c dir.c file.c load.c make.c	\
         read.c remake.c remote.c rule.c variable.c vpath.c version.c	\
!        commands.h dep.h file.h make.h variable.h $(ALLOCASRC)
  
  
diff -rc2 make-3.43/dir.c make-3.44/dir.c
*** make-3.43/dir.c	Sun Mar 19 20:34:38 1989
--- make-3.44/dir.c	Fri Mar 24 15:09:57 1989
***************
*** 17,21 ****
  
  #include "make.h"
- #include <sys/stat.h>
  
  #ifdef	USGr3
--- 17,20 ----
diff -rc2 make-3.43/file.c make-3.44/file.c
*** make-3.43/file.c	Wed Mar 22 19:34:30 1989
--- make-3.44/file.c	Fri Mar 24 17:17:36 1989
***************
*** 152,186 ****
    hashval %= FILE_BUCKETS;
  
!   for (oldfile = files[hashval]; oldfile != 0; oldfile = oldfile->next)
!     if (streq (oldfile->name, name))
!       break;
! 
!   if (oldfile != 0)
      {
!       /* There was already a file with that name!  */
!       register struct dep *next;
!       error ("rename_file `%s' to existing `%s' -- report this!",
! 	     file->name, name);
!       free (oldfile->name);
!       next = oldfile->deps;
!       while (next != 0)
! 	{
! 	  register struct dep *d = next;
! 	  next = d->next;
! 	  if (d->name != 0)
! 	    free (d->name);
! 	  free ((char *) d);
! 	}
!       if (oldfile->also_make != 0)
! 	{
! 	  register unsigned int i;
! 	  for (i = 0; oldfile->also_make[i] != 0; ++i)
! 	    free (oldfile->also_make[i]);
! 	  free ((char *) oldfile->also_make);
! 	}
!       f = oldfile->next;
!       *oldfile = *file;
!       oldfile->next = f;
      }
    else
      {
--- 152,182 ----
    hashval %= FILE_BUCKETS;
  
!   lastf = 0;
!   oldfile = files[hashval];
!   while (oldfile != 0)
      {
!       if (streq (oldfile->name, name))
! 	break;
!       lastf = oldfile;
!       oldfile = oldfile->next;
      }
+ 
+   if (oldfile != 0)
+     /* There was already a file with that name.  */
+     if ((oldfile->deps != 0 && file->deps != 0)
+ 	|| (oldfile->cmds != 0 && file->cmds != 0))
+       {
+ 	error ("rename_file loses %s.  Goodbye, cruel world.", name);
+ 	abort ();
+       }
+     else
+       {
+ 	if (lastf == 0)
+ 	  files[hashval] = oldfile->next;
+ 	else
+ 	  lastf->next = oldfile->next;
+ 	free (oldfile->name);
+ 	free ((char *) oldfile);
+       }
    else
      {
diff -rc2 make-3.43/glob.c make-3.44/glob.c
*** make-3.43/glob.c	Thu Mar 23 17:46:12 1989
--- make-3.44/glob.c	Fri Mar 24 15:41:44 1989
***************
*** 47,55 ****
  #endif /* not USG */
  
  #ifdef	sparc
  #include <alloca.h>
! #else
  extern char *alloca ();
! #endif	/* sparc */
  
  extern char *malloc (), *realloc ();
--- 47,59 ----
  #endif /* not USG */
  
+ #ifdef	__GNUC__
+ #define	alloca(n)	__builtin_alloca (n)
+ #else	/* Not GCC.  */
  #ifdef	sparc
  #include <alloca.h>
! #else	/* Not sparc.  */
  extern char *alloca ();
! #endif	/* sparc.  */
! #endif	/* GCC.  */
  
  extern char *malloc (), *realloc ();
diff -rc2 make-3.43/make.c make-3.44/make.c
*** make-3.43/make.c	Sun Mar 19 21:15:15 1989
--- make-3.44/make.c	Fri Mar 24 15:10:01 1989
***************
*** 1558,1561 ****
  }
  #endif
- char *getwd(char *buf){
- return(strcpy(buf,"/tmp.rosemary/mcgrath/make"));}
--- 1558,1559 ----
diff -rc2 make-3.43/make.h make-3.44/make.h
*** make-3.43/make.h	Sat Mar 18 16:54:01 1989
--- make-3.44/make.h	Fri Mar 24 15:41:48 1989
***************
*** 39,42 ****
--- 39,45 ----
  #endif	/* USG.  */
  
+ #ifdef	__GNUC__
+ #define	alloca(n)	__builtin_alloca (n)
+ #else	/* Not GCC.  */
  #ifdef	sparc
  #include <alloca.h>
***************
*** 44,47 ****
--- 47,51 ----
  extern char *alloca ();
  #endif	/* sparc.  */
+ #endif	/* GCC.  */
  
  #include <sys/param.h>
diff -rc2 make-3.43/remake.c make-3.44/remake.c
*** make-3.43/remake.c	Thu Mar 23 17:25:18 1989
--- make-3.44/remake.c	Fri Mar 24 15:41:39 1989
***************
*** 357,361 ****
      {
        d->changed
! 	= this_mtime == (time_t) -1 || file_mtime (d->file) >= this_mtime;
        
        if (debug_flag && this_mtime != (time_t) -1)
--- 357,361 ----
      {
        d->changed
! 	= this_mtime == (time_t) -1 || file_mtime (d->file) > this_mtime;
        
        if (debug_flag && this_mtime != (time_t) -1)
***************
*** 462,466 ****
        dep_status = update_file (file, depth);
        mtime = file_mtime (file);
!       if (mtime == (time_t) -1 || mtime >= this_mtime)
  	*must_make_ptr = 1;
      }
--- 462,466 ----
        dep_status = update_file (file, depth);
        mtime = file_mtime (file);
!       if (mtime == (time_t) -1 || mtime > this_mtime)
  	*must_make_ptr = 1;
      }
diff -rc2 make-3.43/version.c make-3.44/version.c
*** make-3.43/version.c	Thu Mar 23 16:35:01 1989
--- make-3.44/version.c	Fri Mar 24 15:09:49 1989
***************
*** 1,3 ****
! char *version_string = "3.43";
  
  /*
--- 1,3 ----
! char *version_string = "3.44";
  
  /*