🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dale Nielsen Tue, 03 Oct 1989 18:40
make-3.56 problem re-exec'ing when invoked with -f (w/ fix)
#466
Author: Dale Nielsen
Date: Tue, 03 Oct 1989 18:40
60 lines
2502 bytes
There is a problem with make-3.56 when it is invoked with
the -f option to specify the filename of the makefile which
includes other makefiles for which rules exist.  It saves
the name of the makefile on a list called read_makefiles.
Unfortunately, with the current version this name goes to
the end of the list (which can potentially contain included
makefiles not mentioned with the -f option).  The list of
makefiles included with the -f option (called makefiles) is
is then added to using the first makefile on this list (when
the correct makefile is actually the last one).

I changed the routine read_makefile in read.c to add these
makefiles to the end of read_makefiles rather than the
beginning, so that when the makefile name is saved in
makefiles from the beginning of the read_makefiles list, it
is correct.

Here are the context diffs of the changes I made.  I didn't
see anything else that depended on the order of links in the
read_makefiles list, but if anyone knows of something that
does, please let me know.




*** read.c	Tue Oct  3 13:37:51 1989
--- read.c.orig	Mon Sep 18 20:18:56 1989
***************
*** 248,263 ****
  
    /* Add FILENAME to the chain of read makefiles.  */
    deps = (struct dep *) xmalloc (sizeof (struct dep));
!   if (read_makefiles == 0)
!     read_makefiles = deps;
!   else
!     {
!       register struct dep *p = read_makefiles;
!       while (p->next)
! 	p = p->next;
!       p->next = deps;
!     }
!   deps->next = 0;
    deps->name = 0;
    deps->file = lookup_file (filename);
    if (deps->file == 0)
--- 248,255 ----
  
    /* Add FILENAME to the chain of read makefiles.  */
    deps = (struct dep *) xmalloc (sizeof (struct dep));
!   deps->next = read_makefiles;
!   read_makefiles = deps;
    deps->name = 0;
    deps->file = lookup_file (filename);
    if (deps->file == 0)
-- 
	--Dale Nielsen				ARPA:  dale@vicorp.UU.NET
	  V. I. Corporation			UUCP:  uunet!vicorp!dale
	  Amherst Research Park			PHONE: (413) 253-3482
	  Amherst, Massachusetts  01002		FAX:   (413) 256-0574
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads