Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 1fbf5a4

Browse files
committed
Fix paths; AutoRegen.sh changes its current working directory to be the
autoconf directory, but these paths need to be relative to the main source directory. Patch originally by Dan Gohman, r67655. Also, cause configure.ac to find absolute paths to LLVM source and object trees. Together, fixes PR1220. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121645 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent eb13382 commit 1fbf5a4

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

projects/sample/autoconf/AutoRegen.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ cwd=`pwd`
1313
if test -d ../../../autoconf/m4 ; then
1414
cd ../../../autoconf/m4
1515
llvm_m4=`pwd`
16-
llvm_src_root=../../..
17-
llvm_obj_root=../../..
16+
llvm_src_root=../..
17+
llvm_obj_root=../..
1818
cd $cwd
1919
elif test -d ../../llvm/autoconf/m4 ; then
2020
cd ../../llvm/autoconf/m4
2121
llvm_m4=`pwd`
22-
llvm_src_root=../..
23-
llvm_obj_root=../..
22+
llvm_src_root=..
23+
llvm_obj_root=..
2424
cd $cwd
2525
else
2626
while true ; do

projects/sample/autoconf/configure.ac

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ dnl **************************************************************************
44
AC_INIT([[[SAMPLE]]],[[[x.xx]]],[bugs@yourdomain])
55

66
dnl Identify where LLVM source tree is
7-
LLVM_SRC_ROOT="../../"
8-
LLVM_OBJ_ROOT="../../"
7+
LLVM_SRC_ROOT="../.."
8+
LLVM_OBJ_ROOT="../.."
9+
10+
dnl Find absolute paths to LLVM source and object trees
11+
LLVM_ABS_SRC_ROOT="`cd $srcdir ; cd $LLVM_SRC_ROOT ; pwd`"
12+
LLVM_ABS_OBJ_ROOT="`cd $LLVM_OBJ_ROOT ; pwd`"
913

1014
dnl Tell autoconf that this is an LLVM project being configured
1115
dnl This provides the --with-llvmsrc and --with-llvmobj options
12-
LLVM_CONFIG_PROJECT($LLVM_SRC_ROOT,$LLVM_OBJ_ROOT)
16+
LLVM_CONFIG_PROJECT($LLVM_ABS_SRC_ROOT,$LLVM_ABS_OBJ_ROOT)
1317

1418
dnl Tell autoconf that the auxilliary files are actually located in
1519
dnl the LLVM autoconf directory, not here.

0 commit comments

Comments
 (0)