[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in Makefile

2007-06-28 Thread David Greene


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.27 - 1.28
Makefile updated: 1.23 - 1.24
---
Log message:

Add support for building with _GLIBCXX_DEBUG.  New configure option
--enable-expensive-checks allows the developer to enable runtime
checking that can greatly increase compile time.  Currently it only
turns on _GLIBCXX_DEBUG.  Other expensive debugging checks added later
should be controlled by this configure option.

This patch also updates llvm-config with a --cppflags option to inform
llvm-gcc how to build itself so that it is compatible with an llvm that
was built with _GLIBCXX_DEBUG.


---
Diffs of the changes:  (+30 -3)

 Makefile  |4 +++-
 llvm-config.in.in |   29 +++--
 2 files changed, 30 insertions(+), 3 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.27 
llvm/tools/llvm-config/llvm-config.in.in:1.28
--- llvm/tools/llvm-config/llvm-config.in.in:1.27   Sun Apr 22 13:33:20 2007
+++ llvm/tools/llvm-config/llvm-config.in.inThu Jun 28 14:36:07 2007
@@ -42,6 +42,7 @@
 my $TARGETS_TO_BUILD= [EMAIL PROTECTED]@};
 my $TARGET_HAS_JIT  = [EMAIL PROTECTED]@};
 my @TARGETS_BUILT   = map { lc($_) } [EMAIL PROTECTED]@};
+my $EXPENSIVE_CHECKS= [EMAIL PROTECTED]@};
 # end autoconf values 
 
 # Must pretend x86_64 architecture is really x86, otherwise the native backend
@@ -49,6 +50,7 @@
 $ARCH = x86 if $ARCH eq x86_64;
 
 # begin Makefile values 
+my $CPPFLAGS= [EMAIL PROTECTED]@};
 my $CFLAGS  = [EMAIL PROTECTED]@};
 my $CXXFLAGS= [EMAIL PROTECTED]@};
 my $LDFLAGS = [EMAIL PROTECTED]@};
@@ -112,10 +114,18 @@
 $has_opt = 1; print $INCLUDEDIR\n;
 } elsif ($arg eq --libdir) {
 $has_opt = 1; print $LIBDIR\n;
+} elsif ($arg eq --cppflags) {
+$has_opt = 1; 
+   my $cppopts = get_cpp_opts();
+   print $cppopts\n;
 } elsif ($arg eq --cflags) {
-$has_opt = 1; print -I$INCLUDEDIR $CFLAGS\n;
+$has_opt = 1; 
+   my $cppopts = get_cpp_opts();
+   print $cppopts $CFLAGS\n;
 } elsif ($arg eq --cxxflags) {
-$has_opt = 1; print -I$INCLUDEDIR $CXXFLAGS\n;
+$has_opt = 1; 
+   my $cppopts = get_cpp_opts();
+   print $cppopts $CXXFLAGS\n;
 } elsif ($arg eq --ldflags) {
 $has_opt = 1; print -L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n;
 } elsif ($arg eq --libs) {
@@ -187,6 +197,7 @@
   --bindir   Directory containing LLVM executables.
   --includedir   Directory containing LLVM headers.
   --libdir   Directory containing LLVM libraries.
+  --cppflags C preprocessor flags for files that include LLVM 
headers.
   --cflags   C compiler flags for files that include LLVM headers.
   --cxxflags C++ compiler flags for files that include LLVM 
headers.
   --ldflags  Print Linker flags.
@@ -205,6 +216,20 @@
 exit(1);
 }
 
