On Tue, Sep 04, 2018 at 10:47:45PM +0100, markwes...@cock.li wrote: > $PROMPT#> ls > 1.c 2.c 3.c Makefile something.a > > $PROMPT#> cat Makefile > > .POSIX: > .SUFFIXES:.a .b .c > FINAL_TARGETS_PREREQUISITE_PREREQUISITE=something.a > FINAL_TARGETS_PREREQUISITE=something.b > FINAL_TARGETS=1 2 3 > all: $(FINAL_TARGETS) > $(FINAL_TARGETS): $(FINAL_TARGETS_PREREQUISITE) > .a.b: > cat < $< > $@ > .c: > cat < $< > $@ > > $PROMPT#> make > cat < something.a > something.b > > === Expected behaviour === > > cat < something.a > something.b > cat < 1.c > 1 > cat < 2.c > 2 > cat < 3.c > 3 > > recent snapshot of OpenBSD btw
Good catch Seems like a POSIX change that happened a while ago that we didn't ever apply Patch might be as simple as the following, but I need to check it doesn't have any adverse effect... Index: suff.c =================================================================== RCS file: /cvs/src/usr.bin/make/suff.c,v retrieving revision 1.92 diff -u -p -r1.92 suff.c --- suff.c 24 Jul 2017 12:07:46 -0000 1.92 +++ suff.c 1 Oct 2018 14:13:17 -0000 @@ -1427,8 +1427,8 @@ SuffFindNormalDeps( #endif /* Only use the default suffix rules if we don't have commands - * or dependencies defined for this gnode. */ - if (Lst_IsEmpty(&gn->commands) && Lst_IsEmpty(&gn->children)) + * defined for this gnode. */ + if (Lst_IsEmpty(&gn->commands)) SuffAddLevel(&srcs, targ); else { if (DEBUG(SUFF))