From 06d3a9ad5c9cc1b0e7616c3bc1150f63d3e12cf8 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 17 Nov 1995 21:20:40 +0000 Subject: [PATCH] (install-info): Don't cd to srcdir to avoid breaking install-sh Other bug fixes --- lib/am/texinfos.am | 11 ++++++----- texinfos.am | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 137d67a7..9a076578 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 137d67a7..9a076578 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 -- 2.43.5