diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2013-07-25 03:21:53 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-07-30 11:56:57 +0000 |
commit | 9cab9361868eeb95b95d5d3e7960443d91284189 (patch) | |
tree | 706de2d4206e9761be97853a229a58f860810ce7 | |
parent | 01a8c7367d4dd09a6bd86dd55b0af7187cbdebc0 (diff) |
Fix out-of-tree build
The current AX_CONFIG_SUBDIR_OPTION macro assumes that $srcdir is a
relative path. If it is not, jimtcl/configure.gnu is generated such that
an out-of-tree build will fail at the configure step unless the build dir
is a sibling to the source dir.
Change the generated jimtcl/configure.gnu wrapper to use the same
`dirname $0` trick as jimtcl/configure (which itself is a wrapper around
autosetup).
Change-Id: I0fb19ae114ba37169b422b28313262f9bd83eb6f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1528
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
-rw-r--r-- | config_subdir.m4 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/config_subdir.m4 b/config_subdir.m4 index 4102dfd3..1c790985 100644 --- a/config_subdir.m4 +++ b/config_subdir.m4 @@ -21,7 +21,6 @@ AC_DEFUN([AX_CONFIG_SUBDIR_OPTION], AC_CONFIG_SUBDIRS([$1]) m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu], -[printf "#!/bin/sh -"\$"SHELL "../$srcdir/$1/configure" $2 \""\$"@"\" > "$srcdir/$1/configure.gnu" +[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" $2 "'\$'@"' > "$srcdir/$1/configure.gnu" ]) ]) |