🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Hal Peterson Wed, 20 Sep 1989 21:09
Make 3.55 and targets with no commands: a fix
#432
Author: Hal Peterson
Date: Wed, 20 Sep 1989 21:09
45 lines
2110 bytes
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)
  	{
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads