[git commit] buildsys: add and use qstrip
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Apr 13 19:04:53 UTC 2012
commit: http://git.uclibc.org/uClibc++/commit/?id=397603cb67436cbde7019c354650d8da82ed8f20
branch: http://git.uclibc.org/uClibc++/commit/?id=refs/heads/master
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
Rules.mak | 18 ++++++++++++------
src/Makefile | 2 +-
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 108cef2..ec2d255 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -82,11 +82,17 @@ check_gxx_visibility=$(shell if $(CXX) -fvisibility-inlines-hidden -S -o /dev/nu
check_as_needed=$(shell if $(LD) --help | grep -q 'as-needed' ; \
then echo "-Wl,--as-needed -lgcc_s -Wl,--no-as-needed"; else echo "-lgcc_s"; fi)
+# strip quotes
+qstrip = $(strip $(subst ",,$(1)))
+#"))
+
+BUILD_EXTRA_LIBRARIES:=$(call qstrip,$(BUILD_EXTRA_LIBRARIES))
+
# Make certain these contain a final "/", but no "//"s.
-UCLIBCXX_RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(UCLIBCXX_RUNTIME_PREFIX))))))
-UCLIBCXX_RUNTIME_LIBDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(subst ",, $(strip $(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_LIB_SUBDIR)))))))
-UCLIBCXX_RUNTIME_BINDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(subst ",, $(strip $(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_BIN_SUBDIR)))))))
-UCLIBCXX_RUNTIME_INCLUDEDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(subst ",, $(strip $(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_INCLUDE_SUBDIR)))))))
+UCLIBCXX_RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(UCLIBCXX_RUNTIME_PREFIX)))))
+UCLIBCXX_RUNTIME_LIBDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(call qstrip,$(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_LIB_SUBDIR))))))
+UCLIBCXX_RUNTIME_BINDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(call qstrip,$(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_BIN_SUBDIR))))))
+UCLIBCXX_RUNTIME_INCLUDEDIR:=$(strip $(subst //,/, $(subst //,/, $(subst ,/, $(call qstrip,$(UCLIBCXX_RUNTIME_PREFIX)$(UCLIBCXX_RUNTIME_INCLUDE_SUBDIR))))))
export UCLIBCXX_RUNTIME_PREFIX UCLIBCXX_RUNTIME_LIBDIR UCLIBCXX_RUNTIME_BINDIR UCLIBCXX_RUNTIME_INCLUDEDIR
OPTIMIZATION:=
@@ -96,8 +102,8 @@ PICFLAG:=-fPIC
OPTIMIZATION+=$(call check_gcc,-Os,-O2)
# Add a bunch of extra pedantic annoyingly strict checks
-XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wno-trigraphs -pedantic
-CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y)))
+XWARNINGS=$(call qstrip,$(WARNINGS)) -Wno-trigraphs -pedantic
+CPU_CFLAGS=$(call qstrip,$(CPU_CFLAGS-y))
# Some nice CFLAGS to work with
GEN_CFLAGS:=-fno-builtin
diff --git a/src/Makefile b/src/Makefile
index 7e85ad0..5717ab1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,7 +3,7 @@ include $(TOPDIR)Rules.mak
WR_CXX := WRAPPER_INCLUDEDIR=-I$(TOPDIR)include $(TOPDIR)bin/g++-uc
-LDFLAGS += -nodefaultlibs -shared -Wl,-soname,$(SHARED_MAJORNAME) `echo $(BUILD_EXTRA_LIBRARIES)`
+LDFLAGS += -nodefaultlibs -shared -Wl,-soname,$(SHARED_MAJORNAME) $(BUILD_EXTRA_LIBRARIES)
ifneq ($(DODEBUG),y)
LDFLAGS += -Wl,-s
endif
More information about the uClibc-cvs
mailing list