Subject: bin/6162: pmake doesn't seem to see dependencies for single-suffix rules
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@weird.com>
List: netbsd-bugs
Date: 09/15/1998 15:17:11
>Number: 6162
>Category: bin
>Synopsis: pmake doesn't seem to see dependencies for single-suffix rules
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 15 12:20:01 1998
>Last-Modified:
>Originator: Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release: NetBSD-current Tue Sep 15 07:46:18 EDT 1998
>Environment:
System: NetBSD most 1.3.1 NetBSD 1.3.1 (MOST) #0: Mon May 25 01:21:22 EDT 1998 woods@most:/usr/src-1.3.1/sys/arch/sparc/compile/MOST sparc
from NetBSD-current's /usr/src/make: ident *.[ch] | sort -u
$NetBSD: arch.c,v 1.27 1998/05/21 17:19:46 tv Exp $
$NetBSD: bit.h,v 1.6 1997/11/08 09:33:15 lukem Exp $
$NetBSD: buf.c,v 1.11 1997/09/28 03:31:00 lukem Exp $
$NetBSD: buf.h,v 1.7 1996/12/31 17:53:22 christos Exp $
$NetBSD: compat.c,v 1.24 1998/03/26 19:20:36 christos Exp $
$NetBSD: cond.c,v 1.10 1998/04/01 14:18:10 christos Exp $
$NetBSD: config.h,v 1.9 1997/09/26 13:29:09 christos Exp $
$NetBSD: dir.c,v 1.20 1997/09/28 03:31:02 lukem Exp $
$NetBSD: dir.h,v 1.5 1997/05/08 21:24:42 gwr Exp $
$NetBSD: for.c,v 1.6 1997/09/28 03:31:03 lukem Exp $
$NetBSD: hash.c,v 1.8 1997/09/28 03:31:04 lukem Exp $
$NetBSD: hash.h,v 1.5 1996/11/06 17:59:07 christos Exp $
$NetBSD: job.c,v 1.22 1998/03/26 19:20:36 christos Exp $
$NetBSD: job.h,v 1.6 1998/03/26 19:20:37 christos Exp $
$NetBSD: list.h,v 1.5 1996/11/06 17:59:11 christos Exp $
$NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $
$NetBSD: main.c,v 1.42 1998/04/02 10:33:17 kleink Exp $
$NetBSD: make.c,v 1.20 1998/03/26 19:20:37 christos Exp $
$NetBSD: make.h,v 1.19 1998/05/21 17:19:46 tv Exp $
$NetBSD: nonints.h,v 1.16 1998/04/01 14:18:10 christos Exp $
$NetBSD: parse.c,v 1.38 1998/08/06 13:42:22 christos Exp $
$NetBSD: pathnames.h,v 1.6 1996/11/06 17:59:21 christos Exp $
$NetBSD: sprite.h,v 1.6 1996/11/06 17:59:22 christos Exp $
$NetBSD: str.c,v 1.16 1998/03/26 19:20:37 christos Exp $
$NetBSD: suff.c,v 1.20 1998/07/04 21:53:11 christos Exp $
$NetBSD: targ.c,v 1.15 1998/02/04 14:47:39 christos Exp $
$NetBSD: util.c,v 1.16 1998/02/04 14:47:40 christos Exp $
$NetBSD: var.c,v 1.26 1998/04/03 04:07:15 cgd Exp $
>Description:
PMake doesn't seem to notice implicit dependencies for single
suffix rules. Other makes (eg. GNU Make 3.76.1) do.
>How-To-Repeat:
The following example fails to build anything with make, but
works as expected with gmake:
cat <<'END_OF_FILE' > Makefile
.SUFFIXES: .sh
.sh:
@rm -f $@
cat $@.sh > $@
chmod +x $@
all: foo bar
foo bar: Makefile
END_OF_FILE
touch foo.sh bar.sh
rm foo bar
make
The work-around is to add explicit dependencies for the .sh
files:
cat <<'END_OF_FILE' > Makefile
.SUFFIXES: .sh
.sh:
@rm -f $@
cat $@.sh > $@
chmod +x $@
all: foo bar
foo bar: Makefile
foo: foo.sh
bar: bar.sh
END_OF_FILE
touch foo.sh bar.sh
rm foo bar
make
>Fix:
Unknown.
>Audit-Trail:
>Unformatted: