summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-06-12 05:06:50 +0000
committerOliver Bolte <obo@openoffice.org>2007-06-12 05:06:50 +0000
commitf00af7d43dec40d25c30a02ef52292f835e0d329 (patch)
tree07e71b6f9bfbbff868f4aa86c4c68ab93ba7bf7f
parent0f533621ffcdfe5841f437e2c5822f4e6d1364ed (diff)
INTEGRATION: CWS dmake48 (1.10.2); FILE MERGED
2007/03/17 19:00:38 vq 1.10.2.1: #i73499# Add new .WINPATH attribute to generate Windows style paths (with regular slashes) instead of the default cygwin style (POSIX) paths for dmake's dynamic macros. This attribute is specific for cygwin dmake executables and non-cygwin environments ignore this attribute. The windows style paths use regular slashes ('/') instead of the usual windows backslash ('\') as directory separator to avoid quoting problems (It still is a cygwin dmake!) and cygwin as well as native windows programs should have no problems using this (c:/foo/bar) path representation. The affected macros are $@, $*, $>, $?, $<, $&, $^ and $(PWD), $(MAKEDIR) and $(TMD). Examples: Content of $(PWD) without .WINPATH (default): /cygdrive/c/temp Content of $(PWD) with .WINPATH set: c:/temp
-rw-r--r--dmake/rulparse.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/dmake/rulparse.c b/dmake/rulparse.c
index 565bda26e932..e82474341dfd 100644
--- a/dmake/rulparse.c
+++ b/dmake/rulparse.c
@@ -1,6 +1,6 @@
/* $RCSfile: rulparse.c,v $
--- $Revision: 1.10 $
--- last change: $Author: vg $ $Date: 2007-01-18 09:32:23 $
+-- $Revision: 1.11 $
+-- last change: $Author: obo $ $Date: 2007-06-12 06:06:50 $
--
-- SYNOPSIS
-- Perform semantic analysis on input
@@ -61,7 +61,7 @@ static int _sv_op;
static char *_sv_setdir;
static char _sv_globprq_only = 0;
-/* Define for global attribute mask */
+/* Define for global attribute mask (A_SWAP == A_WINPATH) */
#define A_GLOB (A_PRECIOUS | A_SILENT | A_IGNORE | A_EPILOG | A_SWAP |\
A_SHELL | A_PROLOG | A_NOINFER | A_SEQ | A_MKSARGS )
@@ -1460,7 +1460,11 @@ t_attr attr;
else if( flag == A_SEQ ) Def_macro(".SEQUENTIAL","y", M_EXPANDED);
else if( flag == A_SHELL ) Def_macro(".USESHELL", "y", M_EXPANDED);
else if( flag == A_MKSARGS ) Def_macro(".MKSARGS", "y", M_EXPANDED);
+#if !defined(__CYGWIN__)
else if( flag == A_SWAP ) Def_macro(".SWAP", "y", M_EXPANDED);
+#else
+ else if( flag == A_WINPATH ) Def_macro(".WINPATH", "y", M_EXPANDED);
+#endif
}
attr &= ~A_GLOB;
@@ -1499,7 +1503,7 @@ _is_attribute( name )/*
Valid attributes are: .IGNORE, .SETDIR=, .SILENT, .PRECIOUS, .LIBRARY,
.EPILOG, .PROLOG, .LIBRARYM, .SYMBOL, .UPDATEALL,
- .USESHELL, .NOINFER, .PHONY, .SWAP, .SEQUENTIAL
+ .USESHELL, .NOINFER, .PHONY, .SWAP/.WINPATH, .SEQUENTIAL
.NOSTATE, .MKSARGS, .IGNOREGROUP, .GROUP, .FIRST
.EXECUTE, .ERRREMOVE
@@ -1561,9 +1565,12 @@ char *name;
else if( !strcmp(name, "SILENT") ) attr = A_SILENT;
else if( !strcmp(name, "SYMBOL") ) attr = A_SYMBOL;
else if( !strcmp(name, "SEQUENTIAL")) attr = A_SEQ;
+ /* A_SWAP has no meaning except for MSDOS. */
else if( !strcmp(name, "SWAP")) attr = A_SWAP;
else attr = 0;
break;
+
+ case 'W': attr = (strcmp(name, "WINPATH")) ? 0 : A_WINPATH; break;
}
DB_RETURN( attr );