bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf 2.64 + shtool => incorrect ac_install_sh


From: Ralf Wildenhues
Subject: Re: autoconf 2.64 + shtool => incorrect ac_install_sh
Date: Mon, 14 Dec 2009 21:57:41 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Ralf Wildenhues wrote on Sat, Dec 12, 2009 at 08:48:01AM CET:
> Darn, that's what I get for not reading closely.  I'm pushing this patch
> and adding you to THANKS.  I still need to write a test case.

>     Revert "Improve AC_CONFIG_AUX_DIRS a bit." to fix shtool usage.

Proposed test case.  Tested both with and without shtool installed,
and both with and without the patch revert.  OK?

Thanks,
Ralf

    Add testsuite exposure for shtool usage.
    
    * tests/foreign.at (shtool): New test.
    Report by Dmitry Grebeniuk.

diff --git a/tests/foreign.at b/tests/foreign.at
index 099a84f..feb280f 100644
--- a/tests/foreign.at
+++ b/tests/foreign.at
@@ -89,3 +89,54 @@ AT_CHECK_AUTOCONF([], [], [], [ignore])
 AT_CHECK_CONFIGURE([], [], [], [ignore])
 
 AT_CLEANUP
+
+
+AT_SETUP([shtool])
+
+AT_DATA([configure.ac],
+[[AC_INIT([shtool test], [1.0])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_PATH_PROG([SHTOOL], [shtool], [false])
+AC_PROG_INSTALL
+AC_SUBST([ac_install_sh])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.in],
+[[SHTOOL = @SHTOOL@
+# fake these, so that we use shtool whereever possible.
+INSTALL_PROGRAM = $(ac_install_sh)
+INSTALL_DATA = $(ac_install_sh) -m 644
+prefix = @prefix@
+ac_install_sh = @ac_install_sh@
+
+install:
+       $(INSTALL_PROGRAM) file1 $(prefix)/file1
+       $(INSTALL_DATA) file2 $(prefix)/file2
+
+copy-shtool:
+       test '$(SHTOOL)' != false
+       cp '$(SHTOOL)' build-aux
+]])
+
+: >file1
+: >file2
+chmod +x file1
+: ${MAKE=make}
+mkdir build-aux inst
+instdir=`pwd`/inst
+AT_CHECK_AUTOCONF
+cp "$abs_top_srcdir/build-aux/install-sh" build-aux
+AT_CHECK_CONFIGURE
+AT_CHECK([$MAKE copy-shtool], [], [ignore], [ignore],
+        [AT_CHECK([: >build-aux/shtool])])
+rm -f build-aux/install-sh
+AT_CHECK_CONFIGURE([--prefix="$instdir" ac_cv_path_SHTOOL=false])
+AT_CHECK([grep '^ac_install_sh = .*shtool install -c' Makefile], [], [ignore])
+if test -s build-aux/shtool; then
+  AT_CHECK([$MAKE install], [], [ignore], [ignore])
+  AT_CHECK([test -f inst/file1 && test -f inst/file2 && test -x inst/file1])
+fi
+
+AT_CLEANUP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]