recursive.am 1.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
# Recursive Makefile targets
# --------------------------

if ENABLE_COVERAGE
COVERAGE_RECURSIVE = coverage-recursive
coverage: $(COVERAGE_RECURSIVE)
endif

all-recursive: built-sources-recursive
built-sources: built-sources-recursive 
clean-built-sources: clean-built-sources-recursive
valcheck: valcheck-recursive

SOFIA_RECURSIVE = \
	valcheck-recursive \
	$(COVERAGE_RECURSIVE)

SOFIA_DIST_RECURSIVE = \
	built-sources-recursive \
	clean-built-sources-recursive

$(SOFIA_RECURSIVE):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
	  || eval $$failcom; \
	done; \
	test -z "$$fail"

$(SOFIA_DIST_RECURSIVE):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
	  || eval $$failcom; \
	done; \
	test -z "$$fail"