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

skayser at users.sourceforge.net skayser at users.sourceforge.net
Wed Dec 1 00:00:34 CET 2010


Revision: 11744
          http://gar.svn.sourceforge.net/gar/?rev=11744&view=rev
Author:   skayser
Date:     2010-11-30 23:00:34 +0000 (Tue, 30 Nov 2010)

Log Message:
-----------
gar/v2-noexternals: drop the requirement for the $GARDIR env variable

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

Modified: csw/mgar/gar/v2-noexternals/category.mk
===================================================================
--- csw/mgar/gar/v2-noexternals/category.mk	2010-11-30 15:51:57 UTC (rev 11743)
+++ csw/mgar/gar/v2-noexternals/category.mk	2010-11-30 23:00:34 UTC (rev 11744)
@@ -1,13 +1,12 @@
 # vim: ft=make ts=4 sw=4 noet
-# This makefile is to be included from Makefiles in each category
-# directory.
+#
+# This Makefile is the main entry point to GAR and is included by
+# each package build description. As such, the file name 'category.mk'
+# is slightly misleading and could be subject to future change.
+#
 
-# This is needed by the pkg build approach with gar/ in each pkg build
-# directory and is overriden by the "mgar" wrapper which pre-sets GARDIR
-# with an absolute path. If we could determine the full path of
-# _this_ file's directory, we could use it for both approaches and
-# there would be no need to pre-set it for "mgar".
-GARDIR ?= $(CURDIR)/gar
+# Determine this file's directory, i.e. the GAR base directory
+GARDIR := $(dir $(lastword $(MAKEFILE_LIST)))
 
 ifeq (,$(wildcard $(GARDIR)/categories/$(CATEGORIES)/category.mk))
   $(error The category '$(CATEGORIES)' is invalid. Valid categories are: $(patsubst $(GARDIR)/categories/%,%,$(wildcard $(GARDIR)/categories/*)))

Modified: csw/mgar/gar/v2-noexternals/gar.mk
===================================================================
--- csw/mgar/gar/v2-noexternals/gar.mk	2010-11-30 15:51:57 UTC (rev 11743)
+++ csw/mgar/gar/v2-noexternals/gar.mk	2010-11-30 23:00:34 UTC (rev 11744)
@@ -11,21 +11,11 @@
 # Comment this out to make much verbosity
 #.SILENT:
 
-#ifeq ($(origin GARDIR), undefined)
-#GARDIR := $(CURDIR)/../..
-#endif
-
-#GARDIR ?= ../..
-#ifeq ($(origin GARDIR), undefined)
-#GARDIR := $(CURDIR)/../..
-#endif
-
 ifneq ($(abspath /),/)
 $(error Your version of 'make' is too old: $(MAKE_VERSION). Please make sure you are using at least 3.81)
 endif
 
-# Still required? GARDIR should be pre-set by the top-level category.mk
-GARDIR ?= gar
+# $(GARDIR) is pre-set by the top-level category.mk
 GARBIN  = $(GARDIR)/bin
 
 DIRSTODOTS = $(subst . /,./,$(patsubst %,/..,$(subst /, ,/$(1))))
@@ -136,7 +126,7 @@
 merge-$(2):
 	@echo "[===== Building modulation '$(2)' on host '$$(BUILDHOST)' =====]"
 	$$(if $$(and $$(BUILDHOST),$$(filter-out $$(THISHOST),$$(BUILDHOST))),\
-		$(SSH) $$(BUILDHOST) "PATH=$$(PATH) GARDIR=$(GARDIR) MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $$(CURDIR) $(if $(GAR_PLATFORM),GAR_PLATFORM=$(GAR_PLATFORM)) MODULATION=$(2) $(3) merge-modulated",\
+		$(SSH) $$(BUILDHOST) "PATH=$$(PATH) MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $$(CURDIR) $(if $(GAR_PLATFORM),GAR_PLATFORM=$(GAR_PLATFORM)) MODULATION=$(2) $(3) merge-modulated",\
 		$(MAKE) $(if $(GAR_PLATFORM),GAR_PLATFORM=$(GAR_PLATFORM)) MODULATION=$(2) $(3) merge-modulated\
 	)
 	@# The next line has intentionally been left blank to explicitly terminate this make rule

Modified: csw/mgar/gar/v2-noexternals/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2-noexternals/gar.pkg.mk	2010-11-30 15:51:57 UTC (rev 11743)
+++ csw/mgar/gar/v2-noexternals/gar.pkg.mk	2010-11-30 23:00:34 UTC (rev 11744)
@@ -866,7 +866,7 @@
 		$(if $(PACKAGING_HOST_$P),\
 			$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
 				$(MAKE) GAR_PLATFORM=$P _package && ,\
-				$(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin GARDIR=$(GARDIR) MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) GAR_PLATFORM=$P _package" && \
+				$(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) GAR_PLATFORM=$P _package" && \
 			),\
 			$(error *** No host has been defined for platform $P)\
 		)\
@@ -881,7 +881,7 @@
 			echo " (built on this host)";\
 			  $(MAKE) -s GAR_PLATFORM=$P _pkgshow;echo;,\
 			echo " (built on host '$(PACKAGING_HOST_$P)')";\
-			  $(SSH) $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin GARDIR=$(GARDIR) MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) -s GAR_PLATFORM=$P _pkgshow";echo;\
+			  $(SSH) $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) -s GAR_PLATFORM=$P _pkgshow";echo;\
 		)\
 	)
 	@$(MAKECOOKIE)
@@ -892,7 +892,7 @@
 		$(if $(PACKAGING_HOST_$P),\
 			$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
 				$(MAKE) -s GAR_PLATFORM=$P $* && ,\
-				$(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin GARDIR=$(GARDIR) MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) GAR_PLATFORM=$P $*" && \
+				$(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin MAKEFLAGS=\"$(MAKEFLAGS)\" $(MAKE) -C $(CURDIR) GAR_PLATFORM=$P $*" && \
 			),\
 			$(error *** No host has been defined for platform $P)\
 		)\


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