Subject: bin/1523: make doesn't properly depend on .a files
To: None <gnats-bugs@NetBSD.ORG>
From: Chris G. Demetriou <cgd@NetBSD.ORG>
List: netbsd-bugs
Date: 09/26/1995 19:30:21
>Number: 1523
>Category: bin
>Synopsis: dependencies on .a files may not be dealt with properly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 26 19:35:01 1995
>Last-Modified:
>Originator: Chris G. Demetriou
>Organization:
Kernel Hackers 'r' Us
>Release: NetBSD-current (9/26/95 on NetBSD/alpha, 9/20/95 on i386)
>Environment:
System: NetBSD bunnahabhain.pdl.cs.cmu.edu 1.0A NetBSD 1.0A (BUNNY) #497: Tue Aug 29 11:48:06 EDT 1995 cgd@bunnahabhain.pdl.cs.cmu.edu:/usr/src.L/sys/arch/alpha/compile/BUNNY alpha
and an i386 of Jason Thorpe's running -current.
>Description:
.a dependencies don't seem to work properly.
for instance, given a dependency of the form:
foo: foolib.a
make(1) will think it can build foo even if no foolib.a exists!
>How-To-Repeat:
a one-liner!
/bin/rm -f foolib.a ; ls -la foolib.a ; make foolib.a
or: unshar the Makefile below. run make clean (to make
sure that the named files aren't around), then run make -k.
note that the 'bar' and 'baz' targets won't be built, but
'foo' will. 'foo' is the only one that depends on a .a file.
Note also that some Makefiles in the source tree depend
on this behaviour, e.g. src/usr.sbin/sendmail/praliases,
which DPADDs LIBDBM (which is defined as /usr/lib/libdbm.a),
which doesn't exist. (note that it doesn't LDADD a dbm library,
and, in the presence of this bug, builds fine!)
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# Makefile
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
Xall: foo bar baz
X
Xfoo: foolib.a
X touch foo
X
Xbar: barlib
X touch bar
X
Xbaz: bazlib.o
X touch baz
X
Xclean:
X /bin/rm -f foo foolib.a bar barlib baz bazlib.o
END-of-Makefile
exit
>Fix:
Unknown.
>Audit-Trail:
>Unformatted: