From: Tom Tromey Date: Fri, 17 Nov 1995 21:20:40 +0000 (+0000) Subject: (install-info): Don't cd to srcdir to avoid breaking install-sh X-Git-Tag: Release-0-25~281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aaef34cb445b83dba2b0cdcede4e44f902295be;p=thirdparty%2Fautomake.git (install-info): Don't cd to srcdir to avoid breaking install-sh Other bug fixes --- diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 137d67a77..9a076578a 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -16,11 +16,12 @@ install:: install-info # `pwd` because there might be a newer file there than in srcdir. install-info: $(INFO_DEPS) $(top_srcdir)/mkinstalldirs $(infodir) - here=`pwd`; cd $(srcdir); for file in *.info*; do \ - if test -f $$here/$$file; then \ - d=$here; \ + cd $(srcdir); \ + for file in `cd $(srcdir); echo *.info*`; do \ + if test -f $$file; then \ + d=.; \ else \ - d=. \ + d=$(srcdir); \ fi; \ $(INSTALL_DATA) $$d/$$file $(infodir)/$$file; \ if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ @@ -33,7 +34,7 @@ install-info: $(INFO_DEPS) uninstall:: uninstall-info uninstall-info: - cd $(srcdir); for file in *.info*; do \ + cd $(srcdir); for file in *.info*; do rm -f $(infodir)/$$file; \ done diff --git a/texinfos.am b/texinfos.am index 137d67a77..9a076578a 100644 --- a/texinfos.am +++ b/texinfos.am @@ -16,11 +16,12 @@ install:: install-info # `pwd` because there might be a newer file there than in srcdir. install-info: $(INFO_DEPS) $(top_srcdir)/mkinstalldirs $(infodir) - here=`pwd`; cd $(srcdir); for file in *.info*; do \ - if test -f $$here/$$file; then \ - d=$here; \ + cd $(srcdir); \ + for file in `cd $(srcdir); echo *.info*`; do \ + if test -f $$file; then \ + d=.; \ else \ - d=. \ + d=$(srcdir); \ fi; \ $(INSTALL_DATA) $$d/$$file $(infodir)/$$file; \ if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ @@ -33,7 +34,7 @@ install-info: $(INFO_DEPS) uninstall:: uninstall-info uninstall-info: - cd $(srcdir); for file in *.info*; do \ + cd $(srcdir); for file in *.info*; do rm -f $(infodir)/$$file; \ done