[flashrom] [PATCH 2/2] Set LC_ALL globally in Makefile.
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Thu Jan 7 19:22:41 CET 2016
While we're at it, comment and simplify the debug_shell function as well.
Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
---
Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 757f3a8..6ddca58 100644
--- a/Makefile
+++ b/Makefile
@@ -77,8 +77,13 @@ PKG_CONFIG += --static
LDFLAGS += -static
endif
+LC_ALL=C
+export LC_ALL
+
dummy_for_make_3_80:=$(shell printf "Build started on %s\n\n" "$$(date)" >$(BUILD_DETAILS_FILE))
-debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(1) ; }' >&2; { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE))
+# Provide an easy way to execute a command, print its output to stdout and capture any error message on stderr
+# in the build details file together with the original stdout output.
+debug_shell = $(shell { echo 'exec: { $(1) ; }' >&2; { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE))
###############################################################################
# General OS-specific settings.
# 1. Prepare for later by gathering information about host and target OS
@@ -801,7 +806,7 @@ libflashrom.a: $(LIBFLASHROM_OBJS)
# TAROPTIONS reduces information leakage from the packager's system.
# If other tar programs support command line arguments for setting uid/gid of
# stored files, they can be handled here as well.
-TAROPTIONS = $(shell LC_ALL=C tar --version|grep -q GNU && echo "--owner=root --group=root")
+TAROPTIONS = $(shell tar --version|grep -q GNU && echo "--owner=root --group=root")
%.o: %.c .features
$(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FLASHROM_CFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
@@ -1095,7 +1100,7 @@ export: $(PROGRAM).8
@svn export -r BASE . $(EXPORTDIR)/flashrom-$(RELEASENAME)
@sed "s/^SVNVERSION.*/SVNVERSION := $(SVNVERSION)/" Makefile >$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile
@cp $(PROGRAM).8 "$(EXPORTDIR)/flashrom-$(RELEASENAME)/$(PROGRAM).8"
- @LC_ALL=C svn log >$(EXPORTDIR)/flashrom-$(RELEASENAME)/ChangeLog
+ @svn log >$(EXPORTDIR)/flashrom-$(RELEASENAME)/ChangeLog
@echo Exported $(EXPORTDIR)/flashrom-$(RELEASENAME)/
tarball: export
--
Kind regards, Stefan Tauner
More information about the flashrom
mailing list