automake-patches
[Top][All Lists]
Advanced

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

Re: Do not create conditional installation directories


From: Ralf Wildenhues
Subject: Re: Do not create conditional installation directories
Date: Mon, 23 Mar 2009 23:31:29 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Akim Demaille wrote on Thu, Mar 19, 2009 at 09:35:20PM CET:
> The confusion is that I am referring to the emptiness of the directory  
> name (what I named an empty $(foodir)), while you are referring to an  
> empty directory (what I named an empty $(foo_DATA)).
>
> I'm talking about
>
> AC_SUBST([foodir], [])

I assume these two patches implement what you, Akim, desire, while they
do not touch the functionality that you, Ralf, would like not to be
destroyed.  Do you both agree?

Thanks,
Ralf

    Ensure that empty directory variables work with empty content variables.
    
    This test ensures that, if both $(wheredir) and $(where_HOW) are
    the empty string, then the `install' and `uninstall' rules behave
    sanely, for several directory variables `wheredir' and several
    primaries `HOW'.
    
    * tests/instdir.test: New test.
    * tests/Makefile.am: Update.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c072101..1993618 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -324,6 +324,7 @@ instsh2.test \
 instsh3.test \
 instdat.test \
 instdat2.test \
+instdir.test \
 instexec.test \
 instfail.test \
 instfail-info.test \
diff --git a/tests/instdir.test b/tests/instdir.test
new file mode 100755
index 0000000..2e46c6f
--- /dev/null
+++ b/tests/instdir.test
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(foodir) is the empty string, then nothing should be installed there.
+# This test only ensures this if $(foo_PRIMARY) is also empty, see
+# instdir2.test and siblings instdir-*.test for nonempty contents.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_SUBST([foodir], ['${datadir}'/foo])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS =
+nobase_bin_SCRIPTS =
+data_DATA =
+nobase_data_DATA =
+include_HEADERS =
+nobase_include_HEADERS =
+foo_DATA =
+nobase_foo_DATA =
+bardir = $(datadir)/bar
+bar_DATA =
+nobase_bar_DATA =
+man1_MANS =
+man_MANS =
+notrans_man1_MANS =
+notrans_man_MANS =
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
+export bindir datadir includedir foodir bardir man1dir man2dir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:



    Sane (un)install for empty directory variables.
    
    This patch fixes all install and uninstall rules to behave
    sanely when $(wheredir) is the empty string, but $(where_HOW) is
    nonempty, for all kinds of values of `where' and `HOW'.
    
    * lib/am/data.am (install-%DIR%%PRIMARY%, uninstall-%DIR%%PRIMARY%):
    Do not touch the install tree if the corresponding directory variable
    $(%NDIR%dir) is empty.
    * lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA): Likewise.
    * lib/am/libs.am (install-%DIR%LIBRARIES, uninstall-%DIR%LIBRARIES):
    Likewise.
    * lib/am/lisp.am (install-%DIR%LISP, uninstall-%DIR%LISP): Likewise.
    * lib/am/ltlib.am (install-%DIR%LTLIBRARIES, uninstall-%DIR%LTLIBRARIES):
    Likewise.
    * lib/am/mans.am (install-man%SECTION%, uninstall-man%SECTION%):
    Likewise.
    * lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS):
    Likewise.
    * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
    Likewise.
    * lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS):
    Likewise.
    * lib/am/texinfos.am (install-dvi-am, install-html-am, install-pdf-am)
    (install-ps-am, uninstall-dvi-am, uninstall-html-am, uninstall-pdf-am)
    (uninstall-ps-am): Likewise.
    * tests/instdir2.test, tests/instdir-java.test,
    tests/instdir-lisp.test, tests/instdir-ltlib.test,
    tests/instdir-prog.test, tests/instdir-python.test,
    tests/instdir-texi.test: New tests.
    * tests/Makefile.am: Update.
    * NEWS: Update.
    Suggestion by Akim Demaille.

