diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-11-06 21:15:20 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-11-06 21:15:20 +0000 |
commit | 21f8fd673c0b6267dd6bcfd06e73e7cff03acf5d (patch) | |
tree | 356386c7b3a9241538e57cada96464b7474fe02c /usr.bin/make | |
parent | 78512124372e6ad11c3956569c3ee56796c27a3d (diff) |
bug-fix: try the empty suffix when we cannot find any transformation, not
when we cannot find any suffix.
This allows Makefiles like:
.SUFFIXES: .in .sh
all: truc.sh
truc.sh.in:
echo "bonjour" >$@
.in:
sed -e 's/a/b/' <$< >$@
to work (before that, the empty suffix would not be tried, since truc.sh
matches the .sh suffix, even though there is NO transformation).
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/suff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index f161012ec22..37556951e88 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: suff.c,v 1.74 2007/11/06 21:12:23 espie Exp $ */ +/* $OpenBSD: suff.c,v 1.75 2007/11/06 21:15:19 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* @@ -1548,7 +1548,7 @@ SuffFindNormalDeps( record_possible_suffixes(gn, &srcs, &targs); /* Handle target of unknown suffix... */ - if (Lst_IsEmpty(&targs)) { + if (Lst_IsEmpty(&srcs)) { if (DEBUG(SUFF)) printf("\tNo known suffix on %s. Using .NULL suffix\n", gn->name); |