summaryrefslogtreecommitdiff
path: root/m4/ax_enable_builddir.m4
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2009-03-09 16:28:22 +0000
committerPeter Simons <simons@cryp.to>2009-04-19 15:35:33 +0200
commit1465b0ad890e6de360339912d8381cd455c55414 (patch)
treea9cfdd1425d7bef12a892cc2658bbb56548b3625 /m4/ax_enable_builddir.m4
parent2b3e9ee812d4cd40009c42d2b1f16d89d5212e2e (diff)
downloadautoconf-archive-1465b0ad890e6de360339912d8381cd455c55414.tar.gz
AX_ENABLE_BUILDDIR: Fix builds configured from a subdirectory
I would like to be able to bypass ENABLE_BUILDDIR and configure a subdirectory myself, without generating a toplevel Makefile. (This is for an unusual automated testsuite which tests behaviour with different configure options, and compiles with -DJUST_TESTING to build a testable version of the program). $ mkdir build; cd build; ../configure ... config.status: executing buildir commands config.status: create top_srcdir/Makefile guessed from local Makefile config.status: build in yes (HOST=) ... $ cd ..; make MAKE i686-pc-linux-gnu : 0 * all-all /bin/bash: line 9: cd: yes: No such file or directory make: *** [all-all] Error 1 Also: ./configure --disable-builddir ... config.status: executing buildir commands config.status: keeping top_srcdir/Makefile from earlier configure ... Which should really be: config.status: executing buildir commands config.status: leaving top_srcdir/Makefile untouched
Diffstat (limited to 'm4/ax_enable_builddir.m4')
-rw-r--r--m4/ax_enable_builddir.m47
1 files changed, 4 insertions, 3 deletions
diff --git a/m4/ax_enable_builddir.m4 b/m4/ax_enable_builddir.m4
index 3b15ef1..f378780 100644
--- a/m4/ax_enable_builddir.m4
+++ b/m4/ax_enable_builddir.m4
@@ -93,7 +93,7 @@ AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
SUB="."
AC_ARG_ENABLE([builddir], AC_HELP_STRING(
[--disable-builddir],[disable automatic build in subdir of sources])
- ,[SUB="$enableval"], [SUB="yes"])
+ ,[SUB="$enableval"], [SUB="auto"])
if test ".$ac_srcdir_defaulted" != ".no" ; then
if test ".$srcdir" = ".." ; then
if test -f config.status ; then
@@ -102,7 +102,7 @@ if test ".$srcdir" = ".." ; then
test ".$SUB" = "." && SUB="."
test ".$SUB" = ".no" && SUB="."
test ".$TARGET" = "." && TARGET="$target"
- test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$TARGET])"
+ test ".$SUB" = ".auto" && SUB="m4_ifval([$1], [$1],[$TARGET])"
if test ".$SUB" != ".." ; then # we know where to go and
AS_MKDIR_P([$SUB])
echo __.$SUB.__ > $SUB/conftest.tmp
@@ -128,6 +128,7 @@ if test ".$srcdir" = ".." ; then
fi
fi
fi fi
+test ".$SUB" = ".auto" && SUB="."
dnl ac_path_prog uses "set dummy" to override $@ which would defeat the "exec"
AC_PATH_PROG(SED,gsed sed, sed)
AUX="$am_aux_dir"
@@ -143,7 +144,7 @@ AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl
pushdef([END],[Makefile.mk])dnl
pushdef([_ALL],[ifelse([$3],,[-all],[$3])])dnl
SRC="$ax_enable_builddir_srcdir"
- if test ".$SUB" = "." ; then
+ if test ".$SUB" = ".." ; then
if test -f "$TOP/Makefile" ; then
AC_MSG_NOTICE([skipping TOP/Makefile - left untouched])
else