Today, Richard Dawe wrote:
>Unfortunately this is not portable to DOS.
Oops - my bad. I should have tried it in MSYS I guess. I was modifying the
installed code on linux rather than doing it properly...
>If the patch in incorporated into automake, it should be aware of the path
>separator. Maybe aclocal could have something like this near the start:
>
>$PATH_SEPARATOR = @PATH_SEPARATOR@;
>
>Then modify bootstrap & Makefile.am to substitute @PATH_SEPARATOR@ like
>@PACKAGE@, @SHELL@, etc. Then you could use:
>
> push (@dirlist, split (/$PATH_SEPARTOR/, $ENV{ACLOCALPATH}));
or just
push (@dirlist, split (/@PATH_SEPARTOR@/, $ENV{ACLOCALPATH}));
Either way we'll need to add the `ACX_CHECK_PATHNAME_STYLE_DOS' macro to
configure.in and acinclude.m4 (see
http://www.gnu.org/software/ac-archive/htmldoc/acx_check_pathname_style.html).
I attach a revised patch - it's a little too large to inline this time. It
uses the style Mr Dawe suggested as it fits in better with the existing
code style.
Regards,
Philip Willoughby
Systems Programmer, Department of Computing, Imperial College, London, UK
--
echo [EMAIL PROTECTED] | tr "bizndfohces" "pwgd9ociaku"
Why reinvent the wheel? . . . . . . . . . Because we can make it rounder...
diff -r -b -N -u -U 2 automake-1.7.3/Makefile.am automake-1.7.3-phil1/Makefile.am
--- automake-1.7.3/Makefile.am Wed Feb 12 14:58:35 2003
+++ automake-1.7.3-phil1/Makefile.am Wed Mar 5 14:41:57 2003
@@ -70,5 +70,6 @@
-e 's,[EMAIL PROTECTED]@],$(VERSION),g' \
-e 's,[EMAIL PROTECTED]@],$(APIVERSION),g' \
- -e 's,[EMAIL PROTECTED]@],$(SHELL),g'
+ -e 's,[EMAIL PROTECTED]@],$(SHELL),g' \
+ -e 's,[EMAIL PROTECTED]@],$(PATH_SEPARATOR),g'
automake: automake.in Makefile
diff -r -b -N -u -U 2 automake-1.7.3/acinclude.m4 automake-1.7.3-phil1/acinclude.m4
--- automake-1.7.3/acinclude.m4 Thu Jan 1 01:00:00 1970
+++ automake-1.7.3-phil1/acinclude.m4 Wed Mar 5 14:38:37 2003
@@ -0,0 +1,19 @@
+AC_DEFUN([ACX_CHECK_PATHNAME_STYLE_DOS],
+[AC_MSG_CHECKING(for Windows and DOS and OS/2 style pathnames)
+AC_CACHE_VAL(acx_cv_pathname_style_dos,
+[AC_REQUIRE([AC_CANONICAL_HOST])
+
+acx_cv_pathname_style_dos="no"
+case ${host_os} in
+ *djgpp | *mingw32* | *emx*) acx_cv_pathname_style_dos="yes" ;;
+esac
+])
+AC_MSG_RESULT($acx_cv_pathname_style_dos)
+if test "$acx_cv_pathname_style_dos" = "yes"; then
+ AC_DEFINE(HAVE_PATHNAME_STYLE_DOS,,[defined if running on a system with dos
+style paths])
+ AC_DEFINE(PATH_SEPARATOR, ';')
+else
+ AC_DEFINE(PATH_SEPARATOR, ':')
+fi
+])
diff -r -b -N -u -U 2 automake-1.7.3/aclocal.in automake-1.7.3-phil1/aclocal.in
--- automake-1.7.3/aclocal.in Sat Oct 12 22:14:57 2002
+++ automake-1.7.3-phil1/aclocal.in Wed Mar 5 14:41:03 2003
@@ -27,4 +27,5 @@
# Written by Tom Tromey <[EMAIL PROTECTED]>.
+# ACLOCALPATH support added by Philip Willoughby <[EMAIL PROTECTED]>
BEGIN
@@ -41,4 +42,5 @@
$APIVERSION = '@APIVERSION@';
$PACKAGE = '@PACKAGE@';
+$PATH_SEPARATOR = '@PATH_SEPARATOR@';
# Note that this isn't pkgdatadir, but a separate directory.
# Note also that the versioned directory is handled later.
@@ -219,4 +221,7 @@
}
+ # Respect the ACLOCALPATH environment variable
+ push (@dirlist, split (/$PATH_SEPARATOR/, $ENV{ACLOCALPATH}))
+ if defined ($ENV{ACLOCALPATH});
return @dirlist;
diff -r -b -N -u -U 2 automake-1.7.3/configure.in automake-1.7.3-phil1/configure.in
--- automake-1.7.3/configure.in Thu Feb 20 16:35:58 2003
+++ automake-1.7.3-phil1/configure.in Wed Mar 5 14:38:14 2003
@@ -32,4 +32,6 @@
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
+ACX_CHECK_PATHNAME_STYLE_DOS
+
# The API version is the base version. We must guarantee
# compatibility for all releases with the same API version.