hrp@BORING.CRAY.COM (Hal Peterson) (09/21/89)
I am using GNU Make 3.55 on a Sun-3/50 running SunOS 3.5. I built it with GCC 1.35. When there are no commands in an explicit rule, Make refuses to rebuild the target even if the target is out of date. The problem is that two checks in remake.c (update_file_1) are being made in the wrong order; d->changed should be set before its value is used to set deps_changed. Here is a patch that seems to help. -- Hal Peterson Domain: hrp@cray.com Cray Research Old style: hrp%cray.com@uc.msc.umn.edu 1440 Northland Dr. UUCP: uunet!cray!hrp Mendota Hts, MN 55120 USA Telephone: +1 612 681 3145 ======================================================================== *** remake-DIST.c Wed Sep 20 13:43:11 1989 --- remake.c Wed Sep 20 15:57:34 1989 *************** *** 429,440 **** deps_changed = 0; for (d = file->deps; d != 0; d = d->next) { - /* Set DEPS_CHANGED if this dep actually changed. */ - deps_changed |= d->changed; - /* Set D->changed if either this dep actually changed, or its dependent, FILE, is older or does not exist. */ d->changed |= noexist || file_mtime (d->file) > this_mtime; if (debug_flag && !noexist) { --- 429,440 ---- deps_changed = 0; for (d = file->deps; d != 0; d = d->next) { /* Set D->changed if either this dep actually changed, or its dependent, FILE, is older or does not exist. */ d->changed |= noexist || file_mtime (d->file) > this_mtime; + + /* Set DEPS_CHANGED if this dep actually changed. */ + deps_changed |= d->changed; if (debug_flag && !noexist) {