Add 'examples' top level Makefile for building all examples together
This commit is contained in:
parent
70cec6c3b7
commit
9e3328abe8
1 changed files with 29 additions and 0 deletions
29
examples/Makefile
Normal file
29
examples/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
warning:
|
||||
@echo "******************************************************"
|
||||
@echo "You may not want this Makefile, even though it's here!"
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
@echo "SUGGESTIONS:"
|
||||
@echo "Running 'make' in one of the subdirectories will build a single example."
|
||||
@echo "Running 'make help' in one of the subdirectories will print some help."
|
||||
@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
|
||||
|
||||
build-examples:
|
||||
set -e
|
||||
for example in `find . -mindepth 2 -name Makefile | sed s/Makefile//)`; do
|
||||
$(MAKE) -C $$example
|
||||
done
|
||||
|
||||
rebuild-examples:
|
||||
set -e
|
||||
for example in `find . -mindepth 2 -name Makefile | sed s/Makefile//)`; do
|
||||
$(MAKE) -C $$example rebuild
|
||||
done
|
||||
|
||||
.PHONY: warning rebuild-examples build-examples
|
||||
.NOTPARALLEL:
|
||||
.ONESHELL:
|
Loading…
Reference in a new issue