summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.c
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-09-02 16:04:23 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-09-02 16:04:23 +0000
commit9150de05a8f19f682fd7c79d1eac7110e77502cc (patch)
tree9b6b4c8273ec82e564c60b60ff6dc55f377f7be1 /usr.bin/make/make.c
parenta64dba30d8dda4d3d00f553662090e44b77462db (diff)
Sync up with NetBSD:
(christos) Fix bug reported by Greg Hudson where leaf (source only) nodes were referenced only by their basename and not by their full pathname. This breaks when .PATH or MAKEOBJDIR are used. There might be Makefiles around that try to work around this bug by prepending ${.CURDIR} to the sources, and they should be found and fixed. Also a lot of the gunk in suff.c that was attempting to work around the same problem could be removed. (christos) - Move -D flags from Makefile to config.h and explain what they do. Add -Wall -Wno-unused to CFLAGS. Add new define SYSVVARSUB to enable SysV style variable substitutions and enable them. - Add SunOS style command substitutions via SUNSHCMD - Fix core dump with '{variable = value' (christos) Fix bug where make will always exit with 0, even when one or more parallel jobs failed. (Only affects parallel make code) (christos) Protect __P from being multiply defined (for systems that already define it) (christos) Add strdup() since ultrix is missing it. From Larry Schwimmer <rosebud@cyclone.Stanford.EDU> (christos) Add estrdup(), a checked version of strdup and use it. (christos) Recognize SVR4 style long filename entries in archives. (thorpej) Tidy up some RCS ids a bit.
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r--usr.bin/make/make.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index c366518faae..805c96d6f76 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: make.c,v 1.2 1996/03/27 19:32:38 niklas Exp $ */
-/* $NetBSD: make.c,v 1.8 1996/03/15 21:52:37 christos Exp $ */
+/* $OpenBSD: make.c,v 1.3 1996/09/02 16:04:14 briggs Exp $ */
+/* $NetBSD: make.c,v 1.9 1996/08/30 23:21:10 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -44,7 +44,7 @@
static char sccsid[] = "@(#)make.c 5.3 (Berkeley) 6/1/90";
static char rcsid[] = "$NetBSD: make.c,v 1.8 1996/03/15 21:52:37 christos Exp $";
#else
-static char rcsid[] = "$OpenBSD: make.c,v 1.2 1996/03/27 19:32:38 niklas Exp $";
+static char rcsid[] = "$OpenBSD: make.c,v 1.3 1996/09/02 16:04:14 briggs Exp $";
#endif
#endif /* not lint */
@@ -580,9 +580,16 @@ MakeAddAllSrc (cgnp, pgnp)
GNode *pgn = (GNode *) pgnp;
if ((cgn->type & (OP_EXEC|OP_USE|OP_INVISIBLE)) == 0) {
char *child;
- char *p1;
+ char *p1 = NULL;
- child = Var_Value(TARGET, cgn, &p1);
+ if (OP_NOP(cgn->type)) {
+ /*
+ * this node is only source; use the specific pathname for it
+ */
+ child = cgn->path ? cgn->path : cgn->name;
+ }
+ else
+ child = Var_Value(TARGET, cgn, &p1);
Var_Append (ALLSRC, child, pgn);
if (pgn->type & OP_JOIN) {
if (cgn->made == MADE) {