[csw-devel] SF.net SVN: gar:[2772] csw/mgar/gar/v2/gar.mk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Fri Jan 9 18:39:56 CET 2009


Revision: 2772
          http://gar.svn.sourceforge.net/gar/?rev=2772&view=rev
Author:   dmichelsen
Date:     2009-01-09 17:39:56 +0000 (Fri, 09 Jan 2009)

Log Message:
-----------
mGAR v2: Make sure pre- and post-scripts for specific modulations are called

Modified Paths:
--------------
    csw/mgar/gar/v2/gar.mk

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2009-01-09 16:30:46 UTC (rev 2771)
+++ csw/mgar/gar/v2/gar.mk	2009-01-09 17:39:56 UTC (rev 2772)
@@ -122,7 +122,7 @@
 
 define _modulate_target
 $(1)-$(2):
-	@gmake MODULATION=$(2) $(3) pre-$(1)-$(2) $(1)-modulated post-$(1)-$(2)
+	@gmake MODULATION=$(2) $(3) $(1)-modulated
 	@# This is MAKECOOKIE expanded to use the name of the rule explicily as the rule has
 	@# not been evaluated yet. XXX: Use function _MAKECOOKIE for both
 	@mkdir -p $(COOKIEDIR)/$(dir $(1)-$(2)) && date >> $(COOKIEDIR)/$(1)-$(2)
@@ -132,13 +132,6 @@
 
 define _modulate_target_nocookie
 $(1)-$(2):
-	@gmake -s MODULATION=$(2) $(3) pre-$(1)-$(2) $(1)-modulated post-$(1)-$(2)
-	@# The next line has intentionally been left blank to explicitly terminate this make rule
-
-endef
-
-define _modulate_target_nocookie_noprepost
-$(1)-$(2):
 	@gmake -s MODULATION=$(2) $(3) $(1)-modulated
 	@# The next line has intentionally been left blank to explicitly terminate this make rule
 
@@ -148,16 +141,16 @@
 $(call _modulate_target,extract,$(2),$(4))
 $(call _modulate_target,patch,$(2),$(4))
 $(call _modulate_target,configure,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,reset-configure,$(2),$(4))
+$(call _modulate_target_nocookie,reset-configure,$(2),$(4))
 $(call _modulate_target,build,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,reset-build,$(2),$(4))
+$(call _modulate_target_nocookie,reset-build,$(2),$(4))
 $(call _modulate_target,test,$(2),$(4))
 $(call _modulate_target,install,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,reset-install,$(2),$(4))
+$(call _modulate_target_nocookie,reset-install,$(2),$(4))
 $(call _modulate_target,merge,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,reset-merge,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,clean,$(2),$(4))
-$(call _modulate_target_nocookie_noprepost,_modenv,$(2),$(4))
+$(call _modulate_target_nocookie,reset-merge,$(2),$(4))
+$(call _modulate_target_nocookie,clean,$(2),$(4))
+$(call _modulate_target_nocookie,_modenv,$(2),$(4))
 endef
 
 # This evaluates to the make rules for all modulations passed as first argument
@@ -302,7 +295,7 @@
 extract-modulated: checksum-modulated $(EXTRACTDIR) $(COOKIEDIR) \
 		$(addprefix dep-$(GARDIR)/,$(EXTRACTDEPS)) \
 		announce-modulation \
-		pre-extract-modulated $(EXTRACT_TARGETS) post-extract-modulated
+		pre-extract-modulated pre-extract-$(MODULATION) $(EXTRACT_TARGETS) post-extract-$(MODULATION) post-extract-modulated
 	@$(DONADA)
 
 # returns true if extract has completed successfully, false
@@ -323,7 +316,7 @@
 patch: pre-patch $(addprefix patch-,$(MODULATIONS)) post-patch
 	@$(DONADA)
 
-patch-modulated: extract-modulated $(WORKSRC) pre-patch-modulated $(PATCH_TARGETS) post-patch-modulated
+patch-modulated: extract-modulated $(WORKSRC) pre-patch-modulated pre-patch-$(MODULATION) $(PATCH_TARGETS) post-patch-$(MODULATION) post-patch-modulated
 
 # returns true if patch has completed successfully, false
 # otherwise
@@ -372,7 +365,7 @@
 
 configure-modulated: verify-isa patch-modulated $(CONFIGURE_IMGDEPS) $(CONFIGURE_BUILDDEPS) $(CONFIGURE_DEPS) \
 		$(addprefix srcdep-$(GARDIR)/,$(SOURCEDEPS)) \
-		pre-configure-modulated $(CONFIGURE_TARGETS) post-configure-modulated
+		pre-configure-modulated pre-configure-$(MODULATION) $(CONFIGURE_TARGETS) post-configure-$(MODULATION) post-configure-modulated
 
 .PHONY: reset-configure reset-configure-modulated
 reconfigure: reset-configure configure
@@ -400,7 +393,7 @@
 		$(error Code for the architecture $* can not be produced with the compiler $(GARCOMPILER))      \
 	)
 
-build-modulated: verify-isa configure-modulated pre-build-modulated $(BUILD_TARGETS) post-build-modulated
+build-modulated: verify-isa configure-modulated pre-build-modulated pre-build-$(MODULATION) $(BUILD_TARGETS) post-build-$(MODULATION) post-build-modulated
 	@$(MAKECOOKIE)
 
 # returns true if build has completed successfully, false
@@ -410,10 +403,10 @@
 
 TEST_TARGETS = $(addprefix test-,$(TEST_SCRIPTS))
 
-test: $(addprefix test-,$(MODULATIONS))
+test: pre-test $(addprefix test-,$(MODULATIONS)) post-test
 	$(DONADA)
 
-test-modulated: build-modulated pre-test $(TEST_TARGETS) post-test
+test-modulated: build-modulated pre-test-modulated pre-test-$(MODULATION) $(TEST_TARGETS) post-test-$(MODULATION) post-test-modulated
 	$(DONADA)
 
 # strip - Strip executables
@@ -445,7 +438,7 @@
 install: pre-install $(addprefix install-,$(MODULATIONS)) post-install
 	$(DONADA)
 
-install-modulated: build-modulated $(addprefix dep-$(GARDIR)/,$(INSTALLDEPS)) test-modulated $(INSTALL_DIRS) $(PRE_INSTALL_TARGETS) pre-install-modulated $(INSTALL_TARGETS) post-install-modulated $(POST_INSTALL_TARGETS) 
+install-modulated: build-modulated $(addprefix dep-$(GARDIR)/,$(INSTALLDEPS)) test-modulated $(INSTALL_DIRS) $(PRE_INSTALL_TARGETS) pre-install-modulated pre-install-$(MODULATION) $(INSTALL_TARGETS) post-install-$(MODULATION) post-install-modulated $(POST_INSTALL_TARGETS) 
 	@$(MAKECOOKIE)
 
 # returns true if install has completed successfully, false
@@ -571,7 +564,7 @@
 	@$(DONADA)
 
 # This merges the 
-merge-modulated: install-modulated pre-merge-modulated $(MERGE_TARGETS) post-merge-modulated
+merge-modulated: install-modulated pre-merge-modulated pre-merge-$(MODULATION) $(MERGE_TARGETS) post-merge-$(MODULATION) post-merge-modulated
 	@$(MAKECOOKIE)
 
 # Copy the whole tree verbatim


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list