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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Feb 18 17:30:06 CET 2010


Revision: 8657
          http://gar.svn.sourceforge.net/gar/?rev=8657&view=rev
Author:   dmichelsen
Date:     2010-02-18 16:30:06 +0000 (Thu, 18 Feb 2010)

Log Message:
-----------
mGAR v2: Make sure isaexec work even on calling 'package' directly. This fixes #19

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

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2010-02-18 15:36:19 UTC (rev 8656)
+++ csw/mgar/gar/v2/gar.mk	2010-02-18 16:30:06 UTC (rev 8657)
@@ -613,24 +613,10 @@
 # These directories get relocated into their ISA subdirectories
 MERGE_DIRS ?= $(MERGE_DIRS_$(MODULATION))
 
-# The files in ISAEXEC get relocated and will be replaced by the isaexec-wrapper
-_ISAEXEC_EXCLUDE_FILES = $(bindir)/%-config $(bindir)/%/%-config
-_ISAEXEC_FILES = $(filter-out $(foreach F,$(_ISAEXEC_EXCLUDE_FILES) $(ISAEXEC_EXCLUDE_FILES),$(PKGROOT)$(F)), \
-			$(wildcard $(foreach D,$(ISAEXEC_DIRS),$(PKGROOT)$(D)/* )) \
-		)
-ISAEXEC_FILES ?= $(if $(_ISAEXEC_FILES),$(patsubst $(PKGROOT)%,%,		\
-	$(shell for F in $(_ISAEXEC_FILES); do		\
-		if test -f "$$F" -a \! -h "$$F"; then echo $$F; fi;	\
-	done)),)
-
 ifneq ($(COMMON_PKG_DEPENDS),)
 _EXTRA_GAR_PKGS += $(COMMON_PKG_DEPENDS)
 endif
 
-ifneq ($(ISAEXEC_FILES),)
-_EXTRA_GAR_PKGS += CSWisaexec
-endif
-
 # These merge-rules are actually processed for the current modulation
 MERGE_TARGETS ?= $(addprefix merge-,$(MERGE_SCRIPTS_$(MODULATION))) $(EXTRA_MERGE_TARGETS)
 

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2010-02-18 15:36:19 UTC (rev 8656)
+++ csw/mgar/gar/v2/gar.pkg.mk	2010-02-18 16:30:06 UTC (rev 8657)
@@ -744,7 +744,22 @@
 # unpacked to global/ for packaging. E. g. 'merge' depends only on the specific
 # modulations and does not fill global/.
 ENABLE_CHECK ?= 1
-_package: validateplatform extract-global merge $(SPKG_DESTDIRS) pre-package $(PACKAGE_TARGETS) post-package $(if $(ENABLE_CHECK),pkgcheck)
+
+# The files in ISAEXEC get relocated and will be replaced by the isaexec-wrapper.
+# The trick is to delay the calculcation of the variable values until that time
+# when PKGROOT has already been populated.
+_ISAEXEC_EXCLUDE_FILES = $(bindir)/%-config $(bindir)/%/%-config
+_buildpackage: _ISAEXEC_FILES=$(filter-out $(foreach F,$(_ISAEXEC_EXCLUDE_FILES) $(ISAEXEC_EXCLUDE_FILES),$(PKGROOT)$(F)), \
+			$(wildcard $(foreach D,$(ISAEXEC_DIRS),$(PKGROOT)$(D)/* )) \
+		)
+_buildpackage: ISAEXEC_FILES ?= $(if $(_ISAEXEC_FILES),$(patsubst $(PKGROOT)%,%,               \
+			$(shell for F in $(_ISAEXEC_FILES); do          \
+				if test -f "$$F" -a \! -h "$$F"; then echo $$F; fi;     \
+			done)),)
+_buildpackage: _EXTRA_GAR_PKGS += $(if $(ISAEXEC_FILES),CSWisaexec)
+_buildpackage: pre-package $(PACKAGE_TARGETS) post-package $(if $(ENABLE_CHECK),pkgcheck)
+
+_package: validateplatform extract-global merge $(SPKG_DESTDIRS) _buildpackage
 	@$(MAKECOOKIE)
 
 package: _package


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