2015-08-21 05:53:34 +00:00
|
|
|
EXAMPLES = $(shell find $(dir $(lastword $(MAKEFILE_LIST))) -mindepth 2 -name Makefile | sed s/Makefile//g)
|
|
|
|
# Generate some dummy .dummybuild/.dummyrebuild target files
|
|
|
|
EXAMPLES_BUILD = $(patsubst %,%.dummybuild,$(EXAMPLES))
|
|
|
|
EXAMPLES_REBUILD = $(patsubst %,%.dummyrebuild,$(EXAMPLES))
|
|
|
|
|
2015-06-02 07:14:17 +00:00
|
|
|
warning:
|
|
|
|
@echo "******************************************************"
|
|
|
|
@echo "You may not want this Makefile, even though it's here!"
|
|
|
|
@echo "******************************************************"
|
|
|
|
@echo ""
|
|
|
|
@echo "SUGGESTIONS:"
|
2015-08-21 05:53:34 +00:00
|
|
|
@echo "Running 'make' in one of the subdirectories of examples/ will build a single example."
|
|
|
|
@echo "Running 'make help' in one of the subdirectories of examples/ will print some help."
|
2015-06-02 07:14:17 +00:00
|
|
|
@echo ""
|
|
|
|
@echo "OTHERWISE:"
|
|
|
|
@echo "This makefile is for building all of the examples at once, as a developer test."
|
|
|
|
@echo "To use it, run 'make build-examples' or 'make rebuild-examples'"
|
|
|
|
@echo
|
|
|
|
|
2015-08-21 05:53:34 +00:00
|
|
|
build-examples: $(EXAMPLES_BUILD)
|
|
|
|
|
|
|
|
rebuild-examples: $(EXAMPLES_REBUILD)
|
|
|
|
|
|
|
|
%.dummybuild:
|
|
|
|
make -C $(dir $@)
|
2015-06-02 07:14:17 +00:00
|
|
|
|
2015-08-21 05:53:34 +00:00
|
|
|
%.dummyrebuild:
|
|
|
|
make -C $(dir $@) rebuild
|
2015-06-02 07:14:17 +00:00
|
|
|
|
|
|
|
.PHONY: warning rebuild-examples build-examples
|
|
|
|
.NOTPARALLEL:
|
|
|
|
.ONESHELL:
|