summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorJohn Malmberg <wb8tyw@qsl.net>2014-10-07 19:23:47 -0500
committerPaul Smith <psmith@gnu.org>2014-10-20 01:31:42 -0400
commitc0380823a27f14cdc8274ad03c0dcab216d1380b (patch)
tree544dc236327c1524afa1f3680f26b03b23fc511c /read.c
parent1faae1d4edbe9889f000ccba1dfd77ccad1d7de9 (diff)
downloadgunmake-c0380823a27f14cdc8274ad03c0dcab216d1380b.tar.gz
Fix VMS implicit rules and UNIX paths.
This fixes VMS implicit rules and UNIX style pathname handling. It also fixes some of the VMS style pathname handling, more work there will be needed later. TODO: There are other case insensitive platforms besides VMS. We need to find out why there is extra VMS code for this. This indicates either the extra VMS code is not needed, or the case insensitive support may not be complete on the other case insensitive platforms. * default.c: Add missing definitions to default_suffix_rules[] and default_variables[]. TODO: As it is important that VMS DCL mode definitions must always be a superset of UNIX definitions, a better way of maintaining the VMS DCL mode definitions should be devised. * dir.c (downcase_inplace): Add a reentrant downcase() routine. Add future support for VMS 8.2+ _USE_STD_STAT macro which will disable a lot of VMS specific code from compiling. (dir_file_exists_p): vmsify filename only if directory name has VMS directory delimiters. (file_exists_p): Handle both VMS and UNIX directories. (file_impossible): Handle both VMS and Unix directories. Track whether a VMS format path is needed for the return value. * file.c (lookup_file): Check if vmsify is needed; handle UNIX paths. * implicit.c (pattern_search): Enable UNIX paths. * read.c (parse_file_seq): Enable UNIX paths. * remake.c (f_mtime): Fix gpath_search call for VMS paths. * rule.c (count_implicit_rule): Enable UNIX paths, Fix VMS paths. * vpath.c (selective_vpath_search): Enable UNIX paths.
Diffstat (limited to 'read.c')
-rw-r--r--read.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/read.c b/read.c
index 6ff4bcc..e67d386 100644
--- a/read.c
+++ b/read.c
@@ -241,7 +241,8 @@ read_all_makefiles (const char **makefiles)
static const char *default_makefiles[] =
#ifdef VMS
/* all lower case since readdir() (the vms version) 'lowercasifies' */
- { "makefile.vms", "gnumakefile.", "makefile.", 0 };
+ /* TODO: Above is not always true, this needs more work */
+ { "makefile.vms", "gnumakefile", "makefile", 0 };
#else
#ifdef _AMIGA
{ "GNUmakefile", "Makefile", "SMakefile", 0 };
@@ -3099,12 +3100,15 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap,
/* Strip leading "this directory" references. */
if (NONE_SET (flags, PARSEFS_NOSTRIP))
#ifdef VMS
- /* Skip leading '[]'s. */
- while (p - s > 2 && s[0] == '[' && s[1] == ']')
-#else
+ /* Skip leading '[]'s. should only be one set or bug somwhere else */
+ if (p - s > 2 && s[0] == '[' && s[1] == ']')
+ s += 2;
+ /* Skip leading '<>'s. should only be one set or bug somwhere else */
+ if (p - s > 2 && s[0] == '<' && s[1] == '>')
+ s += 2;
+#endif
/* Skip leading './'s. */
while (p - s > 2 && s[0] == '.' && s[1] == '/')
-#endif
{
/* Skip "./" and all following slashes. */
s += 2;
@@ -3118,9 +3122,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap,
if (s == p)
{
/* The name was stripped to empty ("./"). */
-#if defined(VMS)
- continue;
-#elif defined(_AMIGA)
+#if defined(_AMIGA)
/* PDS-- This cannot be right!! */
tp[0] = '\0';
nlen = 0;