]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly main.c.~98~
authorRoland McGrath <roland@redhat.com>
Thu, 14 Oct 1993 22:23:39 +0000 (22:23 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 14 Oct 1993 22:23:39 +0000 (22:23 +0000)
main.c

diff --git a/main.c b/main.c
index 323e1a05d27b60b798535da4811fdd61aa969687..dd06aa4730e3eb9ed88cba90c98f2f6f8a04cfd5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -747,6 +747,14 @@ main (argc, argv, envp)
 
   set_default_suffixes ();
 
+  /* Define the file rules for the built-in suffix rules.  These will later
+     be converted into pattern rules.  We used to do this in
+     install_default_implicit_rules, but since that happens after reading
+     makefiles, it results in the built-in pattern rules taking precedence
+     over makefile-specified suffix rules, which is wrong.  */
+
+  install_default_suffix_rules ();
+
   /* Define some internal and special variables.  */
 
   define_automatic_variables ();
@@ -785,17 +793,20 @@ main (argc, argv, envp)
 
   snap_deps ();
 
-  /* Install the default implicit rules.
+  /* Convert old-style suffix rules to pattern rules.  It is important to
+     do this before installing the built-in pattern rules below, so that
+     makefile-specified suffix rules take precedence over built-in pattern
+     rules.  */
+
+  convert_to_pattern ();
+
+  /* Install the default implicit pattern rules.
      This used to be done before reading the makefiles.
      But in that case, built-in pattern rules were in the chain
      before user-defined ones, so they matched first.  */
 
   install_default_implicit_rules ();
 
-  /* Convert old-style suffix rules to pattern rules.  */
-
-  convert_to_pattern ();
-
   /* Compute implicit rule limits.  */
 
   count_implicit_rule_limits ();