Branch: Tag:


2021-01-12 22:45:27 by Tobias S. Josefowitz <>

[build] Use pattern rules for rules with additional deps

Suffix rules (according to GNU make at least) cannot have dependencies
of their own, old versions of GNU make ignored such dependencies,
current versions of GNU make warn about them (and ignore them), and
future versions of GNU make are announced to treat them as non-suffix
rules, i.e.

.c.o: foo.h

would describe a rule to build .c.o from foo.h.

GNU make claims that pattern rules are what needs to be used in case
such rules have dependencies, so we shall give that a try.

470:    -rm dumpversion 2>/dev/null      .SUFFIXES: - .SUFFIXES: .c .h .S .o .m .mmod .cmod .symlist .pp .pph .protos .h_src .wxs .wixobj .msi .msm + .SUFFIXES: .c .h .S .o .m .mmod .cmod .pp .pph .h_src .wxs .wixobj .msi .msm      .c.pp:    $(CPP) $(PREFLAGS) -DPMOD_EXPORT=PMOD_EXPORT \    -DPMOD_PROTO=PMOD_PROTO "$<" >"$@"    - .c.protos: + %.protos: %.c    ./ --cache fake_dynamic_load.pike >"$@" --cpp --protos \    $(CPP) $(PREFLAGS) -DPMOD_EXPORT=PMOD_EXPORT \    -DPMOD_PROTO=PMOD_PROTO -DPIKE_PRECOMPILER=1 "$<" || \
542:    ./ --cache precompile.pike $(PRECOMPILER_ARGS) >"$@" "$<" || { rm "$@"; exit 1; }      # The same applies to this. - .symlist.c: $(SRCDIR)/mklibpike.pike + %.c: %.symlist $(SRCDIR)/mklibpike.pike    ./ --cache $(SRCDIR)/mklibpike.pike -I. -I "$(SRCDIR)" -S "$<" -o "$@" || { rm "$@"; exit 1; }      # This rule is used for some header files that are generated from the