automake-patches
[Top][All Lists]
Advanced

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

Re: 1-tvh-autoconf-2.50.diff


From: Alexandre Duret-Lutz
Subject: Re: 1-tvh-autoconf-2.50.diff
Date: 25 Sep 2001 19:47:24 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Tim" == Tim Van Holder <address@hidden> writes:

 >> +## Make sure CDPATH assignments take Zsh into account
 >> +   @if grep -n '^[^#]*CDPATH' $(srcdir)/lib/am/*.am | \
 >> +         fgrep -v 'CDPATH=$$$${ZSH_VERSION+.}:'; then \

 Tim> Almost forgot: This should be 

 Tim> ... 'CDPATH=$$$${ZSH_VERSION+.}$(PATH_SEPARATOR)'

 Tim> so it will also work on DOSish systems.
 Tim> The same goes for the other instances of CDPATH in your
 Tim> patch.

Thank you, here is an updated patch.

BTW, I just thought it might be more conveniant to defined
  CD = CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) && cd
and then use '$(CD)' instead of 'cd'.  Wouldn't that
look cleaner ?

2001-09-25  Alexandre Duret-Lutz  <address@hidden>

        * Makefile.am (maintainer-check): Don't check for CDPATH in m4
        files; make sure CDPATH settings support Zsh.
        * lib/am/tags.am (GTAGS): Support Zsh and DOS path separator in
        CDPATH setting.
        * 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.

Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.176
diff -u -r1.176 Makefile.am
--- Makefile.am 2001/09/22 16:05:36     1.176
+++ Makefile.am 2001/09/25 17:26:51
@@ -92,8 +92,14 @@
        fi
 ## Look for cd within backquotes without CDPATH=:
        @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
-             $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
+             $(srcdir)/lib/am/*.am; then \
          echo "Consider setting CDPATH in the lines above" 1>&2; \
+         exit 1; \
+       fi
+## Make sure CDPATH assignments take Zsh into account
+       @if grep -n '^[^#]*CDPATH=' $(srcdir)/lib/am/*.am | \
+             fgrep -v 'CDPATH=$$$${ZSH_VERSION+.}$$(PATH_SEPARATOR)'; then \
+         echo 'Consider setting CDPATH to 
$$$${ZSH_VERSION+.}$$(PATH_SEPARATOR) in the lines above' 1>&2; \
          exit 1; \
        fi
 ## Using @_ in a scalar context is most probably a programming error.
Index: lib/am/dejagnu.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/dejagnu.am,v
retrieving revision 1.15
diff -u -r1.15 dejagnu.am
--- dejagnu.am  2001/08/05 22:02:33     1.15
+++ dejagnu.am  2001/09/25 17:26:51
@@ -48,12 +48,12 @@
 .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=`CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) && 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=`CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) && cd 
$(top_srcdir)/../tcl/library && pwd`; \
 ?CYGNUS?         export TCL_LIBRARY; \
 ?CYGNUS?       fi; \
        runtest=$(RUNTEST); \
Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.20
diff -u -r1.20 distdir.am
--- distdir.am  2001/07/14 20:12:52     1.20
+++ distdir.am  2001/09/25 17:26:51
@@ -250,7 +250,7 @@
        mkdir $(distdir)/=inst
 ## Undo the write access.
        chmod a-w $(distdir)
-       dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+       dc_install_base=`CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) && cd 
$(distdir)/=inst && pwd` \
 ?DISTCHECK-HOOK?         && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
          && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
Index: lib/am/tags.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/tags.am,v
retrieving revision 1.33
diff -u -r1.33 tags.am
--- tags.am     2001/07/20 01:28:34     1.33
+++ tags.am     2001/09/25 17:26:51
@@ -72,7 +72,7 @@
 
 .PHONY: GTAGS
 GTAGS:
-       here=`CDPATH=: && cd $(top_builddir) && pwd` \
+       here=`CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) && cd $(top_builddir) 
&& pwd` \
          && cd $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) $$here
 
@@ -85,4 +85,3 @@
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.90
diff -u -r1.90 texinfos.am
--- texinfos.am 2001/05/29 21:02:13     1.90
+++ texinfos.am 2001/09/25 17:26:51
@@ -111,12 +111,12 @@
        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 @@
 ## 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%

-- 
Alexandre Duret-Lutz



reply via email to

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