More control on output from top level Makefile

Move the '-k -s' flags to a new FLAGS variable which can then be overridden
on the command line.
This commit is contained in:
William S Fulton 2013-12-08 19:48:39 +00:00
commit 2d0dc707e6

View file

@ -9,9 +9,16 @@ exec_prefix = @exec_prefix@
srcdir = @srcdir@ srcdir = @srcdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
############################################################################## #####################################################################
# Make options - override these to see more output
#####################################################################
RUNPIPE = \>/dev/null
FLAGS = -k -s
#####################################################################
# Compiler and system configuration # Compiler and system configuration
############################################################################## #####################################################################
SHELL = /bin/sh SHELL = /bin/sh
SWIG_LIB = @swig_lib@ SWIG_LIB = @swig_lib@
@ -23,7 +30,6 @@ SOURCE = Source
CCACHE = CCache CCACHE = CCache
DOCS = Doc/Manual DOCS = Doc/Manual
HAVE_CXX11_COMPILER = @HAVE_CXX11_COMPILER@ HAVE_CXX11_COMPILER = @HAVE_CXX11_COMPILER@
RUNPIPE = \>/dev/null
swig: libfiles source ccache swig: libfiles source ccache
@ -160,7 +166,7 @@ check-%-version :
echo skipping $* version; \ echo skipping $* version; \
else \ else \
echo showing $* version; \ echo showing $* version; \
(cd Examples && $(MAKE) -s $*_version) \ (cd Examples && $(MAKE) $(FLAGS) $*_version) \
fi fi
# Checks examples for compilation (does not run them) # Checks examples for compilation (does not run them)
@ -224,13 +230,13 @@ check-%-examples :
elif test -z "$($(strip $*_examples))"; then \ elif test -z "$($(strip $*_examples))"; then \
echo empty $* $(ACTION); \ echo empty $* $(ACTION); \
else \ else \
$(MAKE) -k -s $($*_examples:=.actionexample) LANGUAGE=$* ACTION=$(ACTION); \ $(MAKE) $(FLAGS) $($*_examples:=.actionexample) LANGUAGE=$* ACTION=$(ACTION); \
fi fi
# individual example # individual example
%.actionexample: %.actionexample:
@echo $(ACTION)ing Examples/$(LANGUAGE)/$* @echo $(ACTION)ing Examples/$(LANGUAGE)/$*
@(cd Examples/$(LANGUAGE)/$* && $(MAKE) -s $(chk-set-env) $(ACTION) RUNPIPE=$(RUNPIPE)) @(cd Examples/$(LANGUAGE)/$* && $(MAKE) $(FLAGS) $(chk-set-env) $(ACTION) RUNPIPE=$(RUNPIPE))
# gcj individual example # gcj individual example
java.actionexample: java.actionexample:
@ -238,7 +244,7 @@ java.actionexample:
echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \ echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \
else \ else \
echo $(ACTION)ing Examples/$(LANGUAGE)/java; \ echo $(ACTION)ing Examples/$(LANGUAGE)/java; \
(cd Examples/$(LANGUAGE)/java && $(MAKE) -s $(chk-set-env) $(ACTION)) \ (cd Examples/$(LANGUAGE)/java && $(MAKE) $(FLAGS) $(chk-set-env) $(ACTION)) \
fi fi
# Checks testcases in the test-suite excluding those which are known to be broken # Checks testcases in the test-suite excluding those which are known to be broken
@ -279,17 +285,17 @@ check-%-test-suite:
echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\ echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\
else \ else \
echo $(ACTION)ing $* test-suite; \ echo $(ACTION)ing $* test-suite; \
(cd $$dir && $(MAKE) -k -s $(ACTION) HAVE_CXX11_COMPILER=$(HAVE_CXX11_COMPILER)) \ (cd $$dir && $(MAKE) $(FLAGS) $(ACTION) HAVE_CXX11_COMPILER=$(HAVE_CXX11_COMPILER)) \
|| passed=false; \ || passed=false; \
fi; \ fi; \
test $$passed = true test $$passed = true
# Partial test-suite check - it only invokes SWIG, ie no compilation and no runtime testing # Partial test-suite check - it only invokes SWIG, ie no compilation and no runtime testing
partialcheck-test-suite: partialcheck-test-suite:
@$(MAKE) -k -s check-test-suite ACTION=partialcheck NOSKIP=1 @$(MAKE) $(FLAGS) check-test-suite ACTION=partialcheck NOSKIP=1
partialcheck-%-test-suite: partialcheck-%-test-suite:
@$(MAKE) -k -s check-$*-test-suite ACTION=partialcheck NOSKIP=1 @$(MAKE) $(FLAGS) check-$*-test-suite ACTION=partialcheck NOSKIP=1
check: check-aliveness check-ccache check-versions check-examples check-test-suite check: check-aliveness check-ccache check-versions check-examples check-test-suite
@ -319,7 +325,7 @@ all-test-suite: \
all-d-test-suite all-d-test-suite
all-%-test-suite: all-%-test-suite:
@$(MAKE) -k -s check-$*-test-suite ACTION=all @$(MAKE) $(FLAGS) check-$*-test-suite ACTION=all
# Run known-to-be-broken testcases in the test-suite # Run known-to-be-broken testcases in the test-suite
broken-test-suite: \ broken-test-suite: \
@ -347,7 +353,7 @@ broken-test-suite: \
broken-d-test-suite broken-d-test-suite
broken-%-test-suite: broken-%-test-suite:
@$(MAKE) -k -s check-$*-test-suite ACTION=broken @$(MAKE) $(FLAGS) check-$*-test-suite ACTION=broken
##################################################################### #####################################################################
# CLEAN # CLEAN
@ -359,23 +365,23 @@ clean-objects: clean-source clean-ccache
clean-source: clean-source:
@echo cleaning Source @echo cleaning Source
@cd $(SOURCE) && $(MAKE) -s clean @cd $(SOURCE) && $(MAKE) $(FLAGS) clean
@rm -f $(TARGET) @rm -f $(TARGET)
clean-examples: clean-examples:
@$(MAKE) -k -s check-examples ACTION=clean @$(MAKE) $(FLAGS) check-examples ACTION=clean
clean-test-suite: clean-test-suite:
@$(MAKE) -k -s check-test-suite ACTION=clean NOSKIP=1 @$(MAKE) $(FLAGS) check-test-suite ACTION=clean NOSKIP=1
clean-%-examples: clean-%-examples:
@$(MAKE) -k -s check-$*-examples ACTION=clean @$(MAKE) $(FLAGS) check-$*-examples ACTION=clean
clean-%-test-suite: clean-%-test-suite:
@$(MAKE) -k -s check-$*-test-suite ACTION=clean NOSKIP=1 @$(MAKE) $(FLAGS) check-$*-test-suite ACTION=clean NOSKIP=1
clean-ccache: clean-ccache:
test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s clean) test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) $(FLAGS) clean)
##################################################################### #####################################################################
# DISTCLEAN - clean what configure built # DISTCLEAN - clean what configure built
@ -389,20 +395,20 @@ distclean: distclean-source distclean-ccache distclean-helper
distclean-source: distclean-source:
@echo distcleaning Source @echo distcleaning Source
@cd $(SOURCE) && $(MAKE) -s distclean @cd $(SOURCE) && $(MAKE) $(FLAGS) distclean
@rm -f $(TARGET) @rm -f $(TARGET)
distclean-test-suite: distclean-test-suite:
@echo distcleaning Examples/test-suite @echo distcleaning Examples/test-suite
@$(MAKE) -k -s check-test-suite ACTION=distclean NOSKIP=1 @$(MAKE) $(FLAGS) check-test-suite ACTION=distclean NOSKIP=1
distclean-examples: distclean-examples:
@echo distcleaning Examples @echo distcleaning Examples
@$(MAKE) -k -s clean-examples @$(MAKE) $(FLAGS) clean-examples
@cd Examples && $(MAKE) -k -s distclean @cd Examples && $(MAKE) $(FLAGS) distclean
distclean-ccache: distclean-ccache:
@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s distclean) @test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) $(FLAGS) distclean)
distclean-dead: distclean-dead:
rm -f $(DISTCLEAN-DEAD) rm -f $(DISTCLEAN-DEAD)
@ -416,15 +422,15 @@ distclean-dead:
maintainer-clean: maintainer-clean:
@echo maintainer-cleaning source @echo maintainer-cleaning source
@cd $(SOURCE) && $(MAKE) -k -s maintainer-clean @cd $(SOURCE) && $(MAKE) $(FLAGS) maintainer-clean
@echo maintainer-cleaning CCache @echo maintainer-cleaning CCache
@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s maintainer-clean) @test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) $(FLAGS) maintainer-clean)
@echo maintainer-cleaning docs @echo maintainer-cleaning docs
@cd $(DOCS) && $(MAKE) -k -s maintainer-clean @cd $(DOCS) && $(MAKE) $(FLAGS) maintainer-clean
@echo maintainer-cleaning Lib files @echo maintainer-cleaning Lib files
@rm -f $(srcdir)/Lib/swigwarn.swg @rm -f $(srcdir)/Lib/swigwarn.swg
@echo distcleaning @echo distcleaning
@$(MAKE) -k -s distclean-helper @$(MAKE) $(FLAGS) distclean-helper
##################################################################### #####################################################################
# Update the Lib/swigwarn.swg file # Update the Lib/swigwarn.swg file
@ -492,7 +498,7 @@ install-lib:
done done
install-ccache: install-ccache:
@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s install) @test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) install)
##################################################################### #####################################################################