+1999-06-14 Paul D. Smith <psmith@gnu.org>
+
+ * read.c (read_makefile): Cast -1 arguments to
+ variable_expand_string() to long. Alexandre Sauve
+ <Alexandre.SAUVE@ifp.fr> reports that without casts, this breaks
+ on a NEC SUPER-UX SX-4 system (and it's wrong without a cast
+ anyway). Of course, (a) I'd really love to start using function
+ prototypes, and (b) there's a whole slew of issues related to int
+ vs. long and signed vs. unsigned in the length handling of
+ variable buffers, etc. Gross. Needs a complete mucking-out.
+ * expand.c (variable_expand): Ditto.
+
+ * acinclude.m4 (AC_FUNC_SELECT): Slight enhancement for AIX 3.2 by
+ Lars Hecking <lhecking@nmrc.ucc.ie>.
+
+ * read.c (get_next_mword): Allow colons to be escaped in target
+ names: fix for regression failure.
+
1999-04-26 Paul D. Smith <psmith@gnu.org>
* main.c (main): Reset read_makefiles to empty after processing so
dnl From a proposed change made on the autoconf list on 2 Feb 1999
dnl http://sourceware.cygnus.com/ml/autoconf/1999-02/msg00001.html
+dnl Patch for AIX 3.2 by Lars Hecking <lhecking@nmrc.ucc.ie> on 17 May 1999
AC_DEFUN(AC_FUNC_SELECT,
[AC_CHECK_FUNCS(select)
AC_MSG_CHECKING([argument types of select()])
AC_CACHE_VAL(ac_cv_type_fd_set_size_t,dnl
[AC_CACHE_VAL(ac_cv_type_fd_set,dnl
- [for ac_cv_type_fd_set in 'fd_set' 'int'; do
+ [for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do
for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do
for ac_type_timeval in 'struct timeval' 'const struct timeval'; do
AC_TRY_COMPILE(dnl
entirely consistent, since we do an unconditional
expand below once we know we don't have a
target-specific variable. */
- (void)variable_expand_string(pend, lb_next, -1);
+ (void)variable_expand_string(pend, lb_next, (long)-1);
lb_next += strlen(lb_next);
p2 = variable_buffer + p2_off;
cmdleft = variable_buffer + cmd_off + 1;
if (*lb_next != '\0')
{
unsigned int l = p2 - variable_buffer;
- (void)variable_expand_string(p2 + plen, lb_next, -1);
+ (void)variable_expand_string(p2 + plen, lb_next, (long)-1);
p2 = variable_buffer + l;
/* Look for a semicolon in the expanded line. */
if (*line == '(')
++count;
else if (*line == ')')
- if (count <= 0)
- break;
- else
- --count;
+ {
+ if (count <= 0)
+ break;
+ else
+ --count;
+ }
}
}
else
this = nextf != 0 ? copy_dep_chain (deps) : deps;
if (pattern != 0)
- /* If this is an extended static rule:
- `targets: target%pattern: dep%pattern; cmds',
- translate each dependency pattern into a plain filename
- using the target pattern and this target's name. */
- if (!pattern_matches (pattern, pattern_percent, name))
- {
- /* Give a warning if the rule is meaningless. */
- error (flocp,"target `%s' doesn't match the target pattern", name);
- this = 0;
- }
- else
- {
- /* We use patsubst_expand to do the work of translating
- the target pattern, the target's name and the dependencies'
- patterns into plain dependency names. */
- char *buffer = variable_expand ("");
+ {
+ /* If this is an extended static rule:
+ `targets: target%pattern: dep%pattern; cmds',
+ translate each dependency pattern into a plain filename
+ using the target pattern and this target's name. */
+ if (!pattern_matches (pattern, pattern_percent, name))
+ {
+ /* Give a warning if the rule is meaningless. */
+ error (flocp,
+ "target `%s' doesn't match the target pattern", name);
+ this = 0;
+ }
+ else
+ {
+ /* We use patsubst_expand to do the work of translating
+ the target pattern, the target's name and the dependencies'
+ patterns into plain dependency names. */
+ char *buffer = variable_expand ("");
- for (d = this; d != 0; d = d->next)
- {
- char *o;
- char *percent = find_percent (d->name);
- if (percent == 0)
- continue;
- o = patsubst_expand (buffer, name, pattern, d->name,
- pattern_percent, percent);
- free (d->name);
- d->name = savestring (buffer, o - buffer);
- }
- }
+ for (d = this; d != 0; d = d->next)
+ {
+ char *o;
+ char *percent = find_percent (d->name);
+ if (percent == 0)
+ continue;
+ o = patsubst_expand (buffer, name, pattern, d->name,
+ pattern_percent, percent);
+ free (d->name);
+ d->name = savestring (buffer, o - buffer);
+ }
+ }
+ }
if (!two_colon)
{
case '\\':
switch (*p)
{
+ case ':':
case ';':
case '=':
case '\\':
= "%sNo rule to make target `%s', needed by `%s'%s";
if (keep_going_flag || file->dontcare)
{
- if (!file->dontcare)
+ if (!file->dontcare && !file->shownerror)
{
if (file->parent == 0)
error (NILF, msg_noparent, "*** ", file->name, ".");
if (file->update_status > 0)
{
DEBUGPR ("Recently tried and failed to update file `%s'.\n");
- if (!file->shownerror)
- {
- int dontcare = file->dontcare;
- file->dontcare = 0;
- no_rule_error(file);
- file->dontcare = dontcare;
- }
+ if (!file->shownerror && file->parent)
+ no_rule_error(file);
return file->update_status;
}
if (!streq (dep_name (d), dep_name (d2)))
break;
if (d == 0 && d2 == 0)
- /* All the dependencies matched. */
- if (override)
- {
- /* Remove the old rule. */
- freerule (r, lastrule);
- /* Install the new one. */
- if (pattern_rules == 0)
- pattern_rules = rule;
- else
- last_pattern_rule->next = rule;
- last_pattern_rule = rule;
-
- /* We got one. Stop looking. */
- goto matched;
- }
- else
- {
- /* The old rule stays intact. Destroy the new one. */
- freerule (rule, (struct rule *) 0);
- return 0;
- }
+ {
+ /* All the dependencies matched. */
+ if (override)
+ {
+ /* Remove the old rule. */
+ freerule (r, lastrule);
+ /* Install the new one. */
+ if (pattern_rules == 0)
+ pattern_rules = rule;
+ else
+ last_pattern_rule->next = rule;
+ last_pattern_rule = rule;
+
+ /* We got one. Stop looking. */
+ goto matched;
+ }
+ else
+ {
+ /* The old rule stays intact. Destroy the new one. */
+ freerule (rule, (struct rule *) 0);
+ return 0;
+ }
+ }
}
}