From 4832f8893ba65d1b7bc712f5dcf4ecadfb402c59 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 10 Mar 2009 19:01:23 +0000 Subject: [PATCH] Change these sed lines to behave correctly when the input string contains commas. This fixes PR3727. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66565 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-config/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile index de89d290353..6eedca07b50 100644 --- a/tools/llvm-config/Makefile +++ b/tools/llvm-config/Makefile @@ -57,11 +57,16 @@ llvm-config.in: $(ConfigInIn) $(ConfigStatusScript) # Build our final script. $(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps) $(Echo) "Building llvm-config script." - $(Verb) $(ECHO) 's,@LLVM_CPPFLAGS@,$(SUB_CPPFLAGS),' > temp.sed - $(Verb) $(ECHO) 's,@LLVM_CFLAGS@,$(SUB_CFLAGS),' >> temp.sed - $(Verb) $(ECHO) 's,@LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' >> temp.sed - $(Verb) $(ECHO) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed - $(Verb) $(ECHO) 's,@LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_CPPFLAGS@/$(subst /,\/,$(SUB_CPPFLAGS))/' \ + > temp.sed + $(Verb) $(ECHO) 's/@LLVM_CFLAGS@/$(subst /,\/,$(SUB_CFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_CXXFLAGS@/$(subst /,\/,$(SUB_CXXFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_LDFLAGS@/$(subst /,\/,$(SUB_LDFLAGS))/' \ + >> temp.sed + $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \ + >> temp.sed $(Verb) $(SED) -f temp.sed < $< > $@ $(Verb) $(RM) temp.sed $(Verb) cat $(FinalLibDeps) >> $@ -- 2.34.1