]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
error if srcdir already configured
authorTom Tromey <tromey@redhat.com>
Sat, 10 May 1997 23:11:04 +0000 (23:11 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 10 May 1997 23:11:04 +0000 (23:11 +0000)
ChangeLog
Makefile.in
aclocal.m4
configure
m4/init.m4

index bc52be1646613b13020fe73c6cd3d6986be35b91..28f22a0792d911d4f65b3abe73bda34109c7d550 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 Sat May 10 16:48:47 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * m4/init.m4: Error if source directory already configured.
+
        * automake.in (scan_dependency_file): Always use srcdir name as
        passed in on command line.
 
index 8c90d26317bf5d399fe3735d22f672c95d1c944f..5d08900b0cb4a563c9fabf590bdaeb4ef025c530 100644 (file)
@@ -240,7 +240,7 @@ install-info-am: $(INFO_DEPS)
          done; \
        done
        @$(POST_INSTALL)
-       @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+       @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
          for file in $(INFO_DEPS); do \
            echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
            install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
@@ -249,7 +249,7 @@ install-info-am: $(INFO_DEPS)
 
 uninstall-info:
        $(PRE_UNINSTALL)
-       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+       @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
          ii=yes; \
        else ii=; fi; \
        for file in $(INFO_DEPS); do \
@@ -314,21 +314,23 @@ uninstall-pkgdataDATA:
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
-       @for subdir in $(SUBDIRS); do \
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       for subdir in $(SUBDIRS); do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
-          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
        done && test -z "$$fail"
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
        for subdir in $$rev; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
-          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
index d395fbac5c042173195151de40e427fc8ae508fa..eabf5ad04a38afb899af179c7990ba7fe45cb1e0 100644 (file)
@@ -1,4 +1,4 @@
-dnl aclocal.m4 generated automatically by aclocal 1.1o
+dnl aclocal.m4 generated automatically by aclocal 1.1p
 
 # Do all the work for Automake.  This macro actually does too much --
 # some checks are only needed if your package does certain things.
@@ -15,6 +15,10 @@ PACKAGE=[$1]
 AC_SUBST(PACKAGE)
 VERSION=[$2]
 AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
 ifelse([$3],,
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
index 7e8b54ed2ddae55cfd88e30c7eecf2c2c5954b81..e641b1893ded3892cc98d6cca25913457347ce20 100755 (executable)
--- a/configure
+++ b/configure
@@ -606,6 +606,9 @@ PACKAGE=automake
 
 VERSION=1.1p
 
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
 cat >> confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
@@ -615,7 +618,7 @@ cat >> confdefs.h <<EOF
 EOF
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:619: checking whether build environment is sane" >&5
+echo "configure:622: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -662,7 +665,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:666: checking for working aclocal" >&5
+echo "configure:669: checking for working aclocal" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -675,7 +678,7 @@ else
 fi
 
 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:679: checking for working autoconf" >&5
+echo "configure:682: checking for working autoconf" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -688,7 +691,7 @@ else
 fi
 
 echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:692: checking for working automake" >&5
+echo "configure:695: checking for working automake" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -701,7 +704,7 @@ else
 fi
 
 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:705: checking for working autoheader" >&5
+echo "configure:708: checking for working autoheader" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -714,7 +717,7 @@ else
 fi
 
 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:718: checking for working makeinfo" >&5
+echo "configure:721: checking for working makeinfo" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -727,7 +730,7 @@ else
 fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:731: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:734: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -761,7 +764,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:765: checking for $ac_word" >&5
+echo "configure:768: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -792,7 +795,7 @@ done
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:796: checking for $ac_word" >&5
+echo "configure:799: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
index 68e78efcf0d06f55b164cfe11cc31391525fafc7..b5cdeb041178ad198ecf16e341a7ad75e0a60578 100644 (file)
@@ -13,6 +13,10 @@ PACKAGE=[$1]
 AC_SUBST(PACKAGE)
 VERSION=[$2]
 AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
 ifelse([$3],,
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))