[gnu.utils.bug] GnuMake 3.57 problems

ricks@isc-br.ISC-BR.COM (Rick Schaeffer) (01/18/90)

I have installed Gnu Make 3.57 on our system V.3 look-alike system and
am having a couple of problems.  I am just now starting to get serious
about finding the bugs but thought it would be worth posting a quick
note just in case it's already been found.

First...here is a sample makefile to show what I'm trying to do:

MASTSYS=
MASTDIR=/usr/users/pplus/src
TARGDIR=dsplist
SYSDIR=$(MASTSYS)$(MASTDIR)

VPATH=$(SYSDIR)/$(TARGDIR)
vpath %.a ../lib:$(MASTDIR)/lib
vpath %.o ../lib:$(MASTDIR)/lib
vpath %.h ../include:$(MASTDIR)/include

INCDIRS=-I../include -I$(MASTDIR)/include
SHELL=/bin/sh
OPT=-O
CFLAGS=$(INCDIRS) $(OPT)

LIB = dsp.a

LIBOBJ = \
	$(LIB)(listmgr.o) \
	$(LIB)(dsplist.o) \
	$(LIB)(tdspl.o) \
	$(LIB)(scrlist.o)

.PRECIOUS: $(LIB)

$(LIB): $(LIBOBJ)
	copy -l $(LIB) ../lib
-------------- End of Makefile---------------------------

There are two problems with this setup.  One occurs if I copy the Makefile
to a directory other than MASTDIR/TARGDIR.  If the target (dsp.a in this
case) doesn't exist **in that directory**, then when I "make" I get a
memory fault at some point during the process.  The point of failure varies
depending on how many objects are listed in the "LIBOBJ" variable.  If
there are lots of them then the failure occurs before running the first
compile.  If the target does exist...even if it is empty (ie: dsp.a contains
no objects but is otherwise a valid archive) then the make completes
normally.

The other problem seems to occur no matter where I run the make.  If I
give an explicit target (ie: I type "make dsp.a") then I get a memory
fault every time if the named target doesn't exist in the current directory
but does exist in the vpath for %.a.  If I don't type in an explicit
target (ie: just run "make" with no parameters), then the make completes
normally except for the first problem mentioned above.  This failure doesn't
seem to be related to archive files because it will occur even in a case
where the named target is a non-archive.

Anyway...I can supply debug traces, etc to anyone who can help...hopefully
this short posting will give enough clues that someone will know what
the problem is.  The options I used when I created gnumake were:
   -DUSG -DUSGr3 -DNO_MINUS_C_MINUS_O _DNEED_DUP2
The NEED_DUP2 is a define I put in jobs.c around the dup2 function because
my libraries while mostly System V.3 compatible, don't include the dup2 
function.
-- 
Rick Schaeffer          UUCP:  uunet!isc-br.isc-br.com!ricks
ISC-Bunker Ramo                ricks@isc-br.isc-br.com
Box TAF-C8              Phone: (509)927-5114
Spokane, WA  99220