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

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Mon Oct 11 17:45:32 CEST 2010


Revision: 11250
          http://gar.svn.sourceforge.net/gar/?rev=11250&view=rev
Author:   bdwalton
Date:     2010-10-11 15:45:32 +0000 (Mon, 11 Oct 2010)

Log Message:
-----------
gar/v2: detect missing or duplicate SPKG_DESC values without calls to shell (heavy weight, side effects with var expansion in corner cases)

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

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2010-10-11 15:43:14 UTC (rev 11249)
+++ csw/mgar/gar/v2/gar.pkg.mk	2010-10-11 15:45:32 UTC (rev 11250)
@@ -551,11 +551,13 @@
 
 # Make sure every producable package contains specific descriptions.
 # We explicitly ignore NOPACKAGE here to disallow circumventing the check.
+$(if $(filter-out $(firstword $(SPKG_SPECS)),$(SPKG_SPECS)),\
+	$(foreach P,$(SPKG_SPECS),\
+		$(if $(SPKG_DESC_$(P)),,$(error Multiple packages defined and SPKG_DESC_$(P) is not set.))))
+
 $(foreach P,$(SPKG_SPECS),\
-  $(foreach Q,$(filter-out $P,$(SPKG_SPECS)),\
-    $(if $(shell if test "$(SPKG_DESC_$P)" = "$(SPKG_DESC_$Q)"; then echo ERROR; fi),\
-      $(error The package descriptions for $P and $Q are identical, please make sure all package descriptions are unique by setting SPKG_DESC_<pkg> for each package) \
-)))
+  $(foreach Q,$(filter-out $(P),$(SPKG_SPECS)),\
+	$(if $(filter-out $(sort $(SPKG_DESC_$(P))),$(sort $(SPKG_DESC_$(P)) $(SPKG_DESC_$(Q)))),,$(error The package descriptions for $(P) [$(if $(SPKG_DESC_$(P)),$(SPKG_DESC_$(P)),<not set>)] and $(Q) [$(if $(SPKG_DESC_$(Q)),$(SPKG_DESC_$(Q)),<not set>)] are identical.  Please make sure that all descriptions are unique by setting SPKG_DESC_<pkg> for each package.))))
 
 .PRECIOUS: $(WORKDIR)/%.pkginfo
 


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