[csw-devel] SF.net SVN: gar:[3005] csw/mgar/gar/v2/gar.pkg.mk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Fri Feb 6 23:30:12 CET 2009
Revision: 3005
http://gar.svn.sourceforge.net/gar/?rev=3005&view=rev
Author: dmichelsen
Date: 2009-02-06 22:30:12 +0000 (Fri, 06 Feb 2009)
Log Message:
-----------
mGAR v2: Fix function order for proper excludes
Modified Paths:
--------------
csw/mgar/gar/v2/gar.pkg.mk
Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk 2009-02-06 22:11:06 UTC (rev 3004)
+++ csw/mgar/gar/v2/gar.pkg.mk 2009-02-06 22:30:12 UTC (rev 3005)
@@ -28,6 +28,52 @@
SPKG_SPECS ?= $(sort $(basename $(filter %.gspec,$(DISTFILES))) $(PACKAGES))
_PKG_SPECS = $(filter-out $(NOPACKAGE),$(SPKG_SPECS))
+# pkgname - Get the name of a package from a gspec-name or package-name
+#
+# This is a safety function. In sane settings it should return the name
+# of the package given as argument. However, when gspec-files are in DISTFILES
+# it is possible to name the gspec-file differently from the package. This is
+# a very bad idea, but we can handle it!
+#
+# In: arg1 - name of gspec-file or package
+# Out: name of package
+#
+define pkgname
+$(strip
+ $(if $(filter $(1),$(PACKAGES)),
+ $(1),
+ $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "pkgname")' files/$(1).gspec)
+ )
+)
+endef
+
+# catalogname - Get the catalog-name for a package
+#
+# In: arg1 - name of package
+# Out: catalog-name for the package
+#
+define catalogname
+$(strip
+ $(if $(filter $(1),$(PACKAGES)),
+ $(if $(CATALOGNAME_$(1)),
+ $(CATALOGNAME_$(1)),
+ $(if $(CATALOGNAME),
+ $(CATALOGNAME),
+ $(patsubst CSW%,%,$(1))
+ )
+ ),
+ $(if $(realpath files/$(1).gspec),
+ $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "bitname")' files/$(1).gspec),
+ $(error The catalog name for the package '$1' could not be determined, because it was neither in PACKAGES nor was there a gspec-file)
+ )
+ )
+)
+endef
+
+define licensedir
+$(docdir)/$(call catalogname,$(1))
+endef
+
# Set this to your svn binary
SVN ?= /opt/csw/bin/svn
GAWK ?= /opt/csw/bin/gawk
@@ -262,48 +308,6 @@
# - Package-specific defines have precedence over general defines (CATALOGNAME_<pkg>
# before CATALOGNAME etc.)
-# pkgname - Get the name of a package from a gspec-name or package-name
-#
-# This is a safety function. In sane settings it should return the name
-# of the package given as argument. However, when gspec-files are in DISTFILES
-# it is possible to name the gspec-file differently from the package. This is
-# a very bad idea, but we can handle it!
-#
-# In: arg1 - name of gspec-file or package
-# Out: name of package
-#
-define pkgname
-$(strip
- $(if $(filter $(1),$(PACKAGES)),
- $(1),
- $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "pkgname")' files/$(1).gspec)
- )
-)
-endef
-
-# catalogname - Get the catalog-name for a package
-#
-# In: arg1 - name of package
-# Out: catalog-name for the package
-#
-define catalogname
-$(strip
- $(if $(filter $(1),$(PACKAGES)),
- $(if $(CATALOGNAME_$(1)),
- $(CATALOGNAME_$(1)),
- $(if $(CATALOGNAME),
- $(CATALOGNAME),
- $(patsubst CSW%,%,$(1))
- )
- ),
- $(if $(realpath files/$(1).gspec),
- $(shell perl -F'\s+' -ane 'print "$$F[2]" if( $$F[0] eq "%var" && $$F[1] eq "bitname")' files/$(1).gspec),
- $(error The catalog name for the package '$1' could not be determined, because it was neither in PACKAGES nor was there a gspec-file)
- )
- )
-)
-endef
-
# LICENSE may be a path starting with $(WORKROOTDIR) or a filename inside $(WORKSRC)
ifeq ($(origin LICENSE_FULL), undefined)
ifeq ($(origin LICENSE), undefined)
@@ -332,10 +336,6 @@
)
endef
-define licensedir
-$(docdir)/$(call catalogname,$(1))
-endef
-
merge-license-%:
$(_DBG)$(if $(and $(LICENSE_$*),$(LICENSE_FULL_$*)),$(error Both LICENSE_$* and LICENSE_FULL_$* have been specified where only one is allowed)) \
$(if $(and $(filter $*,$(PACKAGES)),$(or $(LICENSE),$(LICENSE_FULL),$(LICENSE_$*),$(LICENSE_FULL_$*))), \
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