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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Fri Sep 9 12:58:46 CEST 2011


Revision: 15592
          http://gar.svn.sourceforge.net/gar/?rev=15592&view=rev
Author:   dmichelsen
Date:     2011-09-09 10:58:46 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
mGAR v2: Better control environment

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

Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk	2011-09-09 09:56:35 UTC (rev 15591)
+++ csw/mgar/gar/v2/gar.conf.mk	2011-09-09 10:58:46 UTC (rev 15592)
@@ -654,7 +654,7 @@
 BERLIOS_MIRROR ?= http://download.berlios.de/$(BERLIOS_PROJECT)/ http://download2.berlios.de/$(BERLIOS_PROJECT)/
 
 # GNU
-GNU_SITE     = http://mirrors.kernel.org
+GNU_SITE     = http://ftp.gnu.org
 GNU_GNUROOT  = $(GNU_SITE)/gnu
 GNU_NGNUROOT = $(GNU_SITE)/non-gnu
 GNU_PROJ    ?= $(NAME)
@@ -679,6 +679,8 @@
 # Package dir
 GARPACKAGE = $(shell basename $(CURDIR))
 
+STANDARD_EXPORTS ?= PATH
+
 # Put these variables in the environment during the
 # configure, build, test, and install stages
 ifeq ($(origin DIRECTORY_EXPORTS), undefined)
@@ -699,7 +701,7 @@
 GARPKG_EXPORTS += GARCH GAROSREL GARPACKAGE
 endif
 
-COMMON_EXPORTS ?= $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) $(_CATEGORY_COMMON_EXPORTS)
+COMMON_EXPORTS ?= $(STANDARD_EXPORTS) $(DIRECTORY_EXPORTS) $(COMPILER_EXPORTS) $(GARPKG_EXPORTS) $(EXTRA_COMMON_EXPORTS) $(_CATEGORY_COMMON_EXPORTS)
 
 ifneq ($(LD_OPTIONS),)
 COMMON_EXPORTS += LD_OPTIONS
@@ -710,10 +712,10 @@
 TEST_EXPORTS      ?= $(COMMON_EXPORTS) $(EXTRA_TEST_EXPORTS)
 INSTALL_EXPORTS   ?= $(COMMON_EXPORTS) $(EXTRA_INSTALL_EXPORTS) DESTDIR
 
-CONFIGURE_ENV ?= $(foreach TTT,$(CONFIGURE_EXPORTS),$(TTT)="$($(TTT))")
-BUILD_ENV     ?= $(foreach TTT,$(BUILD_EXPORTS),$(TTT)="$($(TTT))")
-TEST_ENV      ?= $(foreach TTT,$(TEST_EXPORTS),$(TTT)="$($(TTT))")
-INSTALL_ENV   ?= $(foreach TTT,$(INSTALL_EXPORTS),$(TTT)="$($(TTT))")
+CONFIGURE_ENV ?= $(foreach TTT,$(filter-out $(NO_CONFIGURE_EXPORTS),$(CONFIGURE_EXPORTS)),$(TTT)="$(or $(CONFIGURE_ENV_$(TTT)),$($(TTT)))")
+BUILD_ENV     ?= $(foreach TTT,$(filter-out $(NO_BUILD_EXPORTS),$(BUILD_EXPORTS)),$(TTT)="$(or $(BUILD_ENV_$(TTT)),$($(TTT)))")
+TEST_ENV      ?= $(foreach TTT,$(filter-out $(NO_TEST_EXPORTS),$(TEST_EXPORTS)),$(TTT)="$(or $(TEST_ENV_$(TTT)),$($(TTT)))")
+INSTALL_ENV   ?= $(foreach TTT,$(filter-out $(NO_INSTALL_EXPORTS),$(INSTALL_EXPORTS)),$(TTT)="$(or $(INSTALL_ENV_$(TTT)),$($(TTT)))")
 
 # For now don't build source packages until there is some more testing
 NOSOURCEPACKAGE ?= 1

Modified: csw/mgar/gar/v2/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2/gar.lib.mk	2011-09-09 09:56:35 UTC (rev 15591)
+++ csw/mgar/gar/v2/gar.lib.mk	2011-09-09 10:58:46 UTC (rev 15592)
@@ -813,7 +813,7 @@
 # script.
 configure-%/configure:
 	@echo " ==> Running configure in $*"
-	cd $* && mkdir -p $(OBJDIR) && cd $(OBJDIR) && $(CONFIGURE_ENV) $(abspath $*)/configure $(CONFIGURE_ARGS)
+	cd $* && mkdir -p $(OBJDIR) && cd $(OBJDIR) && /usr/bin/env -i $(CONFIGURE_ENV) $(abspath $*)/configure $(CONFIGURE_ARGS)
 	@$(MAKECOOKIE)
 
 configure-%/autogen.sh:
@@ -845,7 +845,7 @@
 # build from a standard gnu-style makefile's default rule.
 build-%/Makefile:
 	@echo " ==> Running make in $*"
-	cd $* && $(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_VARS),$(TTT)="$(BUILD_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(BUILD_ARGS)
+	cd $* && /usr/bin/env -i $(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_VARS),$(TTT)="$(BUILD_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(BUILD_ARGS)
 	@$(MAKECOOKIE)
 
 build-%/makefile:
@@ -900,7 +900,7 @@
 # build from a standard gnu-style makefile's default rule.
 clean-%/Makefile:
 	@echo " ==> Running clean in $*"
-	@cd $* && $(BUILD_ENV) $(MAKE) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(CLEAN_ARGS)
+	@cd $* && /usr/bin/env -i $(BUILD_ENV) $(MAKE) $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(CLEAN_ARGS)
 	@rm -f $(COOKIEDIR)/build-$*
 
 clean-%/makefile:
@@ -935,7 +935,7 @@
 # Run tests on pre-built sources
 test-%/Makefile:
 	@echo " ==> Running make $(TEST_TARGET) in $*"
-	cd $* && $(TEST_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(TEST_OVERRIDE_VARS),$(TTT)="$(TEST_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(TEST_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(TEST_ARGS) $(TEST_TARGET)
+	cd $* && /usr/bin/env -i $(TEST_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(TEST_OVERRIDE_VARS),$(TTT)="$(TEST_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(TEST_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(OBJDIR) $(TEST_ARGS) $(TEST_TARGET)
 	@$(MAKECOOKIE)
 
 test-%/makefile:
@@ -969,7 +969,7 @@
 # just run make install and hope for the best.
 install-%/Makefile:
 	@echo " ==> Running make install in $*"
-	@cd $* && $(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_VARS),$(TTT)="$(INSTALL_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $(OBJDIR) $(INSTALL_ARGS) install
+	@cd $* && /usr/bin/env -i $(INSTALL_ENV) $(MAKE) DESTDIR=$(DESTDIR) $(foreach TTT,$(INSTALL_OVERRIDE_VARS),$(TTT)="$(INSTALL_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(INSTALL_OVERRIDE_DIRS),$(TTT)="$(DESTDIR)$($(TTT))") -C $(OBJDIR) $(INSTALL_ARGS) install
 	@$(MAKECOOKIE)
 
 install-%/makefile:

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