Bug 920055 - Honor install-strip and STRIP_FLAGS when packaging tests. r=ted

--HG--
extra : rebase_source : 6845c548309113cecdf30d6ca3a885b39b0c0d03
This commit is contained in:
Christian Holler 2013-09-28 00:48:06 +02:00
parent f0500f6a4e
commit 83fdc47ab0

View File

@ -496,10 +496,16 @@ stage-modules: make-stage-dir
CPP_UNIT_TEST_BINS=$(wildcard $(DIST)/cppunittests/*)
ifdef OBJCOPY
ifndef PKG_SKIP_STRIP
STRIP_CPP_TESTS := 1
endif
endif
stage-cppunittests:
$(NSINSTALL) -D $(PKG_STAGE)/cppunittests
ifdef OBJCOPY
$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) --strip-unneeded $(bin) $(bin:$(DIST)/%=$(PKG_STAGE)/%);)
ifdef STRIP_CPP_TESTS
$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) $(STRIP_FLAGS) $(bin) $(bin:$(DIST)/%=$(PKG_STAGE)/%);)
else
cp -RL $(DIST)/cppunittests $(PKG_STAGE)
endif