summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-12 00:43:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-12 00:43:38 +0000
commit4fbcdf61e88f942a85eee5f49aa6550b3dd2a79b (patch)
treed65984cdeaeadb0b34ee9793f62204d0f297bdcc /tools/llvm-config
parent450856d01b27518e88c738ab588765879cb8b1b6 (diff)
Fix PR1040:
Don't rebuild llvm-config if none of the library dependencies changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32455 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
index 354723ab2bb..410808b1f26 100644
--- a/tools/llvm-config/Makefile
+++ b/tools/llvm-config/Makefile
@@ -29,11 +29,16 @@ SUB_LDFLAGS =
FinalLibDeps = $(PROJ_OBJ_DIR)/FinalLibDeps.txt
LibDeps = $(PROJ_OBJ_DIR)/LibDeps.txt
+LibDepsTemp = $(PROJ_OBJ_DIR)/LibDeps.txt.tmp
GenLibDeps = $(PROJ_SRC_ROOT)/utils/GenLibDeps.pl
-$(LibDeps): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o)
- $(Echo) "Regenerating LibDeps.txt"
- $(Verb) $(GenLibDeps) -flat $(LibDir) $(NM_PATH) > $(LibDeps)
+$(LibDepsTemp): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o)
+ $(Echo) "Regenerating LibDeps.txt.tmp"
+ $(Verb) $(GenLibDeps) -flat $(LibDir) $(NM_PATH) > $(LibDepsTemp)
+
+$(LibDeps): $(LibDepsTemp)
+ $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \
+ $(EchoCmd) Updated LibDeps.txt because dependencies changes )
# Find all the cyclic dependencies between various LLVM libraries, so we
# don't have to process them at runtime.