main
Michael Hayes 15 years ago
parent 40fc9822b8
commit 52bae61bf7

@ -8,20 +8,27 @@
# using template Makefiles and a python script makemake.py that parses # using template Makefiles and a python script makemake.py that parses
# the applications looking for #includes. # the applications looking for #includes.
APPS = $(filter-out ../apps/README, $(wildcard ../apps/*)) APPDIRS = $(filter-out ../apps/README, $(wildcard ../apps/*))
TESTDIRS = $(APPDIRS)
DOCDIRS = $(addsuffix /doc, $(APPDIRS))
MAKEAPPS = $(addsuffix .apps, $(APPS)) TESTMAKEFILES = $(addsuffix /Makefile.test, $(APPDIRS))
MAKETEST = $(addsuffix .test, $(APPS)) APPMAKEFILES = $(addsuffix /Makefile, $(TESTDIRS))
CLEANAPPS = $(addsuffix .cleanapps, $(APPS)) DOCMAKEFILES = $(addsuffix /Makefile, $(DOCDIRS))
CLEANTEST = $(addsuffix .cleantest, $(APPS))
TESTMAKEFILES = $(addsuffix /Makefile.test, $(APPS)) MAKEAPPS = $(addsuffix .apps, $(APPDIRS))
APPMAKEFILES = $(addsuffix /Makefile, $(APPS)) MAKETESTS = $(addsuffix .tests, $(TESTDIRS))
DOCMAKEFILES = $(addsuffix /doc/Makefile, $(APPS)) MAKEDOCS = $(addsuffix .docs, $(DOCDIRS))
all: testmakefiles appmakefiles apps test docs CLEANAPPS = $(addsuffix .cleanapps, $(APPDIRS))
CLEANTESTS = $(addsuffix .cleantests, $(TESTDIRS))
CLEANDOCS = $(addsuffix .cleandocs, $(APPDIRS))
clean: cleanapps cleantest all: testmakefiles appmakefiles docmakefiles apps tests docs
clean: cleanapps cleantests cleandocs
docmakefiles: $(DOCMAKEFILES)
testmakefiles: $(TESTMAKEFILES) testmakefiles: $(TESTMAKEFILES)
@ -49,11 +56,18 @@ $(MAKEAPPS):
-@$(MAKE) -C $(subst .apps,,$@) -@$(MAKE) -C $(subst .apps,,$@)
# Compile all the test applications. # Compile all the test applications.
test: $(MAKETEST) tests: $(MAKETESTS)
.PHONY: $(MAKETESTS)
$(MAKETESTS):
-@$(MAKE) -f Makefile.test -C $(subst .tests,,$@)
.PHONY: $(MAKETEST) # Make all the docs.
$(MAKETEST): docs: $(MAKEDOCS)
-@$(MAKE) -f Makefile.test -C $(subst .test,,$@)
.PHONY: $(MAKEDOCS)
$(MAKEDOCS):
-@$(MAKE) -C $(subst .docs,,$@)
# Clean all the applications. # Clean all the applications.
cleanapps: $(CLEANAPPS) cleanapps: $(CLEANAPPS)
@ -63,10 +77,17 @@ $(CLEANAPPS):
-@$(MAKE) -C $(subst .cleanapps,,$@) clean -@$(MAKE) -C $(subst .cleanapps,,$@) clean
# Clean all the test applications. # Clean all the test applications.
cleantest: $(CLEANTEST) cleantests: $(CLEANTESTS)
.PHONY: $(CLEANTESTS)
$(CLEANTESTS):
-@$(MAKE) -f Makefile.test -C $(subst .cleantests,,$@) clean
# Clean all the docs.
cleandocs: $(CLEANDOCS)
.PHONY: $(CLEANTEST) .PHONY: $(CLEANDOCS)
$(CLEANTEST): $(CLEANDOCS):
-@$(MAKE) -f Makefile.test -C $(subst .cleantest,,$@) clean -@$(MAKE) -C $(subst .cleandocs,,$@) clean

Loading…
Cancel
Save