Branch: Tag:

2021-01-12

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

[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: precompile.sh-stamp + %.protos: %.c precompile.sh-stamp    ./precompile.sh --cache fake_dynamic_load.pike >"$@" --cpp --protos \    $(CPP) $(PREFLAGS) -DPMOD_EXPORT=PMOD_EXPORT \    -DPMOD_PROTO=PMOD_PROTO -DPIKE_PRECOMPILER=1 "$<" || \
542:    ./precompile.sh --cache precompile.pike $(PRECOMPILER_ARGS) >"$@" "$<" || { rm "$@"; exit 1; }      # The same applies to this. - .symlist.c: precompile.sh-stamp $(SRCDIR)/mklibpike.pike + %.c: %.symlist precompile.sh-stamp $(SRCDIR)/mklibpike.pike    ./precompile.sh --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