[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for 334
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Fix for 334 |
Date: |
08 Sep 2002 15:35:47 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>> "Andreas" == Andreas Buening <address@hidden> writes:
Andreas> Hello!
Andreas> The latest fix for 334 wasn't really satisfying because it still
Andreas> needs cygpath which works only for cygwin. If you already use
Andreas> some if/then clauses I propose to replace "cygpath -w" by $(CYGPATH)
Andreas> in lib/am/depend2.am and to check for cygpath in AM_INIT_AUTOMAKE.
Thanks a lot!
I'm checking in your patch with two minor modifications:
- use CYGPATH_W instead of CYGPATH (according to google some
projects already define CYGPATH=cygpath without the `-w')
- don't define CYGPATH_W if it's already defined.
2002-09-08 Andreas Buening <address@hidden>
Fix for automake/334:
* lib/am/depend2.am: Replaced "cygpath -w" by $(CYGPATH_W).
* m4/init.m4: New make variable CYGPATH_W.
Index: lib/am/depend2.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/depend2.am,v
retrieving revision 1.48
diff -u -r1.48 depend2.am
--- lib/am/depend2.am 24 Aug 2002 03:32:12 -0000 1.48
+++ lib/am/depend2.am 8 Sep 2002 13:36:34 -0000
@@ -62,7 +62,7 @@
if %COMPILE% -MT %OBJOBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
## Ugly invocation here; using a variable fails due to a parsing
## problem in automake.
- %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then cygpath -w '%SOURCE%';
else cygpath -w '$(srcdir)/%SOURCE%'`; \
+ %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W)
'%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'`; \
then mv "%DEPBASE%.Tpo" "%DEPBASE%.Po"; \
else rm -f "%DEPBASE%.Tpo"; exit 1; \
fi
@@ -72,8 +72,8 @@
depfile='%DEPBASE%.Po' tmpdepfile='%DEPBASE%.TPo' @AMDEPBACKSLASH@
$(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-?-o? %COMPILE% %-c% %-o% %OBJOBJ% `if test -f '%SOURCE%'; then cygpath -w
'%SOURCE%'; else cygpath -w '$(srcdir)/%SOURCE%'`
-?!-o? %COMPILE% %-c% `if test -f '%SOURCE%'; then cygpath -w '%SOURCE%'; else
cygpath -w '$(srcdir)/%SOURCE%'`
+?-o? %COMPILE% %-c% %-o% %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W)
'%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'`
+?!-o? %COMPILE% %-c% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%';
else $(CYGPATH_W) '$(srcdir)/%SOURCE%'`
endif !%FASTDEP%
if %?LIBTOOL%
Index: m4/init.m4
===================================================================
RCS file: /cvs/automake/automake/m4/init.m4,v
retrieving revision 1.47
diff -u -r1.47 init.m4
--- m4/init.m4 19 Jul 2002 20:17:58 -0000 1.47
+++ m4/init.m4 8 Sep 2002 13:36:34 -0000
@@ -56,6 +56,16 @@
AC_MSG_ERROR([source directory already configured; run "make distclean"
there first])
fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if cygpath --version >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
--
Alexandre Duret-Lutz
- Fix for 334, Andreas Buening, 2002/09/07
- Re: Fix for 334,
Alexandre Duret-Lutz <=