diff --git a/NEWS b/NEWS
index bbeee0e..404e912 100644
--- a/NEWS
+++ b/NEWS
@@ -85,6 +85,9 @@ New in 1.10a:
     Both install and uninstall may sometimes enter (`cd' into) the target
     installation directory now, when no build-local scripts are used.
 
+    Both install and uninstall do not fail anymore but do nothing if an
+    installation directory variable like `bindir' is set to the empty string.
+
     For built-in rules, `make install' now fails reliably if installation
     of a file failed.  Conversely, `make uninstall' even succeeds when
     issued multiple times.
diff --git a/lib/am/data.am b/lib/am/data.am
index 62383fa..3e0eec3 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006,
-## 2007, 2008  Free Software Foundation, Inc.
+## 2007, 2008, 2009  Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 ## If the _%PRIMARY% variable has an entry like foo/bar, install it as
@@ -45,8 +46,8 @@ if %?BASE%
          $(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit 
$$?; \
        done
 else !%?BASE%
-       @list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for file in $$files; do \
            if test -f "$$file"; then xfiles="$$xfiles $$file"; \
            else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
@@ -69,7 +70,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
 uninstall-%DIR%%PRIMARY%:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_%PRIMARY%)'; \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/java.am b/lib/am/java.am
index f183bee..7ec62ae 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008 Free Software
+## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008, 2009 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@ install-%DIR%JAVA: class%DIR%.stamp
 ## A single .java file can be compiled into multiple .class files.  So
 ## we just install all the .class files that got built into this
 ## directory.  This is not optimal, but will have to do for now.
-       @test -n "$(%DIR%_JAVA)" || exit 0; \
+       @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
        set x *.class; shift; test "$$1" != "*.class" || exit 0; \
        echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
        $(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
@@ -65,7 +65,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%JAVA
 uninstall-%DIR%JAVA:
        @$(NORMAL_UNINSTALL)
-       @test -n "$(%DIR%_JAVA)" || exit 0; \
+       @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
        set x *.class; shift; test "$$1" != "*.class" || exit 0; \
        echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
        cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
diff --git a/lib/am/libs.am b/lib/am/libs.am
index ee0061e..c92eff7 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-## 2007, 2008  Free Software Foundation, Inc.
+## 2007, 2008, 2009  Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LIBRARIES)'; list2=; for p in $$list; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
            list2="$$list2 $$p"; \
          else :; fi; \
@@ -43,8 +44,8 @@ if %?BASE%
 else !%?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LIBRARIES)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
            if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
          test -z "$$xfiles" || { \
@@ -61,7 +62,8 @@ endif !%?BASE%
 ## useless; sh never actually executes this command.  Read the GNU
 ## Standards for a little enlightenment on this.
        @$(POST_INSTALL)
-       @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
          if test -f $$p; then \
            %BASE?$(am__strip_dir):f=$$p;% \
 ## Must ranlib after installing because mod time changes.
@@ -82,7 +84,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
 uninstall-%DIR%LIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LIBRARIES)'; \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index bda2bcc..4cbf630 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-## 2007, 2008 Free Software Foundation, Inc.
+## 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -85,8 +85,8 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
-       @if test "$(EMACS)" != no; then \
-         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
+       @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
 ?!BASE?          $(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
@@ -115,7 +115,7 @@ if %?INSTALL%
 uninstall-%DIR%LISP:
        @$(NORMAL_UNINSTALL)
 ## Do not uninstall anything if EMACS was not found.
-       @test "$(EMACS)" != no || exit 0; \
+       @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
        list='$(%DIR%_LISP)'; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 08e055d..5788f78 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LTLIBRARIES)'; list2=; for p in $$list; do \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
            list2="$$list2 $$p"; \
          else :; fi; \
@@ -48,8 +49,8 @@ if %?BASE%
 ?!LIBTOOL?       $(INSTALL) $(INSTALL_STRIP_FLAG) $$list 
"$(DESTDIR)$(%NDIR%dir)"; \
        }
 else !%?BASE%
-       @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
-         if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)"  || list=; \
+       for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; 
done | \
        sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
        $(AWK) 'BEGIN { cur = "." } \
          { if ($$2 == cur) { files = files " " $$1 } \
@@ -82,7 +83,8 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
 uninstall-%DIR%LTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
          %BASE?$(am__strip_dir):f=$$p;% \
 ?LIBTOOL?        echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
 ?LIBTOOL?        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
diff --git a/lib/am/mans.am b/lib/am/mans.am
index d389145..1828c5d 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -34,7 +34,7 @@ install-man%SECTION%: %DEPS%
        test -z "$(man%SECTION%dir)" || $(MKDIR_P) 
