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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Tue Dec 9 09:53:59 CET 2008


Revision: 2478
          http://gar.svn.sourceforge.net/gar/?rev=2478&view=rev
Author:   dmichelsen
Date:     2008-12-09 08:53:59 +0000 (Tue, 09 Dec 2008)

Log Message:
-----------
mGAR v2: Use inline dynamic dependencies, prototypes target, prototype filter now work

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

Removed Paths:
-------------
    csw/mgar/gar/v2/bin/dependon

Deleted: csw/mgar/gar/v2/bin/dependon
===================================================================
--- csw/mgar/gar/v2/bin/dependon	2008-12-08 23:07:54 UTC (rev 2477)
+++ csw/mgar/gar/v2/bin/dependon	2008-12-09 08:53:59 UTC (rev 2478)
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-/usr/bin/pkginfo "$@" | awk '{ $1 = "P"; print }'

Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk	2008-12-08 23:07:54 UTC (rev 2477)
+++ csw/mgar/gar/v2/gar.conf.mk	2008-12-09 08:53:59 UTC (rev 2478)
@@ -22,6 +22,7 @@
 COOKIEDIR ?= $(COOKIEROOTDIR)/$(MODULATION)
 EXTRACTDIR ?= $(WORKDIR)
 WORKSRC ?= $(WORKDIR)/$(DISTNAME)
+WORKSRC_DEFAULT ?= $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))/$(DISTNAME)
 INSTALLISADIR ?= $(WORKROOTDIR)/install-$(MODULATION)
 PKGDIR ?= $(WORKROOTDIR)/package
 SCRATCHDIR ?= tmp

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2008-12-08 23:07:54 UTC (rev 2477)
+++ csw/mgar/gar/v2/gar.mk	2008-12-09 08:53:59 UTC (rev 2478)
@@ -295,7 +295,8 @@
 garchive: checksum $(GARCHIVE_TARGETS) ;
 
 # extract		- Unpacks $(DISTFILES) into $(EXTRACTDIR) (patches are "zcatted" into the patch program)
-EXTRACT_TARGETS = $(addprefix extract-archive-,$(filter-out $(NOEXTRACT),$(DISTFILES)))
+EXTRACT_TARGETS-global ?= $(foreach SPEC,$(SPKG_SPECS),$(filter $(SPEC).%,$(DISTFILES)))
+EXTRACT_TARGETS = $(addprefix extract-archive-,$(filter-out $(NOEXTRACT),$(if $(EXTRACT_TARGETS-$(MODULATION)),$(EXTRACT_TARGETS-$(MODULATION)),$(DISTFILES))))
 
 # We call an additional extract-modulated without resetting any variables so
 # a complete unpacked set goes to the global dir for packaging (like gspec)

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2008-12-08 23:07:54 UTC (rev 2477)
+++ csw/mgar/gar/v2/gar.pkg.mk	2008-12-09 08:53:59 UTC (rev 2478)
@@ -61,7 +61,7 @@
 PKGLIB = $(CURDIR)/$(GARDIR)/pkglib
 
 PKG_EXPORTS  = GARNAME GARVERSION DESCRIPTION CATEGORIES GARCH GARDIR GARBIN
-PKG_EXPORTS += CURDIR WORKDIR WORKSRC
+PKG_EXPORTS += CURDIR WORKDIR WORKSRC WORKSRC_DEFAULT PKGROOT
 PKG_EXPORTS += SPKG_REVSTAMP SPKG_PKGNAME SPKG_DESC SPKG_VERSION SPKG_CATEGORY
 PKG_EXPORTS += SPKG_VENDOR SPKG_EMAIL SPKG_PSTAMP SPKG_BASEDIR SPKG_CLASSES
 PKG_EXPORTS += SPKG_OSNAME SPKG_SOURCEURL SPKG_PACKAGER TIMESTAMP
@@ -107,7 +107,6 @@
 PKGFILES_DEVEL += $(mandir)/man1/.*-config\.1.*
 PKGFILES_DEVEL += $(mandir)/man3/.*
 
-
 # PKGFILES_DOC selects files beloging to a documentation package
 PKGFILES_DOC  = $(docdir)/.*
 
@@ -132,8 +131,8 @@
 # This can be used to automatically distribute the files to different packages
 #
 
-$(foreach SPEC,$(_PKG_SPECS),$(eval _PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER_$(SPEC))))
-$(foreach SPEC,$(_PKG_SPECS),$(eval _PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER)))
+$(foreach SPEC,$(_PKG_SPECS),$(if $(PROTOTYPE_FILTER_$(SPEC)),$(eval _PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER_$(SPEC)))))
+$(foreach SPEC,$(_PKG_SPECS),$(if $(PROTOTYPE_FILTER),$(eval _PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER))))
 
 # This file contains all installed pathes. This can be used as a starting point
 # for distributing files to individual packages.
@@ -165,16 +164,18 @@
 $(WORKDIR)/%.prototype-$(GARCH): | $(WORKDIR)/%.prototype
 	@cat $(WORKDIR)/$*.prototype $(_PROTOTYPE_FILTER_$*) >$@
 
-# This is a target used to generate all prototypes for debugging purposes.
-# On a normal packaging workflow this is not used.
-prototypes: extract merge $(SPKG_DESTDIRS) pre-package $(foreach S,$(_PKG_SPECS),$(WORKDIR)/$S.prototype-$(GARCH))
-	@$(DONADA)
-
 # $_EXTRA_GAR_PKGS is for dynamic dependencies added by GAR itself (like CSWisaexec or CSWcswclassutils)
 .PRECIOUS: $(WORKDIR)/%.depend
 $(WORKDIR)/%.depend:
-	$(GARDIR)/bin/dependon $(_EXTRA_GAR_PKGS) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS) > $@
+	$(if $(_EXTRA_GAR_PKGS)$(REQUIRED_PKGS_$*)$(REQUIRED_PKGS), \
+		($(foreach PKG,$(_EXTRA_GAR_PKGS) $(REQUIRED_PKGS_$*) $(REQUIRED_PKGS),\
+			$(if $(SPKG_DESC_$(PKG)), \
+				echo "P $(PKG) $(call _pkglist_catalogname,$(PKG)) - $(SPKG_DESC_$(PKG))";, \
+				echo "$(shell /usr/bin/pkginfo $(PKG) | awk '{ $$1 = \"P\"; print }')"; \
+			) \
+		)) >$@)
 
+
 # package - Use the mkpackage utility to create Solaris packages
 #
 
@@ -189,6 +190,10 @@
 $(SPKG_DESTDIRS):
 	ginstall -d $@
 
+# This is a target used to generate all prototypes for debugging purposes.
+# On a normal packaging workflow this is not used.
+prototypes: extract merge $(SPKG_DESTDIRS) pre-package $(foreach SPEC,$(_PKG_SPECS),$(WORKDIR)/$(SPEC).prototype-$(GARCH))
+
 # We depend on extract as the additional package files (like .gspec) must be
 # unpacked to global/ for packaging. E. g. 'merge' depends only on the specific
 # modulations and does not fill global/.
@@ -224,7 +229,7 @@
 
 # pkgreset - reset working directory for repackaging
 #
-pkgreset: $(addprefix pkgreset-,$(_PKG_SPECS))
+pkgreset: $(addprefix pkgreset-,$(SPKG_SPECS))
 	@rm -f $(COOKIEDIR)/extract
 	@rm -f $(COOKIEDIR)/extract-archive-*
 	$(DONADA)


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