[m-rev.] diff: convert windows paths to unix paths in MMAKE_VPATH
Peter Ross
pro at missioncriticalit.com
Wed Jun 30 17:02:44 AEST 2004
Hi,
===================================================================
Fix a bug where we used windows paths which contain colons in the colon
seperated VPATH variable.
configure.in:
Check for cygpath -u.
scripts/Mmake.vars.in:
Use cygpath -u or echo to convert each of the directories in the
VPATH into unix format.
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.393
diff -u -r1.393 configure.in
--- configure.in 24 Jun 2004 11:25:49 -0000 1.393
+++ configure.in 29 Jun 2004 23:39:18 -0000
@@ -109,6 +109,9 @@
# path to Windows format, with '/' as the directory
# separator).
AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
+AC_CHECK_PROG(CYGPATHU, cygpath, cygpath -u, echo)
+
+AC_SUBST(CYGPATHU)
PREFIX="`$CYGPATH $PREFIX`"
LIBDIR="`$CYGPATH $PREFIX/lib/mercury`"
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.93
diff -u -r1.93 Mmake.vars.in
--- scripts/Mmake.vars.in 11 Feb 2004 03:50:05 -0000 1.93
+++ scripts/Mmake.vars.in 29 Jun 2004 23:39:18 -0000
@@ -42,13 +42,21 @@
# We need to substitute all spaces with colons for the VPATH to work.
# Getting a space to be recognised as the first argument of the subst
# function is problematic; hence the `$(nullstring)' hack.
+# As VPATH uses colon as the seperator we also need to convert all the
+# directories into cygwin unix format if they are in windows format.
# XXX Note that directory names with spaces in them (e.g. under Windows)
# will cause problems for the VPATH settings below, as well as every
# occurrence of $(patsubst ...), since GNU Make does not respect quotes.
+UNIX_MERCURY_EXTRA_INT_DIRS = $(foreach dir, $(MERCURY_EXTRA_INT_DIRS),
+ $(shell @CYGPATHU@ "$(dir)"))
+UNIX_MERC_INT_DIR = $(shell @CYGPATHU@ "$(MERC_INT_DIR)")
+UNIX_MERCURY_EXTRA_INIT_DIRS = $(foreach dir, $(MERCURY_EXTRA_INIT_DIRS),
+ $(shell @CYGPATHU@ "$(dir)"))
+
nullstring =
MMAKE_VPATH = $(subst $(nullstring) ,:,$(strip \
- $(MERCURY_EXTRA_INT_DIRS) $(MERC_INT_DIR)\
- $(MERCURY_EXTRA_INIT_DIRS)))
+ $(UNIX_MERCURY_EXTRA_INT_DIRS) $(UNIX_MERC_INT_DIR)\
+ $(UNIX_MERCURY_EXTRA_INIT_DIRS)))
VPATH = $(MMAKE_VPATH) # do not remove the `:' from this comment!!!
# the above comment works around a misfeature of
# autoconf which causes it to delete assignments to
--
Software Engineer (Work) +32 2 757 10 15
Mission Critical (Mobile) +32 485 482 559
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list