File: entry-seq.mk

package info (click to toggle)
openmsx 21.0%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky
  • size: 28,132 kB
  • sloc: cpp: 244,928; xml: 54,344; tcl: 15,603; python: 5,335; perl: 281; sh: 78; makefile: 57
file content (17 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Declares a dependency chain of sequence-<N> on sequence<N-1>, sequence-<N-1>
# on sequence<N-2> etc, where N is the number of words in ACTION_COUNTER.

.PHONY: sequence-$(words $(ACTION_COUNTER))
ifeq ($(words $(ACTION_COUNTER)),0)
sequence-0:
else
NEXT_ACTION_COUNTER:=$(wordlist 2,999999,$(ACTION_COUNTER))

sequence-$(words $(ACTION_COUNTER)): sequence-$(words $(NEXT_ACTION_COUNTER))
	@echo Action: $(word $(@:sequence-%=%),$(MAKECMDGOALS))
	@$(MAKE) --no-print-directory -f build/main.mk \
		$(word $(@:sequence-%=%),$(MAKECMDGOALS))

ACTION_COUNTER:=$(NEXT_ACTION_COUNTER)
include build/entry-seq.mk
endif