+# Return cpp flags used to build llvm.
+sub get_cpp_opts {
+my $opts = ;
+
+if ($EXPENSIVE_CHECKS eq yes) {
+   $opts = -D_GLIBCXX_DEBUG -I$INCLUDEDIR $CPPFLAGS;
+}
+else {
+   $opts = -I$INCLUDEDIR $CPPFLAGS;
+}
+
+return $opts;
+}
+
 # Use -lfoo instead of libfoo.a whenever possible, and add directories to
 # files which can't be found using -L.
 sub fix_library_names (@) {


Index: llvm/tools/llvm-config/Makefile
diff -u llvm/tools/llvm-config/Makefile:1.23 
llvm/tools/llvm-config/Makefile:1.24
--- llvm/tools/llvm-config/Makefile:1.23Sun Feb  4 16:08:16 2007
+++ llvm/tools/llvm-config/Makefile Thu Jun 28 14:36:07 2007
@@ -20,6 +20,7 @@
 ifeq ($(HAVE_PERL),1)
 
 # Combine preprocessor flags (except for -I) and CXX flags.
+SUB_CPPFLAGS = ${CPP.Defines}
 SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags}
 SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags}
 
@@ -56,7 +57,8 @@
 # Build our final script.
 $(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps)
$(Echo) Building llvm-config script.
-   $(Verb) $(ECHO) 's,@LLVM_CFLAGS@,$(SUB_CFLAGS),'  temp.sed
+   $(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



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.26 - 1.27
---
Log message:

Add new option to usage help.

---
Diffs of the changes:  (+1 -0)

 llvm-config.in.in |1 +
 1 files changed, 1 insertion(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.26 
llvm/tools/llvm-config/llvm-config.in.in:1.27
--- llvm/tools/llvm-config/llvm-config.in.in:1.26   Sun Apr 22 00:05:36 2007
+++ llvm/tools/llvm-config/llvm-config.in.inSun Apr 22 13:33:20 2007
@@ -195,6 +195,7 @@
   --libfiles Fully qualified library filenames for makefile 
depends.
   --components   List of all possible components.
   --targets-builtList of all targets currently built.
+  --host-target  Target triple used to configure LLVM.
   --build-mode   Print build mode of LLVM tree (e.g. Debug or Release).
 Typical components:
   allAll LLVM libraries (default).



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2007-04-21 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.25 - 1.26
---
Log message:

Add the --host-target option.


---
Diffs of the changes:  (+2 -0)

 llvm-config.in.in |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.25 
llvm/tools/llvm-config/llvm-config.in.in:1.26
--- llvm/tools/llvm-config/llvm-config.in.in:1.25   Tue Mar 27 23:45:02 2007
+++ llvm/tools/llvm-config/llvm-config.in.inSun Apr 22 00:05:36 2007
@@ -128,6 +128,8 @@
 $has_opt = 1; print join(' ', name_map_entries), \n;
 } elsif ($arg eq --targets-built) {
 $has_opt = 1; print join(' ', @TARGETS_BUILT), \n;
+} elsif ($arg eq --host-target) {
+$has_opt = 1; print $TARGET_TRIPLE\n;
 } elsif ($arg eq --build-mode) {
 $has_opt = 1; print $LLVM_BUILDMODE\n;
 } elsif ($arg eq --obj-root) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-08-11 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.21 - 1.22
---
Log message:

Don't print double newline for --src-root and --obj-root as it tends to
confuse shells that might use this output.


---
Diffs of the changes:  (+2 -2)

 llvm-config.in.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.21 
llvm/tools/llvm-config/llvm-config.in.in:1.22
--- llvm/tools/llvm-config/llvm-config.in.in:1.21   Fri Aug  4 16:52:23 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Aug 11 16:50:24 2006
@@ -124,9 +124,9 @@
 } elsif ($arg eq --build-mode) {
 $has_opt = 1; print $LLVM_BUILDMODE\n;
 } elsif ($arg eq --obj-root) {
-$has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd` . \n;
+$has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd`;
 } elsif ($arg eq --src-root) {
-$has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd` . \n;
+$has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd`;
 } else {
 usage();
 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-08-03 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.19 - 1.20
---
Log message:

Fix a typo in the name of expand_dependencies. 
Make the dependency line pattern match handle white space better.


---
Diffs of the changes:  (+4 -4)

 llvm-config.in.in |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.19 
llvm/tools/llvm-config/llvm-config.in.in:1.20
--- llvm/tools/llvm-config/llvm-config.in.in:1.19   Thu Jul 27 18:00:30 2006
+++ llvm/tools/llvm-config/llvm-config.in.inThu Aug  3 16:45:35 2006
@@ -84,7 +84,7 @@
 sub usage;
 sub fix_library_names (@);
 sub fix_library_files (@);
-sub expand_dependecies (@);
+sub expand_dependencies (@);
 sub name_map_entries;
 
 # Parse our command-line arguments.
@@ -145,7 +145,7 @@
 
 # Handle any arguments which require building our dependency graph.
 if ($want_libs || $want_libnames || $want_libfiles) {
-my @libs = expand_dependecies(@components);
+my @libs = expand_dependencies(@components);
 print join(' ', fix_library_names(@libs)), \n if ($want_libs);
 print join(' ',  @libs), \n if ($want_libnames);
 print join(' ', fix_library_files(@libs)), \n if ($want_libfiles);
@@ -257,7 +257,7 @@
 
 # Given a list of human-friendly component names, translate them into a
 # complete set of linker arguments.
-sub expand_dependecies (@) {
+sub expand_dependencies (@) {
 my @libs = @_;
 load_dependencies;
 my @required_sets = find_all_required_sets(expand_names(@libs));
@@ -275,7 +275,7 @@
 $DEPENDENCIES_LOADED = 1;
 while (DATA) {
 # Parse our line.
-my ($libs, $deps) = /^(^[^:]+): ?(.*)$/;
+my ($libs, $deps) = /^\s*([^:]+):\s+(.*)\s*$/;
 die Malformed dependency data unless defined $deps;
 my @libs = split(' ', $libs);
 my @deps = split(' ', $deps);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-06 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.15 - 1.16
---
Log message:

Add a new --libfiles option, for getting fully-qualified pathnames to libraries.
This can be used for tools that want makefile rules to depend on the libraries
(e.g. so the tool is relinked when a library changes).



---
Diffs of the changes:  (+19 -7)

 llvm-config.in.in |   26 +++---
 1 files changed, 19 insertions(+), 7 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.15 
llvm/tools/llvm-config/llvm-config.in.in:1.16
--- llvm/tools/llvm-config/llvm-config.in.in:1.15   Fri Jun  2 18:43:27 2006
+++ llvm/tools/llvm-config/llvm-config.in.inTue Jun  6 17:38:29 2006
@@ -81,6 +81,7 @@
 
 sub usage;
 sub fix_library_names (@);
+sub fix_library_files (@);
 sub expand_dependecies (@);
 sub name_map_entries;
 
@@ -90,6 +91,7 @@
 my $has_opt = 0;
 my $want_libs = 0;
 my $want_libnames = 0;
+my $want_libfiles = 0;
 my $want_components = 0;
 foreach my $arg (@ARGV) {
 if ($arg =~ /^-/) {
@@ -113,6 +115,8 @@
 $has_opt = 1; $want_libs = 1;
 } elsif ($arg eq --libnames) {
 $has_opt = 1; $want_libnames = 1;
+} elsif ($arg eq --libfiles) {
+$has_opt = 1; $want_libfiles = 1;
 } elsif ($arg eq --components) {
 $has_opt = 1; print join(' ', name_map_entries), \n;
 } elsif ($arg eq --targets-built) {
@@ -140,14 +144,11 @@
 }
 
 # Handle any arguments which require building our dependency graph.
-if ($want_libs || $want_libnames) {
+if ($want_libs || $want_libnames || $want_libfiles) {
 my @libs = expand_dependecies(@components);
-if ($want_libs) {
-print join(' ', fix_library_names(@libs)), \n;
-}
-if ($want_libnames) {
-print join(' ',  @libs), \n;
-}
+print join(' ', fix_library_names(@libs)), \n if ($want_libs);
+print join(' ',  @libs), \n if ($want_libnames);
+print join(' ', fix_library_files(@libs)), \n if ($want_libfiles);
 }
 
 exit 0;
@@ -178,6 +179,7 @@
   --ldflags  Print Linker flags.
   --libs Libraries needed to link against LLVM components.
   --libnames Bare library names for in-tree builds.
+  --libfiles Fully qualified library filenames for makefile 
depends.
   --components   List of all possible components.
   --targets-builtList of all targets currently built.
   --build-mode   Print build mode of LLVM tree (e.g. Debug or Release).
@@ -206,6 +208,16 @@
 return @result;
 }
 
+# Turn the list of libraries into a list of files.
+sub fix_library_files(@) {
+my @libs = @_;
+my @result;
+foreach my $lib (@libs) {
+# Transform the bare library name into a filename.
+push @result, $LIBDIR/$lib;
+}
+return @result;
+}
 
 #==
 #  Library Dependency Analysis



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-06 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.16 - 1.17
---
Log message:

Fix a bug in the following scenario.
1. llvm is built with objroot = OBJ and installed.
2. OBJ is deleted or install tree is shipped.
3. llvm-config is run.

In this scenario, llvm-config shouldn't emit an error message at #3, it
should just know it's not running in the objdir :)



---
Diffs of the changes:  (+2 -1)

 llvm-config.in.in |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.16 
llvm/tools/llvm-config/llvm-config.in.in:1.17
--- llvm/tools/llvm-config/llvm-config.in.in:1.16   Tue Jun  6 17:38:29 2006
+++ llvm/tools/llvm-config/llvm-config.in.inTue Jun  6 18:54:15 2006
@@ -63,7 +63,8 @@
 chomp($ABS_RUN_DIR);
 
 # Compute the absolute object directory build, e.g. foo/llvm/Debug.
-my $ABS_OBJ_ROOT = `cd $LLVM_OBJ_ROOT/$LLVM_BUILDMODE; pwd`;
+my $ABS_OBJ_ROOT = $LLVM_OBJ_ROOT/$LLVM_BUILDMODE;
+$ABS_OBJ_ROOT = `cd $ABS_OBJ_ROOT; pwd` if (-d $ABS_OBJ_ROOT);
 chomp($ABS_OBJ_ROOT);
 
 my $INCLUDEDIR = $ABS_RUN_DIR/include;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.8 - 1.9
---
Log message:

Add several more autoconf variables so that new features can be implemented
by our illustrious project leader. 


---
Diffs of the changes:  (+20 -0)

 llvm-config.in.in |   20 
 1 files changed, 20 insertions(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.8 
llvm/tools/llvm-config/llvm-config.in.in:1.9
--- llvm/tools/llvm-config/llvm-config.in.in:1.8Thu Jun  1 20:23:18 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 13:31:41 2006
@@ -15,9 +15,29 @@
 use warnings;
 
 # begin autoconf values 
+my $PACKAGE_NAME= [EMAIL PROTECTED]@};
 my $VERSION = [EMAIL PROTECTED]@};
 my $PREFIX  = [EMAIL PROTECTED]@};
+my $BINDIR  = $PREFIX/bin;
+my $INCLUDEDIR  = $PREFIX/include;
+my $LIBDIR  = $PREFIX/lib;
+my $LLVM_CONFIGTIME = [EMAIL PROTECTED]@};
+my $LLVM_SRC_ROOT   = [EMAIL PROTECTED]@};
+my $LLVM_OBJ_ROOT   = [EMAIL PROTECTED]@};
+my $LLVM_ON_WIN32   = [EMAIL PROTECTED]@};
+my $LLVM_ON_UNIX= [EMAIL PROTECTED]@};
+my $LLVMGCCDIR  = [EMAIL PROTECTED]@};
+my $LLVMGCC = [EMAIL PROTECTED]@};
+my $LLVMGXX = [EMAIL PROTECTED]@};
+my $LLVMGCC_VERSION = [EMAIL PROTECTED]@};
+my $LLVMGCC_MAJVERS = [EMAIL PROTECTED]@};
+my $ENDIAN  = [EMAIL PROTECTED]@};
+my $SHLIBEXT= [EMAIL PROTECTED]@};
+my $EXEEXT  = [EMAIL PROTECTED]@};
+my $OS  = [EMAIL PROTECTED]@};
 my $ARCH= lc([EMAIL PROTECTED]@});
