<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
 DepModule: 
 BuildCmd: ./build-for-llvm-top.sh
-CleanCmd: make clean
-InstallCmd: make install
+CleanCmd: make clean -C ../build.llvm
+InstallCmd: make install -C ../build.llvm</diff>
      <filename>ModuleInfo.txt</filename>
    </modified>
    <modified>
      <diff>@@ -9,9 +9,16 @@
 # variables. 
 process_arguments &quot;$@&quot;
 
+# First, see if the build directory is there. If not, create it.
+build_dir=&quot;$LLVM_TOP/build.llvm&quot;
+if test ! -d &quot;$build_dir&quot; ; then
+  mkdir -p &quot;$build_dir&quot;
+fi
+
 # See if we have previously been configured by sensing the presence
 # of the config.status scripts
-if test ! -x &quot;config.status&quot; ; then
+config_status=&quot;$build_dir/config.status&quot;
+if test ! -f &quot;$config_status&quot; -o &quot;$config_status&quot; -ot &quot;$0&quot; ; then
   # We must configure so build a list of configure options
   config_options=&quot;--prefix=$PREFIX --with-llvmgccdir=$PREFIX&quot;
   if test &quot;$OPTIMIZED&quot; -eq 1 ; then
@@ -45,12 +52,15 @@ if test ! -x &quot;config.status&quot; ; then
     config_options=&quot;$config_options --disable-threads&quot;
   fi
   config_options=&quot;$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH&quot;
+  src_dir=`pwd`
+  cd &quot;$build_dir&quot;
   msg 0 Configuring $module with:
-  msg 0 &quot;  ./configure&quot; $config_options
-  $LLVM_TOP/llvm/configure $config_options || \
-    die $? &quot;Configuring llvm module failed&quot;
+  msg 0 &quot;  $src_dir/configure&quot; $config_options
+  $src_dir/configure $config_options || \
+    die $? &quot;Configuring $module module failed&quot;
 else
   msg 0 Module $module already configured, ignoring configure options.
+  cd &quot;$build_dir&quot;
 fi
 
 msg 0 Building $module with:</diff>
      <filename>build-for-llvm-top.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3f9a8455bb9768334a15885a29b4a81094244731</id>
    </parent>
  </parents>
  <author>
    <name>Duncan Sands</name>
    <email>baldrick@free.fr</email>
  </author>
  <url>http://github.com/earl/llvm-mirror/commit/e42b26c90cfee44e35944f6e5b6b846054cbcd1e</url>
  <id>e42b26c90cfee44e35944f6e5b6b846054cbcd1e</id>
  <committed-date>2009-01-23T00:42:38-08:00</committed-date>
  <authored-date>2009-01-23T00:42:38-08:00</authored-date>
  <message>Patch to build llvm with srcdir != objdir from
llvm-top.  By Michael Schuerig, with some small
tweaks to make the &quot;don't configure if already
configured&quot; logic work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62842 91177308-0d34-0410-b5e6-96231b3b80d8</message>
  <tree>66a2bb26d03f60dd5054c2130fbecd998da3074b</tree>
  <committer>
    <name>Duncan Sands</name>
    <email>baldrick@free.fr</email>
  </committer>
</commit>
