[llvm-commits] CVS: llvm/tools/llvm-config/Makefile FinalLibDeps.txt LibDeps.txt

Reid Spencer reid at x10sys.com
Wed May 3 10:50:02 PDT 2006



Changes in directory llvm/tools/llvm-config:

Makefile updated: 1.5 -> 1.6
FinalLibDeps.txt (r1.1) removed
LibDeps.txt (r1.3) removed
---
Log message:

For PR764: http://llvm.cs.uiuc.edu/PR764 :
Don't check in the LibDeps.txt and FinalLibDeps.txt files to CVS because
the content differs from platform to platform. Instead, adjust the makefile
so that a dummy llvm-config is built if Perl is not available.


---
Diffs of the changes:  (+21 -10)

 Makefile |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)


Index: llvm/tools/llvm-config/Makefile
diff -u llvm/tools/llvm-config/Makefile:1.5 llvm/tools/llvm-config/Makefile:1.6
--- llvm/tools/llvm-config/Makefile:1.5	Thu Apr 20 16:13:58 2006
+++ llvm/tools/llvm-config/Makefile	Wed May  3 12:49:50 2006
@@ -9,10 +9,15 @@
 
 LEVEL = ../..
 
-EXTRA_DIST = LibDeps.txt llvm-config.in.in find-cycles.pl
+EXTRA_DIST = LibDeps.txt FinalLibDeps.txt llvm-config.in.in find-cycles.pl
 
 include $(LEVEL)/Makefile.common
 
+# If we don't have Perl, we can't generate the library dependencies upon which 
+# llvm-config depends. Therefore, only if we detect perl will we do anything
+# useful.
+ifeq ($(HAVE_PERL),1)
+
 # Combine preprocessor flags (except for -I) and CXX flags.
 SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags}
 
@@ -21,10 +26,8 @@
 # user to use libtool when linking against LLVM.
 SUB_LDFLAGS = 
 
-FinalLibDeps = $(PROJ_SRC_DIR)/FinalLibDeps.txt
-ifdef HAVE_PERL
-ifeq ($(HAVE_PERL),1)
-LibDeps = $(PROJ_SRC_DIR)/LibDeps.txt
+FinalLibDeps = $(PROJ_OBJ_DIR)/FinalLibDeps.txt
+LibDeps = $(PROJ_OBJ_DIR)/LibDeps.txt
 GenLibDeps = $(PROJ_SRC_ROOT)/utils/GenLibDeps.pl
 # MANUAL USE ONLY!  GenLibDeps.pl is very non-portable, so LibDeps.txt
 # should only be re-built manually.  No other rule in this file should
@@ -37,9 +40,7 @@
 # don't have to process them at runtime.
 $(FinalLibDeps): find-cycles.pl $(LibDeps)
 	$(Echo) "Finding cyclic dependencies between LLVM libraries."
-	$(Verb) $(PERL) $< < $(PROJ_SRC_DIR)/LibDeps.txt > $@
-endif
-endif
+	$(Verb) $(PERL) $< < $(LibDeps) > $@
 
 # Rerun our configure substitutions as needed.
 ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in
@@ -56,13 +57,23 @@
 	$(Verb) $(SED) -f temp.sed < $< > $@
 	$(Verb) $(RM) temp.sed
 	$(Verb) cat $(FinalLibDeps) >> $@
-	$(Verb) chmod +x llvm-config
+	$(Verb) chmod +x $@
+
+else
+# We don't have perl, just generate a dummy llvm-config
+llvm-config:
+	$(Echo) "Building place holder llvm-config script."
+	$(Verb) $(ECHO) 'echo llvm-config: Perl not found so llvm-config could not be generated' >> $@
+	$(Verb) chmod +x $@
 
+endif
 # Hook into the standard Makefile rules.
 all-local:: llvm-config
 clean-local::
-	$(Verb) $(RM) -f llvm-config llvm-config.in
+	$(Verb) $(RM) -f llvm-config llvm-config.in $(FinalLibDeps) $(LibDeps) \
+	  GenLibDeps.out
 install-local:: all-local
 	$(Echo) Installing llvm-config
 	$(Verb) $(MKDIR) $(PROJ_bindir)
 	$(Verb) $(ScriptInstall) llvm-config $(PROJ_bindir)
+






More information about the llvm-commits mailing list