diff options
author | Tony Theodore <tonyt@logyst.com> | 2013-08-12 06:08:55 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2013-08-12 06:08:55 (GMT) |
commit | 87cf91e5e1f6d3caf876ab16cc61b353f722ec41 (patch) | |
tree | 18154787c1cb91d329bf3b68d97cc87fcf958f3d /Makefile | |
parent | 063edb11613f794da77a70f0580ba0ade18df22e (diff) | |
download | mxe-87cf91e5e1f6d3caf876ab16cc61b353f722ec41.zip mxe-87cf91e5e1f6d3caf876ab16cc61b353f722ec41.tar.gz mxe-87cf91e5e1f6d3caf876ab16cc61b353f722ec41.tar.bz2 |
Makefile: use a minimal whitelist of env vars
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -39,12 +39,9 @@ TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) PKGS := $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html') PATH := $(PREFIX)/bin:$(PATH) -# unexport any environment variables that might cause trouble -unexport AR CC CFLAGS C_INCLUDE_PATH CPATH CPLUS_INCLUDE_PATH CPP -unexport CPPFLAGS CROSS CXX CXXCPP CXXFLAGS EXEEXT EXTRA_CFLAGS -unexport EXTRA_LDFLAGS LD LDFLAGS LIBRARY_PATH LIBS NM -unexport OBJC_INCLUDE_PATH PKG_CONFIG QMAKESPEC RANLIB STRIP -unexport CONFIG_SITE ALL_TARGETS TARGET TARGETS +# use a minimal whitelist of safe environment variables +ENV_WHITELIST := PATH LANG MXE% +unexport $(filter-out $(ENV_WHITELIST),$(shell env | $(SED) -n 's,\(.*\)=.*,\1,p')) SHORT_PKG_VERSION = \ $(word 1,$(subst ., ,$($(1)_VERSION))).$(word 2,$(subst ., ,$($(1)_VERSION))) |