File: entry-seq.mk

package info (click to toggle)
openmsx 0.10.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,628 kB
  • ctags: 19,723
  • sloc: cpp: 131,938; xml: 25,418; tcl: 15,394; python: 4,012; sh: 365; makefile: 26
file content (17 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (7)
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