entry-seq.mk 614 B

123456789101112131415161718
  1. # Declares a dependency chain of sequence-<N> on sequence<N-1>, sequence-<N-1>
  2. # on sequence<N-2> etc, where N is the number of words in ACTION_COUNTER.
  3. .PHONY: sequence-$(words $(ACTION_COUNTER))
  4. ifeq ($(words $(ACTION_COUNTER)),0)
  5. sequence-0:
  6. else
  7. NEXT_ACTION_COUNTER:=$(wordlist 2,999999,$(ACTION_COUNTER))
  8. sequence-$(words $(ACTION_COUNTER)): sequence-$(words $(NEXT_ACTION_COUNTER))
  9. @echo Action: $(word $(@:sequence-%=%),$(MAKECMDGOALS))
  10. @$(MAKE) --no-print-directory -f build/main.mk \
  11. $(word $(@:sequence-%=%),$(MAKECMDGOALS))
  12. ACTION_COUNTER:=$(NEXT_ACTION_COUNTER)
  13. include build/entry-seq.mk
  14. endif