summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-05-09 17:28:47 +0000
committerRoland McGrath <roland@redhat.com>1996-05-09 17:28:47 +0000
commit73c52a3b125b08bb1f86230c4c1238e6f441c148 (patch)
treed53e01b67e8a8f7022dc35f420b4949f3952d437
parent4679c702dede5bb972a2fcfcacdbd6b5651612dd (diff)
downloadgunmake-73c52a3b125b08bb1f86230c4c1238e6f441c148.tar.gz
Thu May 9 13:20:43 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* read.c (read_makefile): Grok `sinclude' as alias for `-include'.
-rw-r--r--read.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/read.c b/read.c
index 95c2169..1de67f5 100644
--- a/read.c
+++ b/read.c
@@ -1,5 +1,5 @@
/* Reading and parsing of makefiles for GNU Make.
-Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
+Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -558,15 +558,16 @@ read_makefile (filename, flags)
v->export = v_noexport;
}
}
- else if (word1eq ("include", 7) || word1eq ("-include", 8))
+ else if (word1eq ("include", 7) || word1eq ("-include", 8)
+ || word1eq ("sinclude", 8))
{
/* We have found an `include' line specifying a nested
makefile to be read at this point. */
struct conditionals *save, new_conditionals;
struct nameseq *files;
- /* "-include" (vs "include") says no
- error if the file does not exist. */
- int noerror = p[0] == '-';
+ /* "-include" (vs "include") says no error if the file does not
+ exist. "sinclude" is an alias for this from SGI. */
+ int noerror = p[0] != 'i';
p = allocated_variable_expand (next_token (p + (noerror ? 9 : 8)));
if (*p == '\0')
@@ -1615,7 +1616,7 @@ parse_file_seq (stringp, stopchar, size, strip)
q1++;
p1--;
}
- *q2++ = *q1++;
+ *q2++ = *q1++;
}
name = savestring (qbase, p1 - qbase);
free (qbase);