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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Dec 7 11:20:51 CET 2009


Revision: 7573
          http://gar.svn.sourceforge.net/gar/?rev=7573&view=rev
Author:   dmichelsen
Date:     2009-12-07 10:20:50 +0000 (Mon, 07 Dec 2009)

Log Message:
-----------
mGAR v2: Dynamically inspect the prototype for each package to see if it should depend on CSWcswclassutils

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-12-07 09:20:11 UTC (rev 7572)
+++ csw/mgar/gar/v2/gar.pkg.mk	2009-12-07 10:20:50 UTC (rev 7573)
@@ -208,13 +208,15 @@
 		$(foreach FILE,$(TEXINFO),$$F[1] = "cswtexinfo" if( $$F[2] =~ m(^$(FILE)$$) );)\
 		print join(" ", at F),"\n";'
 
-# The TEXINFO dependency is handled dynamically by looking at the prototype for matching files
-ifneq ($(MIGRATECONF)$(SAMPLECONF)$(PRESERVECONF)$(ETCSERVICES)$(INETDCONF)$(INITSMF)$(USERGROUP)$(PYCOMPILE),)
-_EXTRA_GAR_PKGS += CSWcswclassutils
+# If you add another filter above, also add the class to this list. It is used
+# to detect if a package needs to depends on CSWcswclassutils by looking at
+# files belonging to one of these in the prototype.
+_CSWCLASSES  = cswmigrateconf cswcpsampleconf cswpreserveconf cswetcservices cswinetd cswinitsmf
+_CSWCLASSES += cswusergroup cswcrontab cswpycompile cswtexinfo
+
 # Make sure the configuration files always have a .CSW suffix and rename the
 # configuration files to this if necessary during merge.
 _EXTRA_PAX_ARGS += $(foreach FILE,$(SAMPLECONF:%\.CSW=%) $(PRESERVECONF:%\.CSW=%),-s ",^\.\($(FILE)\)$$,.\1\.CSW,p")
-endif
 
 PKGGET_DESTDIR ?=
 
@@ -427,7 +429,7 @@
 # The dependencies to CSWcswclassutils and CSWtexinfo are only added if there are files
 # actually matching the _TEXINFO_FILTER. This is done at the prototype-level.
 $(WORKDIR)/%.depend: $(WORKDIR)/$*.prototype
-$(WORKDIR)/%.depend: _EXTRA_GAR_PKGS += $(if $(shell cat $(WORKDIR)/$*.prototype | perl -ane '$(foreach FILE,$(TEXINFO),print "$$F[2]\n" if( $$F[2] =~ m(^$(FILE)$$) );)'),CSWcswclassutils)
+$(WORKDIR)/%.depend: _EXTRA_GAR_PKGS += $(if $(strip $(shell cat $(WORKDIR)/$*.prototype | perl -ane '$(foreach C,$(_CSWCLASSES),print "$C\n" if( $$F[1] eq "$C");)')),CSWcswclassutils)
 
 $(WORKDIR)/%.depend: $(WORKDIR)
 	$(_DBG)$(if $(_EXTRA_GAR_PKGS)$(REQUIRED_PKGS_$*)$(REQUIRED_PKGS)$(INCOMPATIBLE_PKGS)$(INCOMPATIBLE_PKGS_$*), \


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