summaryrefslogtreecommitdiffstats
path: root/automake/subdirs.am
blob: 267fa24025a2ba94966a2dd4034d0764d5b97cb9 (plain) (blame)
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
## $Id$

## Borrowed from automake-1.4, adapted to support RTEMS's 
## "make debug", "make debug_install", "make profile", "make profile_install"

## NOTE: This is a temporary work-around to keep 
## "make debug" and "make debug_install" working.
## Once automake is fully integrated these make targets 
## and this file will probably be removed

preinstall-recursive \
debug-recursive debug_install-recursive \
profile-recursive profile_install-recursive:
	@set fnord $(MAKEFLAGS); amf=$$2; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
## This trick allows "-k" to keep its natural meaning when running a
## recursive rule.
	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

debug: debug-recursive

debug_install: debug_install-recursive

profile: profile-recursive

profile_install: profile_install-recursive

preinstall: preinstall-recursive

.PHONY: \
debug debug-recursive \
debug_install \
profile profile-recursive \
profile_install \
preinstall preinstall-recursive