summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-06-20 07:47:01 +0000
committerRoland McGrath <roland@redhat.com>1995-06-20 07:47:01 +0000
commitf9a914c03502eb2a387005ef56c634c034fcb363 (patch)
tree2e3f94e9b5edd201e790600ecd4f50fbc161c5b4 /read.c
parentb2fc502c5517be226c93f21efc5d877e7af2d8df (diff)
downloadmake-f9a914c03502eb2a387005ef56c634c034fcb363.tar.gz
(read_all_makefiles): Properly append default makefiles to the end of the
`read_makefiles' chain.
Diffstat (limited to 'read.c')
-rw-r--r--read.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/read.c b/read.c
index 5c49b8c..3c51fa5 100644
--- a/read.c
+++ b/read.c
@@ -192,6 +192,9 @@ read_all_makefiles (makefiles)
/* No default makefile was found. Add the default makefiles to the
`read_makefiles' chain so they will be updated if possible. */
struct dep *tail = read_makefiles;
+ /* Add them to the tail, after any MAKEFILES variable makefiles. */
+ while (tail != 0 && tail->next != 0)
+ tail = tail->next;
for (p = default_makefiles; *p != 0; ++p)
{
struct dep *d = (struct dep *) xmalloc (sizeof (struct dep));