+my $TARGET_TRIPLE   = [EMAIL PROTECTED]@};
+my $TARGETS_TO_BUILD= [EMAIL PROTECTED]@};
 my $TARGET_HAS_JIT  = [EMAIL PROTECTED]@};
 my @TARGETS_BUILT   = map { lc($_) } [EMAIL PROTECTED]@};
 # end autoconf values 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.9 - 1.10
---
Log message:

Remove a couple of things no longer figured out by autoconf


---
Diffs of the changes:  (+0 -3)

 llvm-config.in.in |3 ---
 1 files changed, 3 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.9 
llvm/tools/llvm-config/llvm-config.in.in:1.10
--- llvm/tools/llvm-config/llvm-config.in.in:1.9Fri Jun  2 13:31:41 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 13:55:36 2006
@@ -18,9 +18,6 @@
 my $PACKAGE_NAME= [EMAIL PROTECTED]@};
 my $VERSION = [EMAIL PROTECTED]@};
 my $PREFIX  = [EMAIL PROTECTED]@};
-my $BINDIR  = $PREFIX/bin;
-my $INCLUDEDIR  = $PREFIX/include;
-my $LIBDIR  = $PREFIX/lib;
 my $LLVM_CONFIGTIME = [EMAIL PROTECTED]@};
 my $LLVM_SRC_ROOT   = [EMAIL PROTECTED]@};
 my $LLVM_OBJ_ROOT   = [EMAIL PROTECTED]@};



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.10 - 1.11
---
Log message:

