Cobra MK III
Můj nový počítač
make: different hints
2023.04.15 11:21:56 hint make Gilhad

1   No builtin rules

MAKEFLAGS += --no-builtin-rules --output-sync

2   Target A depends on B anytime, on C if it exists

%.A: %.B %.C
        @echo %.A: %.B %.C
        touch $@

%.A: %.B
        @echo %.A: %.B
        touch $@

3   Rules use the same recipes

Recipe=command;command;command_using_variables

%.A: %.B
        @$(Recipe)
Recipe = echo "First argument: $(1)"; \
        echo "Second argument: $(2)"; \
        echo "Third argument: $(3)"

%.A: %.B
        @$(call Recipe,arg1,arg2,arg3)

%.C: %.D
        @$(call Recipe,arg4,arg5,arg6)