diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2009-03-09 16:13:11 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2009-04-19 15:35:34 +0200 |
commit | c4652211aaacee5991c8dfe310fc9231559bdbe4 (patch) | |
tree | 93af00acbf5750b5aad911f8b9be88d8d0562dd8 | |
parent | a3a9d343a1841286c7a45bf6473abc272340dce1 (diff) | |
download | autoconf-archive-c4652211aaacee5991c8dfe310fc9231559bdbe4.tar.gz |
AX_ENABLE_BUILDDIR: Fix "make distclean" toplevel Makefile target
$ ./configure; make
...
MAKE i686-pc-linux-gnu : 0 * distclean
make[1]: Entering directory `/home/alan/bootup/src/module-init-tools/build'
rm -f doc/*.tmp manpage.refs manpage.links
make[1]: Leaving directory `/home/alan/bootup/src/module-init-tools/build'
MAKE i686-pc-linux-gnu : 0 * distclean (all local builds)
# rm -r .
# (sleep 3)
rm -r .
rm: cannot remove directory `.'
The problem is the method used to determine which builddirs are local,
and therefore should removed by "make distclean". It relies on them
starting with "./", but they don't :-). Instead, we can assume that
non-local directories will start with "/" or "../".
-rw-r--r-- | ax_enable_builddir.m4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ax_enable_builddir.m4 b/ax_enable_builddir.m4 index e5f08da..b14add0 100644 --- a/ax_enable_builddir.m4 +++ b/ax_enable_builddir.m4 @@ -226,13 +226,15 @@ dnl special rule add-on: "distclean" removes all local builddirs completely /distclean[]_ALL *:/a\\ @ HOST="\$(HOST)\" \\\\\\ ; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\ - ; BUILD=$x grep "^#### .*| *\\./" Makefile | sed -e 's/.*|//' $x \\\\\\ + ; BUILD=$x grep "^#### .*|" Makefile | sed -e 's/.*|//' $x \\\\\\ ; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\ ; echo "MAKE \$\$HOST : \$\$n * \$\@ (all local builds)" \\\\\\ ; test ".\$\$BUILD" = "." && BUILD="." \\\\\\ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ ; echo "# rm -r \$\$i"; done ; echo "# (sleep 3)" ; sleep 3 \\\\\\ ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\ + ; echo "\$\$i" | grep "^/" > /dev/null && continue \\\\\\ + ; echo "\$\$i" | grep "^../" > /dev/null && continue \\\\\\ ; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile _EOF cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING |