For all possibly-relative subdirs, use $(am__cd).
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 4 Sep 2008 20:04:37 +0000 (22:04 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 4 Sep 2008 20:04:37 +0000 (22:04 +0200)
Up to now, $(am__cd) was only used within backquotes, to avoid
extraneous output.  This patch also uses it for every `cd' to a
relative subdir, to prevent CDPATH from entering an unwanted
directory.
* Makefile.am (maintainer-check): Fix current check for
$(am__cd) within backquotes a bit.  Add new check for `cd' to a
relative subdir.
* automake.in (handle_tags, handle_configure):  Adjust rules.
* lib/am/ansi2knr.am: Likewise.
* lib/am/configure.am: Likewise.
* lib/am/distdir.am: Likewise.
* lib/am/remake-hdr.am: Likewise.
* lib/am/subdirs.am: Likewise.
* lib/am/tags.am: Likewise.
* lib/am/texibuild.am: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19 files changed:
ChangeLog
HACKING
Makefile.am
Makefile.in
automake.in
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/ansi2knr.am
lib/am/configure.am
lib/am/distdir.am
lib/am/remake-hdr.am
lib/am/subdirs.am
lib/am/tags.am
lib/am/texibuild.am
m4/Makefile.in
tests/Makefile.in

index ac0eb1a..ae1310b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
 2008-09-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       For all possibly-relative subdirs, use $(am__cd).
+       Up to now, $(am__cd) was only used within backquotes, to avoid
+       extraneous output.  This patch also uses it for every `cd' to a
+       relative subdir, to prevent CDPATH from entering an unwanted
+       directory.
+       * Makefile.am (maintainer-check): Fix current check for
+       $(am__cd) within backquotes a bit.  Add new check for `cd' to a
+       relative subdir.
+       * automake.in (handle_tags, handle_configure):  Adjust rules.
+       * lib/am/ansi2knr.am: Likewise.
+       * lib/am/configure.am: Likewise.
+       * lib/am/distdir.am: Likewise.
+       * lib/am/remake-hdr.am: Likewise.
+       * lib/am/subdirs.am: Likewise.
+       * lib/am/tags.am: Likewise.
+       * lib/am/texibuild.am: Likewise.
+
        Fix nobase-python.test for BSD make.
        * tests/nobase-python.test: Listing a dependency to be found
        via VPATH search explicitly, without the path, as a target,
diff --git a/HACKING b/HACKING
index 3be23bc..5e7191f 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -64,6 +64,9 @@
 
 * Do not use `cd' within back-quotes, use `$(am__cd)' instead.
   Otherwise the directory name may be printed, depending on CDPATH.
+  More generally, do not ever use plain `cd' together with a relative
+  directory that does not start with a dot, or you might end up in one
+  computed with CDPATH.
 
 * For install and uninstall rules, if a loop is required, it should be
   silent.  Then the body of the loop itself should print each
index 7fc1fd9..2589adc 100644 (file)
@@ -164,7 +164,21 @@ maintainer-check: automake aclocal
 ## Look for cd within backquotes
        @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am; then \
-         echo "Consider using $$$$(am__cd) in the line above." 1>&2; \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
+         exit 1; \
+       fi
+## Look for cd to a relative directory (may be influenced by CDPATH).
+## Skip some known directories that are OK.
+       @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
+             $(srcdir)/lib/am/*.am | \
+             grep -v 'echo.*cd ' | \
+             grep -v 'am__cd =' | \
+             grep -v '^[^#]*cd [./]' | \
+             grep -v '^[^#]*cd \$$(top_builddir)' | \
+             grep -v '^[^#]*cd "\$$\$$am__cwd' | \
+             grep -v '^[^#]*cd \$$(abs' | \
+             grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
 ## Using @_ in a scalar context is most probably a programming error.
index c9792af..d3665dc 100644 (file)
@@ -239,13 +239,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          case '$(am__configure_deps)' in \
            *$$dep*) \
              echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu  \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -262,9 +262,9 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
@@ -310,7 +310,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -344,16 +344,16 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
 ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -415,7 +415,7 @@ CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
+         && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
@@ -460,7 +460,7 @@ distdir: $(DISTFILES)
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
-           (cd $$subdir && \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
                distdir="$$new_distdir" \
@@ -536,7 +536,7 @@ distcheck: dist
        chmod a-w $(distdir)
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -564,7 +564,7 @@ distcheck: dist
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd '$(distuninstallcheck_dir)' \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -775,7 +775,19 @@ maintainer-check: automake aclocal
        fi
        @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am; then \
-         echo "Consider using $$$$(am__cd) in the line above." 1>&2; \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
+         exit 1; \
+       fi
+       @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
+             $(srcdir)/lib/am/*.am | \
+             grep -v 'echo.*cd ' | \
+             grep -v 'am__cd =' | \
+             grep -v '^[^#]*cd [./]' | \
+             grep -v '^[^#]*cd \$$(top_builddir)' | \
+             grep -v '^[^#]*cd "\$$\$$am__cwd' | \
+             grep -v '^[^#]*cd \$$(abs' | \
+             grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
+         echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
        @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
index c49045f..baaac96 100755 (executable)
@@ -3521,7 +3521,7 @@ sub handle_tags
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
                          # Never fail here if a subdir fails; it
                          # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (cd \$\$subdir"
+                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
                          . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
                          . "\tdone\n");
        push (@tag_deps, 'tags-recursive');
@@ -3531,7 +3531,7 @@ sub handle_tags
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
                          # Never fail here if a subdir fails; it
                          # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (cd \$\$subdir"
+                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
                          . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n"
                          . "\tdone\n");
        push (@ctag_deps, 'ctags-recursive');
index e82c47e..9df28b3 100644 (file)
@@ -214,7 +214,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  doc/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -237,7 +237,7 @@ $(am__aclocal_m4_deps):
 
 .texi.info:
        restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-       am__cwd=`pwd` && cd $(srcdir) && \
+       am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
        if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
          for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
@@ -249,10 +249,10 @@ $(am__aclocal_m4_deps):
         -o $@ $<; \
        then \
          rc=0; \
-         cd $(srcdir); \
+         $(am__cd) $(srcdir); \
        else \
          rc=$$?; \
-         cd $(srcdir) && \
+         $(am__cd) $(srcdir) && \
          $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
        fi; \
        rm -rf $$backupdir; exit $$rc
@@ -459,7 +459,7 @@ CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
+         && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
index a5a014a..eac37ee 100644 (file)
@@ -243,7 +243,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Automake/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Automake/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -324,7 +324,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -358,16 +358,16 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
 ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -429,7 +429,7 @@ CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
+         && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
@@ -472,7 +472,7 @@ distdir: $(DISTFILES)
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
-           (cd $$subdir && \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
                distdir="$$new_distdir" \
index 5cb486e..32cfdd9 100644 (file)
@@ -171,7 +171,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Automake/tests/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Automake/tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
index 2c0e7a0..ae035cb 100644 (file)
@@ -219,7 +219,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -300,7 +300,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -334,16 +334,16 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
 ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -405,7 +405,7 @@ CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
+         && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
@@ -448,7 +448,7 @@ distdir: $(DISTFILES)
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
-           (cd $$subdir && \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
                distdir="$$new_distdir" \
index 9796e10..d30c8d1 100644 (file)
@@ -210,7 +210,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/am/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/am/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
index 7dafd1e..ee106c5 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2008
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,7 @@ if %?ANSI2KNR-DIR%
 
 ANSI2KNR = %ANSI2KNR-DIR%/ansi2knr
 %ANSI2KNR-DIR%/ansi2knr:
-       cd %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
+       $(am__cd) %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
 
 else !%?ANSI2KNR-DIR%
 
index 4623f41..e24e9a6 100644 (file)
@@ -40,7 +40,7 @@ endif %?TOPDIR_P%
          case '$(am__configure_deps)' in \
            *$$dep*) \
 ?TOPDIR_P?           echo ' cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \
-?TOPDIR_P?           cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% \
+?TOPDIR_P?           $(am__cd) $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% \
 ?TOPDIR_P?             && exit 0; \
 ?!TOPDIR_P?          ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
 ## If on the other hand, subdir/Makefile.in has been removed, then toplevel
@@ -53,7 +53,7 @@ endif %?TOPDIR_P%
        done; \
 ## Otherwise, rebuild only this file.
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
 
 ## Ensure that GNU make doesn't remove Makefile if ./config.status (below)
@@ -102,7 +102,7 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 $(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
-?TOPDIR_P?     cd $(srcdir) && $(AUTOCONF)
+?TOPDIR_P?     $(am__cd) $(srcdir) && $(AUTOCONF)
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 
@@ -119,7 +119,7 @@ $(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
 ## the $(am__configure_deps) dependency.
 if %?REGEN-ACLOCAL-M4%
 $(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
-?TOPDIR_P?     cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+?TOPDIR_P?     $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 ?!TOPDIR_P?    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
 ## Avoid the "deleted header file" problem for the dependencies.
index 825b561..41e9b2b 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007  Free Software
-## Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  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
@@ -206,7 +206,7 @@ if %?SUBDIRS%
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
-           (cd $$subdir && \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
                distdir="$$new_distdir" \
@@ -390,7 +390,7 @@ distcheck: dist
 ## create very long directory names.
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 ?DISTCHECK-HOOK?         && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
-         && cd $(distdir)/_build \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 ?GETTEXT?          --with-included-gettext \
 ## Additional flags for configure.  Keep this last in the configure
@@ -440,7 +440,7 @@ distuninstallcheck_listfiles = find . -type f -print
 distuninstallcheck:
 ## We use -le 1 because the `dir' file (created by install-info)
 ## might still exist after uninstall.
-       @cd '$(distuninstallcheck_dir)' \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
index 421a982..c1bc42f 100644 (file)
@@ -35,7 +35,7 @@
 ## by autoheader.
 if %?FIRST%
 %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
-       cd $(top_srcdir) && $(AUTOHEADER)
+       $(am__cd) $(top_srcdir) && $(AUTOHEADER)
 ## Whenever $(AUTOHEADER) has run, we must make sure that
 ## ./config.status will rebuild config.h.  The dependency from %STAMP%
 ## on %CONFIG_H_DEPS% (which contains config.hin) is not enough to
index 83ad257..1888042 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
+## 2004, 2008 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
@@ -49,7 +49,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -102,6 +102,6 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
index 191274d..a654ec8 100644 (file)
@@ -124,7 +124,7 @@ CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
 .PHONY: GTAGS
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
+         && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 
index ac49073..aafa081 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-##   2003, 2004, 2005  Free Software Foundation, Inc.
+##   2003, 2004, 2005, 2008  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
@@ -33,7 +33,7 @@
 ##    developer while he writes documentation.)
 ## *.iNN files are used on DJGPP.  See the comments in install-info-am
        restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-?INSRC?        am__cwd=`pwd` && cd $(srcdir) && \
+?INSRC?        am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
 ## If makeinfo is not installed we must not backup the files so
 ##`missing' can do its job and touch $@ if it exists.
 ?INSRC??GENERIC_INFO?   -o $@ $<; \
        then \
          rc=0; \
-?INSRC?          cd $(srcdir); \
+?INSRC?          $(am__cd) $(srcdir); \
        else \
          rc=$$?; \
 ## Beware that backup info files might come from a subdirectory.
-?INSRC?          cd $(srcdir) && \
+?INSRC?          $(am__cd) $(srcdir) && \
          $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
        fi; \
        rm -rf $$backupdir; exit $$rc
index 4a2504e..bd44eea 100644 (file)
@@ -207,7 +207,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  m4/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  m4/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
index 783ab8b..ac99bac 100644 (file)
@@ -812,7 +812,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
-       cd $(top_srcdir) && \
+       $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu  tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status