From: Alexandre Duret-Lutz Date: Tue, 2 Oct 2001 16:00:04 +0000 (+0000) Subject: * Makefile.am (maintainer-check): Don't check for 'cd' calls in m4. X-Git-Tag: v1.10.2~1663 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22e0da02d82f97d46a47c88e47ddde00c80abccb;p=platform%2Fupstream%2Fautomake.git * Makefile.am (maintainer-check): Don't check for 'cd' calls in m4. * lib/am/tags.am (GTAGS): Use $(am__cd) instead of 'CDPATH=: && cd'. * lib/am/dejagnu.am (check-DEJAGNU): Likewise. * lib/am/distdir.am (distcheck): Likewise. * lib/am/texinfos.am (install-info-am, dist-info): Rewrite without using cd so we don't have to fiddle with CDPATH. * lib/am/header-vars.am (am__cd): Define so as to support Zsh and DOSish path separator. --- diff --git a/ChangeLog b/ChangeLog index 8e3f682..0ac8fc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2001-10-02 Alexandre Duret-Lutz + * Makefile.am (maintainer-check): Don't check for 'cd' calls in m4. + * lib/am/tags.am (GTAGS): Use $(am__cd) instead of 'CDPATH=: && cd'. + * lib/am/dejagnu.am (check-DEJAGNU): Likewise. + * lib/am/distdir.am (distcheck): Likewise. + * lib/am/texinfos.am (install-info-am, dist-info): Rewrite without + using cd so we don't have to fiddle with CDPATH. + * lib/am/header-vars.am (am__cd): Define so as to support Zsh and + DOSish path separator. + +2001-10-02 Alexandre Duret-Lutz + * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON): Strip path of source file. (clean-python): Comment out. diff --git a/Makefile.am b/Makefile.am index 851e84a..994c5a9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -90,10 +90,10 @@ maintainer-check: automake aclocal echo "Found bad split in the lines above." 1>&2; \ exit 1; \ fi -## Look for cd within backquotes without CDPATH=: +## Look for cd within backquotes @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \ - $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \ - echo "Consider setting CDPATH in the lines above" 1>&2; \ + $(srcdir)/lib/am/*.am; then \ + echo "Consider using $$$$(am__cd) in the line above." 1>&2; \ exit 1; \ fi ## Using @_ in a scalar context is most probably a programming error. diff --git a/Makefile.in b/Makefile.in index e8fa85a..eb5dc08 100644 --- a/Makefile.in +++ b/Makefile.in @@ -43,6 +43,7 @@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ @@ -55,12 +56,14 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ DEPDIR = @DEPDIR@ -EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PERL = @PERL@ VERSION = @VERSION@ @@ -184,7 +187,7 @@ automake.dvi: automake.texi $(srcdir)/version.texi `echo $< | sed 's,.*/,,'` .texi.dvi: - TEXINPUTS=$(top_srcdir)/lib:$$TEXINPUTS \ + TEXINPUTS="$(top_srcdir)/lib$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< @@ -223,9 +226,10 @@ dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ d=$(srcdir); \ - for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file; \ + for file in $$d/$$base*; do \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ done; \ done @@ -329,7 +333,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: - here=`CDPATH=: && cd $(top_builddir) && pwd` \ + here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here @@ -389,7 +393,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) -dist: distdir +dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -397,6 +401,11 @@ dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) + # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. @@ -407,7 +416,7 @@ distcheck: dist mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) - dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ + dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -417,14 +426,16 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ - || (echo "Error: files left after uninstall" 1>&2; \ - exit 1) ) \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ + || { echo "ERROR: files left after uninstall:" ; \ + find $$dc_install_base -type f -print ; \ + exit 1; } >&2 ) \ + && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && $(MAKE) $(AM_MAKEFLAGS) distclean \ && rm -f $(distdir).tar.gz \ && (test `find . -type f -print | wc -l` -eq 0 \ - || (echo "Error: files left after distclean" 1>&2; \ - exit 1) ) + || { echo "ERROR: files left after distclean:" ; \ + find . -type f -print ; \ + exit 1; } >&2 ) -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' @@ -462,10 +473,6 @@ clean: clean-recursive clean-am: clean-generic mostlyclean-am -dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 - -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) distclean: distclean-recursive -rm -f config.status config.cache config.log distclean-am: clean-am distclean-generic distclean-tags @@ -490,10 +497,11 @@ install-info-am: $(INFO_DEPS) @list='$(INFO_DEPS)'; \ for file in $$list; do \ d=$(srcdir); \ - for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ - if test -f $$d/$$ifile; then \ - echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ - $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \ + if test -f $$ifile; then \ + relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \ + echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ + $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ done; \ done @@ -525,7 +533,7 @@ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-generic clean-recursive dist dist-all dist-bzip2 \ - dist-info distcheck distclean distclean-generic \ + dist-gzip dist-info distcheck distclean distclean-generic \ distclean-recursive distclean-tags distdir dvi dvi-am \ dvi-recursive info info-am info-recursive install install-am \ install-binSCRIPTS install-data install-data-am \ @@ -580,8 +588,8 @@ maintainer-check: automake aclocal exit 1; \ fi @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \ - $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \ - echo "Consider setting CDPATH in the lines above" 1>&2; \ + $(srcdir)/lib/am/*.am; then \ + echo "Consider using $$$$(am__cd) in the line above." 1>&2; \ exit 1; \ fi @if grep -Hn '[^) ] *= *@_' $(srcdir)/automake.in; then \ diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index 0c78ab4..9428f51 100644 --- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -48,12 +48,12 @@ endif ! %?CYGNUS% .PHONY: check-DEJAGNU check-DEJAGNU: site.exp ## Life is easiest with an absolute srcdir, so do that. - srcdir=`CDPATH=: && cd $(srcdir) && pwd`; export srcdir; \ + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ ## Allow this to work when expect and DejaGNU are in tree. ## Only required when --cygnus in force. ?CYGNUS? if [ -f $(top_builddir)/../expect/expect ]; then \ -?CYGNUS? TCL_LIBRARY=`CDPATH=: && cd $(top_srcdir)/../tcl/library && pwd`; \ +?CYGNUS? TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \ ?CYGNUS? export TCL_LIBRARY; \ ?CYGNUS? fi; \ runtest=$(RUNTEST); \ diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 14ad6b4..40fb596 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -250,7 +250,7 @@ distcheck: dist mkdir $(distdir)/=inst ## Undo the write access. chmod a-w $(distdir) - dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ + dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ ?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 187b5ca..a62cb58 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -60,6 +60,7 @@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/lib/am/tags.am b/lib/am/tags.am index 39887fb..c833dbe 100644 --- a/lib/am/tags.am +++ b/lib/am/tags.am @@ -72,7 +72,7 @@ TAGS: %DIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \ .PHONY: GTAGS GTAGS: - here=`CDPATH=: && cd $(top_builddir) && pwd` \ + here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here @@ -85,4 +85,3 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH - diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 34081e3..0904df7 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -111,12 +111,12 @@ install-info-am: $(INFO_DEPS) for file in $$list; do \ ?CYGNUS? if test -f $$file; then d=.; else d=$(srcdir); fi; \ ?!CYGNUS? d=$(srcdir); \ -## We use these strange circumlocutions because we want the "ifile" to -## be relative, for the install. - for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ - if test -f $$d/$$ifile; then \ - echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ - $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \ + if test -f $$ifile; then \ +## Strip leading '$$d/'. + relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \ + echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ + $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ done; \ done @@ -197,9 +197,11 @@ dist-info: $(INFO_DEPS) ## other modes, allow only source dir. ?!CYGNUS? d=$(srcdir); \ ?CYGNUS? if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file; \ + for file in $$d/$$base*; do \ +## Strip leading '$$d/'. + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ done; \ done endif %?LOCAL-TEXIS%