summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-10-14 22:25:17 +0000
committerRoland McGrath <roland@redhat.com>1993-10-14 22:25:17 +0000
commita3d7dfa85c1e9b689f800a2c422faacf43e52b3e (patch)
tree6420847205e8b5318b088500cc76f95bd62a8a1e
parent88054f8ad3a91a77a36ecb357696729c6a413d32 (diff)
downloadgunmake-a3d7dfa85c1e9b689f800a2c422faacf43e52b3e.tar.gz
Formerly default.c.~29~
-rw-r--r--default.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/default.c b/default.c
index 3c2cd44..5fc22ab 100644
--- a/default.c
+++ b/default.c
@@ -317,25 +317,20 @@ set_default_suffixes ()
}
}
-/* Install the default pattern rules and enter
- the default suffix rules as file rules. */
+/* Enter the default suffix rules as file rules. This used to be done in
+ install_default_implicit_rules, but that loses because we want the
+ suffix rules installed before reading makefiles, and thee pattern rules
+ installed after. */
void
-install_default_implicit_rules ()
+install_default_suffix_rules ()
{
- register struct pspec *p;
register char **s;
if (no_builtin_rules_flag)
return;
- for (p = default_pattern_rules; p->target != 0; ++p)
- install_pattern_rule (p, 0);
-
- for (p = default_terminal_rules; p->target != 0; ++p)
- install_pattern_rule (p, 1);
-
- for (s = default_suffix_rules; *s != 0; s += 2)
+ for (s = default_suffix_rules; *s != 0; s += 2)
{
register struct file *f = enter_file (s[0]);
/* Don't clobber cmds given in a makefile if there were any. */
@@ -349,6 +344,24 @@ install_default_implicit_rules ()
}
}
+
+/* Install the default pattern rules. */
+
+void
+install_default_implicit_rules ()
+{
+ register struct pspec *p;
+
+ if (no_builtin_rules_flag)
+ return;
+
+ for (p = default_pattern_rules; p->target != 0; ++p)
+ install_pattern_rule (p, 0);
+
+ for (p = default_terminal_rules; p->target != 0; ++p)
+ install_pattern_rule (p, 1);
+}
+
void
define_default_variables ()
{