"$(DESTDIR)$(man%SECTION%dir)"
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; \
+       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        { for i in $$list; do echo "$$i"; done;  \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -66,7 +66,7 @@ if %?NOTRANS_MANS%
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; \
+       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        { for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -110,7 +110,7 @@ uninstall-man%SECTION%:
        @$(NORMAL_UNINSTALL)
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; \
+       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -125,7 +125,7 @@ if %?NOTRANS_MANS%
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; \
+       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 114407f..64f7543 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_PROGRAMS)'; \
+       @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
        for p in $$list; do echo "$$p $$p"; done | \
 ## On Cygwin with libtool test won't see `foo.exe' but instead `foo'.
 ## So we check for both.
@@ -78,7 +78,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PROGRAMS
 uninstall-%DIR%PROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PROGRAMS)'; \
+       @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
        files=`for p in $$list; do echo "$$p"; done | \
 ## Remove any leading directory before applying $(transform),
 ## but keep the directory part in the hold buffer, in order to
diff --git a/lib/am/python.am b/lib/am/python.am
index 7047452..70beba4 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008  Free Software
-## Foundation, Inc.
+## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008, 2009  Free
+## Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -30,7 +30,8 @@ install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
-       @list='$(%DIR%_PYTHON)'; dlist=''; list2=''; for p in $$list; do\
+       @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || 
list=; \
+       for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
          if test -f $$b$$p; then \
@@ -58,8 +59,8 @@ if %?BASE%
          fi; \
        else :; fi
 else !%?BASE%
-       @list='$(%DIR%_PYTHON)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.
            if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -94,7 +95,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PYTHON
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PYTHON)'; \
+       @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index b8e61c9..cba6b63 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007,
-## 2008 Free Software Foundation, Inc.
+## 2008, 2009 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_SCRIPTS)'; \
+       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
 ?!BASE?        $(am__nobase_strip_setup); \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
@@ -77,7 +77,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
 uninstall-%DIR%SCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_SCRIPTS)'; \
+       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
 ?BASE? files=`for p in $$list; do echo "$$p"; done | \
 ?BASE?        sed -e 's,.*/,,;$(transform)'`; \
 ?!BASE?        $(am__nobase_strip_setup); \
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 382a7c8..e9a8483 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -1,7 +1,7 @@
 ## automake - create Makefile.in from Makefile.am
 
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -144,7 +144,8 @@ include inst-vars.am
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
        test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -156,7 +157,8 @@ install-dvi-am: $(DVIS)
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
        test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-       @list='$(HTMLS)'; list2=; for p in $$list; do \
+       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          $(am__strip_dir) \
          if test -d "$$d$$p"; then \
@@ -178,7 +180,7 @@ install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
        test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
        for file in $$list; do \
 ## Strip possible $(srcdir) prefix.
          case $$file in \
@@ -218,7 +220,7 @@ install-info-am: $(INFO_DEPS)
 ## therefore the code will be triggered although install-info is missing.
        @if (install-info --version && \
             install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
+         list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
 ## Strip directory
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -237,7 +239,8 @@ install-info-am: $(INFO_DEPS)
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
        test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -248,7 +251,8 @@ install-pdf-am: $(PDFS)
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
        test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -279,7 +283,8 @@ if %?LOCAL-TEXIS%
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
          rm -f "$(DESTDIR)$(dvidir)/$$f"; \
@@ -287,7 +292,8 @@ uninstall-dvi-am:
 
 uninstall-html-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(HTMLS)'; for p in $$list; do \
+       @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
 ## $f can be a directory, hence the -r.
          echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
@@ -327,7 +333,8 @@ uninstall-info-am:
 
 uninstall-pdf-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
          rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
@@ -335,7 +342,8 @@ uninstall-pdf-am:
 
 uninstall-ps-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
          rm -f "$(DESTDIR)$(psdir)/$$f"; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1993618..b091813 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -325,6 +325,13 @@ instsh3.test \
 instdat.test \
 instdat2.test \
 instdir.test \
+instdir2.test \
+instdir-java.test \
+instdir-lisp.test \
+instdir-ltlib.test \
+instdir-prog.test \
+instdir-python.test \
+instdir-texi.test \
 instexec.test \
 instfail.test \
 instfail-info.test \
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
new file mode 100755
index 0000000..3edc8b2
--- /dev/null
+++ b/tests/instdir-java.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(javadir) is the empty string, then nothing should be installed there.
+
+required=gcj
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+java_JAVA = foo.java
+END
+
+cat >foo.java <<'END'
+class foo {
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+javadir=
+export javadir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-lisp.test b/tests/instdir-lisp.test
new file mode 100755
index 0000000..bcbabb0
--- /dev/null
+++ b/tests/instdir-lisp.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(lispdir) is the empty string, then nothing should be installed there.
+
+required=emacs
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lisp_LISP = l.el
+END
+
+: >l.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+lispdir=
+export lispdir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test
new file mode 100755
index 0000000..a85d458
--- /dev/null
+++ b/tests/instdir-ltlib.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(libdir) is the empty string, then nothing should be installed there.
+# This test exercises the libtool code paths.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LTIBRARIES = libfoo.la
+nobase_lib_LTLIBRARIES = libnfoo.la sub/libnfoo.la
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test
new file mode 100755
index 0000000..57246e2
--- /dev/null
+++ b/tests/instdir-prog.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(bindir) is the empty string, then nothing should be installed there.
+# This test exercises the prog and libs code paths.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LIBRARIES = libfoo.a
+nobase_lib_LIBRARIES = libnfoo.a sub/libnfoo.a
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-python.test b/tests/instdir-python.test
new file mode 100755
index 0000000..45ccd3d
--- /dev/null
+++ b/tests/instdir-python.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(pythondir) is the empty string, then nothing should be installed there.
+
+required=python
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+python_PYTHON = one.py
+END
+
+cat >one.py <<'END'
+def one(): return 1
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+pythondir=
+export pythondir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
new file mode 100755
index 0000000..6d92193
--- /dev/null
+++ b/tests/instdir-texi.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(infodir) is the empty string, then nothing should be installed there.
+# Likewise for the other install-* targets used for texinfo files.
+
+required='makeinfo-html tex texi2dvi'
+. ./defs || Exit 1
+
+(dvips --help 2>/dev/null >/dev/null) || Exit 77
+(pdfetex --help 2>/dev/null >/dev/null) ||
+  (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+info_TEXINFOS = foo.texi
+END
+
+cat >foo.texi << 'END'
+\input texinfo
address@hidden foo.info
address@hidden foo
address@hidden Top
+Hello walls.
address@hidden version.texi
address@hidden
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE all dvi ps pdf html
+
+infodir= htmldir= dvidir= psdir= pdfdir=
+export infodir htmldir dvidir psdir pdfdir
+
+$MAKE -e install install-html install-dvi install-ps install-pdf
+test ! -d "$instdir"
+$MAKE -e install install-html install-dvi install-ps install-pdf 
DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir2.test b/tests/instdir2.test
new file mode 100755
index 0000000..e8584cc
--- /dev/null
+++ b/tests/instdir2.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# If $(foodir) is the empty string, then nothing should be installed there.
+# This test ensures this also if $(foo_PRIMARY) is nonempty, see
+# instdir.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_SUBST([foodir], ['${datadir}'/foo])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS = s
+nobase_bin_SCRIPTS = ns sub/ns
+data_DATA = d
+nobase_data_DATA = nd sub/nd
+include_HEADERS = h
+nobase_include_HEADERS = nh sub/nh
+foo_DATA = f
+nobase_foo_DATA = nf sub/nf
+bardir = $(datadir)/bar
+bar_DATA = b
+nobase_bar_DATA = nb sub/nb
+man1_MANS = m1.1
+man_MANS = m.2
+notrans_man1_MANS = nm1.1
+notrans_man_MANS = nm.2
+END
+
+: >s
+: >ns
+: >sub/ns
+: >d
+: >nd
+: >sub/nd
+: >h
+: >nh
+: >sub/nh
+: >f
+: >nf
+: >sub/nf
+: >b
+: >nb
+: >sub/nb
+: >m1.1
+: >m.2
+: >nm1.1
+: >nm.2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
+export bindir datadir includedir foodir bardir man1dir man2dir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:




reply via email to

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