Convert to standard file header


---
Diffs of the changes:  (+9 -4)

 llvm-config.in.in |   13 +
 1 files changed, 9 insertions(+), 4 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.10 
llvm/tools/llvm-config/llvm-config.in.in:1.11
--- llvm/tools/llvm-config/llvm-config.in.in:1.10   Fri Jun  2 13:55:36 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 13:58:21 2006
@@ -1,14 +1,19 @@
 [EMAIL PROTECTED]@
+##===- tools/llvm-config ---*- perl 
-*-===##
+# 
+# The LLVM Compiler Infrastructure
 #
-# Program:  llvm-config
+# This file was developed by Eric Kidd and is distributed under
+# the University of Illinois Open Source License. See LICENSE.TXT for details.
+# 
+##===--===##
 #
 # Synopsis: Prints out compiler options needed to build against an installed
 #   copy of LLVM.
 #
 # Syntax:   llvm-config OPTIONS... [COMPONENTS...]
-#
-# This file was written by Eric Kidd, and is placed into the public domain.
-#
+# 
+##===--===##
 
 use 5.006;
 use strict;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.12 - 1.13
---
Log message:

Make llvm-config do the right thing when an install tree is relocated or
when run out of a build directory.


---
Diffs of the changes:  (+33 -12)

 llvm-config.in.in |   45 +
 1 files changed, 33 insertions(+), 12 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.12 
llvm/tools/llvm-config/llvm-config.in.in:1.13
--- llvm/tools/llvm-config/llvm-config.in.in:1.12   Fri Jun  2 14:13:29 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 16:48:10 2006
@@ -50,8 +50,34 @@
 my $LLVM_BUILDMODE  = [EMAIL PROTECTED]@};
 # end Makefile values 
 
+# Figure out where llvm-config is being run from.  Primarily, we care if it has
+# been installed, or is running from the build directory, which changes the
+# locations of some files.
+
 # Convert the current executable name into its directory (e.g. .).
-my ($PARTIALDIR) = ($0 =~ /^(.*)\/.*$/);
+my ($RUN_DIR) = ($0 =~ /^(.*)\/.*$/);
+
+# Turn the directory into an absolute directory on the file system, also pop up
+# from bin into the build or prefix dir.
+my $ABS_RUN_DIR = `cd $RUN_DIR/..; pwd`;
+chomp($ABS_RUN_DIR);
+
+# Compute the absolute object directory build, e.g. foo/llvm/Debug.
+my $ABS_OBJ_ROOT = `cd $LLVM_OBJ_ROOT/$LLVM_BUILDMODE; pwd`;
+chomp($ABS_OBJ_ROOT);
+
+my $INCLUDEDIR = $PREFIX/include;
+my $LIBDIR = $PREFIX/lib;
+my $BINDIR = $PREFIX/bin;
+$LIBDIR = $ABS_RUN_DIR/lib;
+$BINDIR = $ABS_RUN_DIR/bin;
+if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
+  # If we are running out of the build directory, the include dir is in the
+  # srcdir.
+  $INCLUDEDIR = $LLVM_SRC_ROOT/include;
+} else {
+  $INCLUDEDIR = $ABS_RUN_DIR/include;
+}
 
 sub usage;
 sub fix_library_names (@);
@@ -69,23 +95,18 @@
 if ($arg =~ /^-/) {
 if ($arg eq --version) {
 $has_opt = 1; print $VERSION\n;
-} elsif ($arg eq --use-current-dir-as-prefix) {
-# Convert the scripts executable dir into a full absolute 
directory.
-my $ABSDIR = `cd $PARTIALDIR/..; pwd`;
-chomp($ABSDIR);
-$PREFIX = $ABSDIR;
 } elsif ($arg eq --prefix) {
 $has_opt = 1; print $PREFIX\n;
 } elsif ($arg eq --bindir) {
-$has_opt = 1; print $PREFIX/bin\n;
+$has_opt = 1; print $BINDIR\n;
 } elsif ($arg eq --includedir) {
-$has_opt = 1; print $PREFIX/include\n;
+$has_opt = 1; print $INCLUDEDIR\n;
 } elsif ($arg eq --libdir) {
-$has_opt = 1; print $PREFIX/lib\n;
+$has_opt = 1; print $LIBDIR\n;
 } elsif ($arg eq --cxxflags) {
-$has_opt = 1; print -I$PREFIX/include $CXXFLAGS\n;
+$has_opt = 1; print -I$INCLUDEDIR $CXXFLAGS\n;
 } elsif ($arg eq --ldflags) {
-$has_opt = 1; print -L$PREFIX/lib $LDFLAGS\n;
+$has_opt = 1; print -L$LIBDIR $LDFLAGS\n;
 } elsif ($arg eq --libs) {
 $has_opt = 1; $want_libs = 1;
 } elsif ($arg eq --libnames) {
@@ -168,7 +189,7 @@
 if (defined $basename) {
 push @result, -l$basename;
 } else {
-push @result, $PREFIX/lib/$lib;
+push @result, $LIBDIR/$lib;
 }
 }
 return @result;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.13 - 1.14
---
Log message:

Add flags to get access to build_mode, objdir, srcdir etc.
If installed, ignore the prefix the tree is configured with: always use the
prefix that llvm-config is currently at, which may be different if the tree
was moved.


---
Diffs of the changes:  (+18 -9)

 llvm-config.in.in |   27 ++-
 1 files changed, 18 insertions(+), 9 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.13 
llvm/tools/llvm-config/llvm-config.in.in:1.14
--- llvm/tools/llvm-config/llvm-config.in.in:1.13   Fri Jun  2 16:48:10 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 17:03:50 2006
@@ -66,17 +66,17 @@
 my $ABS_OBJ_ROOT = `cd $LLVM_OBJ_ROOT/$LLVM_BUILDMODE; pwd`;
 chomp($ABS_OBJ_ROOT);
 
-my $INCLUDEDIR = $PREFIX/include;
-my $LIBDIR = $PREFIX/lib;
-my $BINDIR = $PREFIX/bin;
-$LIBDIR = $ABS_RUN_DIR/lib;
-$BINDIR = $ABS_RUN_DIR/bin;
+my $INCLUDEDIR = $ABS_RUN_DIR/include;
+my $LIBDIR = $ABS_RUN_DIR/lib;
+my $BINDIR = $ABS_RUN_DIR/bin;
 if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {
   # If we are running out of the build directory, the include dir is in the
   # srcdir.
   $INCLUDEDIR = $LLVM_SRC_ROOT/include;
 } else {
-  $INCLUDEDIR = $ABS_RUN_DIR/include;
+  # If installed, ignore the prefix the tree was configured with, use the
+  # current prefix.
+  $PREFIX = $ABS_RUN_DIR;
 }
 
 sub usage;
@@ -115,6 +115,12 @@
 $has_opt = 1; print join(' ', name_map_entries), \n;
 } elsif ($arg eq --targets-built) {
 $has_opt = 1; print join(' ', @TARGETS_BUILT), \n;
+} elsif ($arg eq --build-mode) {
+$has_opt = 1; print $LLVM_BUILDMODE\n;
+} elsif ($arg eq --obj-root) {
+$has_opt = 1; print `cd $LLVM_OBJ_ROOT/; pwd` . \n;
+} elsif ($arg eq --src-root) {
+$has_opt = 1; print `cd $LLVM_SRC_ROOT/; pwd` . \n;
 } else {
 usage();
 }
@@ -159,17 +165,20 @@
   llvm-config --libs engine bcreader scalaropts
 
 Options:
-  --version  LLVM version.
-  --prefix   Installation prefix.
+  --version  Print LLVM version.
+  --prefix   Print the installation prefix.
+  --src-root Print the source root LLVM was built from.
+  --obj-root Print the object root used to build LLVM.
   --bindir   Directory containing LLVM executables.
   --includedir   Directory containing LLVM headers.
   --libdir   Directory containing LLVM libraries.
   --cxxflags C++ compiler flags for files that include LLVM 
headers.
-  --ldflags  Linker flags.
+  --ldflags  Print Linker flags.
   --libs Libraries needed to link against LLVM components.
   --libnames Bare library names for in-tree builds.
   --components   List of all possible components.
   --targets-builtList of all targets currently built.
+  --build-mode   Print build mode of LLVM tree (e.g. Debug or Release).
 Typical components:
   allAll LLVM libraries (default).
   backendEither a native backend or the C backend.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-02 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.14 - 1.15
---
Log message:

temporarily add back this option, I will remove it in a couple days


---
Diffs of the changes:  (+2 -0)

 llvm-config.in.in |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.14 
llvm/tools/llvm-config/llvm-config.in.in:1.15
--- llvm/tools/llvm-config/llvm-config.in.in:1.14   Fri Jun  2 17:03:50 2006
+++ llvm/tools/llvm-config/llvm-config.in.inFri Jun  2 18:43:27 2006
@@ -95,6 +95,8 @@
 if ($arg =~ /^-/) {
 if ($arg eq --version) {
 $has_opt = 1; print $VERSION\n;
+} elsif ($arg eq --use-current-dir-as-prefix) {
+   # NOOP, remove!
 } elsif ($arg eq --prefix) {
 $has_opt = 1; print $PREFIX\n;
 } elsif ($arg eq --bindir) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-01 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.6 - 1.7
---
Log message:

Remove some variables from the configured section that aren't.


---
Diffs of the changes:  (+6 -9)

 llvm-config.in.in |   15 ++-
 1 files changed, 6 insertions(+), 9 deletions(-)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.6 
llvm/tools/llvm-config/llvm-config.in.in:1.7
--- llvm/tools/llvm-config/llvm-config.in.in:1.6Thu Jun  1 19:56:15 2006
+++ llvm/tools/llvm-config/llvm-config.in.inThu Jun  1 20:04:35 2006
@@ -17,9 +17,6 @@
 # begin autoconf values 
 my $VERSION = [EMAIL PROTECTED]@};
 my $PREFIX  = [EMAIL PROTECTED]@};
