@echo "BEGIN BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
cd $(builddir) && make $(MAKEOPTS) install >>$(logfile) 2>&1
@echo "END BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "BEGIN BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ cd $(installdir)/examples && make $(MAKEOPTS) build_examples >>$(logfile) 2>&1
+ @echo "END BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
@echo "BEGIN RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
cd $(installdir)/examples && make $(MAKEOPTS) run_examples >>$(logfile) 2>&1
@echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
default:
endif
-
steps:= $(wildcard step-*)
+%/Makefile:
+ -cd $(@D) && cmake . > configure.log 2>&1
+
.PHONY: configure_examples
configure_examples: $(steps:%=%/Makefile)
-%/Makefile:
- -cd $(@D) && cmake . > configure.log 2>&1
+%/%: %/Makefile
+ cd $(@D) && if [ -f Makefile ]; then (make > build.log 2>&1); fi
+
+.PHONY: build_examples
+build_examples: $(steps:%=%/%)
+
+%/OK: %/%
+ cd $(@D) && if [ -f Makefile ]; then (make run > run.log 2>&1); fi && touch OK
.PHONY: run_examples
run_examples: $(steps:%=%/OK)
-%/OK: %/Makefile
- cd $(@D) && if [ -f Makefile ]; then (make run > run.log 2>&1); fi && touch OK
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams