[cmake-commits] king committed System.c 1.7 1.8 System.h.in 1.5 1.6
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 17 10:53:16 EDT 2007
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv1381/Source/kwsys
Modified Files:
System.c System.h.in
Log Message:
ENH: Added more special unix shell characters that require quoting. Added escaping of % as %% for shells inside mingw32-make.
Index: System.h.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/System.h.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- System.h.in 27 Jan 2007 20:29:41 -0000 1.5
+++ System.h.in 17 May 2007 14:53:14 -0000 1.6
@@ -33,6 +33,7 @@
#define kwsysSystem_Shell_Flag_VSIDE kwsys_ns(System_Shell_Flag_VSIDE)
#define kwsysSystem_Shell_Flag_EchoWindows kwsys_ns(System_Shell_Flag_EchoWindows)
#define kwsysSystem_Shell_Flag_WatcomWMake kwsys_ns(System_Shell_Flag_WatcomWMake)
+#define kwsysSystem_Shell_Flag_MinGWMake kwsys_ns(System_Shell_Flag_MinGWMake)
#define kwsysSystem_Shell_Flag_AllowMakeVariables kwsys_ns(System_Shell_Flag_AllowMakeVariables)
#if defined(__cplusplus)
@@ -86,12 +87,15 @@
/** The target shell is in a Watcom WMake makefile. */
kwsysSystem_Shell_Flag_WatcomWMake = (1<<3),
+ /** The target shell is in a MinGW Make makefile. */
+ kwsysSystem_Shell_Flag_MinGWMake = (1<<4),
+
/** Make variable reference syntax $(MAKEVAR) should not be escaped
to allow a build tool to replace it. Replacement values
containing spaces, quotes, backslashes, or other
non-alphanumeric characters that have significance to some makes
or shells produce undefined behavior. */
- kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<4)
+ kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<5)
};
#if defined(__cplusplus)
@@ -112,6 +116,7 @@
# undef kwsysSystem_Shell_Flag_VSIDE
# undef kwsysSystem_Shell_Flag_EchoWindows
# undef kwsysSystem_Shell_Flag_WatcomWMake
+# undef kwsysSystem_Shell_Flag_MinGWMake
# undef kwsysSystem_Shell_Flag_AllowMakeVariables
#endif
Index: System.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/System.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- System.c 16 May 2007 20:19:18 -0000 1.7
+++ System.c 17 May 2007 14:53:14 -0000 1.8
@@ -60,7 +60,9 @@
static int kwsysSystem_Shell__CharNeedsQuotesOnUnix(char c)
{
return ((c == '\'') || (c == '`') || (c == ';') || (c == '#') ||
- (c == '&') || (c == '$') || (c == '(') || (c == ')'));
+ (c == '&') || (c == '$') || (c == '(') || (c == ')') ||
+ (c == '~') || (c == '<') || (c == '>') || (c == '|') ||
+ (c == '*') || (c == '\\'));
}
/*--------------------------------------------------------------------------*/
@@ -289,10 +291,12 @@
}
else if(*c == '%')
{
- if(flags & kwsysSystem_Shell_Flag_VSIDE)
+ if((flags & kwsysSystem_Shell_Flag_VSIDE) ||
+ ((flags & kwsysSystem_Shell_Flag_Make) &&
+ (flags & kwsysSystem_Shell_Flag_MinGWMake)))
{
- /* In a VS IDE a percent is written %% so we need one extra
- characters. */
+ /* In the VS IDE or MinGW make a percent is written %% so we
+ need one extra characters. */
size += 1;
}
}
@@ -443,9 +447,11 @@
}
else if(*c == '%')
{
- if(flags & kwsysSystem_Shell_Flag_VSIDE)
+ if((flags & kwsysSystem_Shell_Flag_VSIDE) ||
+ ((flags & kwsysSystem_Shell_Flag_Make) &&
+ (flags & kwsysSystem_Shell_Flag_MinGWMake)))
{
- /* In a VS IDE a percent is written %%. */
+ /* In the VS IDE or MinGW make a percent is written %%. */
*out++ = '%';
*out++ = '%';
}
More information about the Cmake-commits
mailing list