Mercurial > ~dholland > hg > ag > index.cgi
comparison mk/subdir.mk @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 # | |
2 # subdir.mk - recurse into subdirectories, in portable make. | |
3 # | |
4 # Before including, set: | |
5 # SUBDIRS directories to recurse into | |
6 # MORESUBDIRS extra directories for rules and distclean | |
7 # TARGETS (optional) all targets to provide | |
8 # MORETARGETS (optional) additional targets to provide | |
9 # MYDISTCLEANFILES (optional) files to remove at distclean time | |
10 # | |
11 # Note that directories may be listed in both SUBDIRS and MORESUBDIRS | |
12 # without causing things to duplicate. | |
13 # | |
14 | |
15 TARGETS?=all rules depend agfiles agclean tidy clean distclean $(MORETARGETS) | |
16 | |
17 include $(BUILDTOP)/config.mk | |
18 include rules.mk | |
19 include depend.mk | |
20 | |
21 rules: | |
22 @$(MAKE) rules-here | |
23 @$(MAKE) rules-subdirs | |
24 | |
25 rules-here: | |
26 @$(TOP)/mk/subdir-rules.sh "$(TARGETS)" "$(SUBDIRS)" \ | |
27 "$(MORESUBDIRS)" > rules.mk | |
28 # @echo ' [RULES]' | |
29 | |
30 distclean: | |
31 @$(MAKE) distclean-subdirs | |
32 @$(MAKE) distclean-here | |
33 @if [ "x$(MYDISTCLEANFILES)" != x ]; then \ | |
34 echo ' [RM] $(MYDISTCLEANFILES)'; \ | |
35 rm -f $(MYDISTCLEANFILES); \ | |
36 fi | |
37 | |
38 .PHONY: rules rules-here rules-subdirs | |
39 .PHONY: distclean distclean-here distclean-subdirs |