diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-09-16 19:47:15 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-09-16 19:47:37 +0200 |
commit | 91a7e5adce8178ba83abc3a701dfd622dbbcc1bf (patch) | |
tree | 7126908128da8e4b8b8f8e9cc87a94f03275211f /Makefile.in | |
parent | remove -r hint -- we are enabling it ourselves in gbuild.mk (diff) | |
download | core-91a7e5adce8178ba83abc3a701dfd622dbbcc1bf.tar.gz core-91a7e5adce8178ba83abc3a701dfd622dbbcc1bf.zip |
fail early when having mixed build/check targets, also escape GNUMAKE correctly
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in index 960f7d191255..67cf587d3eaa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,12 +8,19 @@ else CROSS_TOOLSET_RULE:= endif -.PHONY : build dev-install check allcheck unitcheck subsequentcheck all cross-build-toolset install distro-pack-install clean distclean findunusedcode +ifeq ($(filter all check unitcheck,$(MAKECMDGOALS)),) +gb_MAKETARGET=build +else +# fail early +gb_MAKETARGET=all +endif + +.PHONY : build dev-install all cross-build-toolset install distro-pack-install clean distclean findunusedcode build: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ src.downloaded $(CROSS_TOOLSET_RULE) @. ./Env.Host.sh && \ - cd instsetoo_native && \ - gb_MAKETARGET=build build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@ + cd instsetoo_native && \ + gb_MAKETARGET=$(gb_MAKETARGET) build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@ dev-install: build @. ./Env.Host.sh && \ @@ -33,11 +40,13 @@ dev-install: build fi check : allcheck + @true + %check: - @. ./Env.Host.sh && $(GNUMAKE) -f "$$SRC_ROOT"/GNUmakefile.mk -r \ - $(if @VERBOSE@,,-s) --jobs="$(if \ - $(CHECK_PARALLELISM),$(CHECK_PARALLELISM),@GMAKE_PARALLELISM@)" \ - $(patsubst allcheck,check,$@) + @. ./Env.Host.sh && $$GNUMAKE -f "$$SRC_ROOT"/GNUmakefile.mk -r \ + $(if @VERBOSE@,,-s) --jobs="$(if \ + $(CHECK_PARALLELISM),$(CHECK_PARALLELISM),@GMAKE_PARALLELISM@)" \ + $(patsubst allcheck,check,$@) all: build unitcheck @@ -126,9 +135,9 @@ findunusedcode: @. ./Env.Host.sh && \ source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \ callanalyse \ - $$WORKDIR/LinkTarget/*/* \ - */$$OUTPATH/bin/* \ - */$$OUTPATH/lib/* > unusedcode.all + $$WORKDIR/LinkTarget/*/* \ + */$$OUTPATH/bin/* \ + */$$OUTPATH/lib/* > unusedcode.all #because non-c++ symbols could be dlsymed lets make a list of class level #unused methods which don't require much effort to determine if they need #to be just removed, or put behind appropiate platform or debug level ifdefs |