-my $BINDIR  = $PREFIX/bin;
-my $INCLUDEDIR  = $PREFIX/include;
-my $LIBDIR  = $PREFIX/lib;
 my $ARCH= lc([EMAIL PROTECTED]@});
 my $TARGET_HAS_JIT  = [EMAIL PROTECTED]@};
 my @TARGETS_BUILT   = map { lc($_) } [EMAIL PROTECTED]@};
@@ -49,15 +46,15 @@
 } elsif ($arg eq --prefix) {
 $has_opt = 1; print $PREFIX\n;
 } elsif ($arg eq --bindir) {
-$has_opt = 1; print $BINDIR\n;
+$has_opt = 1; print $PREFIX/bin\n;
 } elsif ($arg eq --includedir) {
-$has_opt = 1; print $INCLUDEDIR\n;
+$has_opt = 1; print $PREFIX/include\n;
 } elsif ($arg eq --libdir) {
-$has_opt = 1; print $LIBDIR\n;
+$has_opt = 1; print $PREFIX/lib\n;
 } elsif ($arg eq --cxxflags) {
-$has_opt = 1; print -I$INCLUDEDIR $CXXFLAGS\n;
+$has_opt = 1; print -I$PREFIX/include $CXXFLAGS\n;
 } elsif ($arg eq --ldflags) {
-$has_opt = 1; print -L$LIBDIR $LDFLAGS\n;
+$has_opt = 1; print -L$PREFIX/lib $LDFLAGS\n;
 } elsif ($arg eq --libs) {
 $has_opt = 1; $want_libs = 1;
 } elsif ($arg eq --libnames) {
@@ -140,7 +137,7 @@
 if (defined $basename) {
 push @result, -l$basename;
 } else {
-push @result, $LIBDIR/$lib;
+push @result, $PREFIX/lib/$lib;
 }
 }
 return @result;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2006-06-01 Thread Chris Lattner


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.7 - 1.8
---
Log message:

Add a gross --use-current-dir-as-prefix option as a temporary workaround
for the build with one prefix and move the installed files to another dir
problem.


---
Diffs of the changes:  (+8 -0)

 llvm-config.in.in |8 
 1 files changed, 8 insertions(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.7 
llvm/tools/llvm-config/llvm-config.in.in:1.8
--- llvm/tools/llvm-config/llvm-config.in.in:1.7Thu Jun  1 20:04:35 2006
+++ llvm/tools/llvm-config/llvm-config.in.inThu Jun  1 20:23:18 2006
@@ -27,6 +27,9 @@
 my $LDFLAGS = [EMAIL PROTECTED]@};
 # end Makefile values 
 
+# Convert the current executable name into its directory (e.g. .).
+my ($PARTIALDIR) = ($0 =~ /^(.*)\/.*$/);
+
 sub usage;
 sub fix_library_names (@);
 sub expand_dependecies (@);
@@ -43,6 +46,11 @@
 if ($arg =~ /^-/) {
 if ($arg eq --version) {
 $has_opt = 1; print $VERSION\n;
+} elsif ($arg eq --use-current-dir-as-prefix) {
+# Convert the scripts executable dir into a full absolute 
directory.
+my $ABSDIR = `cd $PARTIALDIR/..; pwd`;
+chomp($ABSDIR);
+$PREFIX = $ABSDIR;
 } elsif ($arg eq --prefix) {
 $has_opt = 1; print $PREFIX\n;
 } elsif ($arg eq --bindir) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits