From owner-freebsd-bugs Sun Oct 5 11:50:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA04145 for bugs-outgoing; Sun, 5 Oct 1997 11:50:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA04131; Sun, 5 Oct 1997 11:50:01 -0700 (PDT) Resent-Date: Sun, 5 Oct 1997 11:50:01 -0700 (PDT) Resent-Message-Id: <199710051850.LAA04131@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, marcs@znep.com Received: from valis.worldgate.com (marcs@valis.worldgate.com [198.161.84.2]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA03937 for ; Sun, 5 Oct 1997 11:44:27 -0700 (PDT) Received: (from marcs@localhost) by valis.worldgate.com (8.8.7/8.8.7) id MAA29710; Sun, 5 Oct 1997 12:44:26 -0600 (MDT) Message-Id: <199710051844.MAA29710@valis.worldgate.com> Date: Sun, 5 Oct 1997 12:44:26 -0600 (MDT) From: marcs@znep.com Reply-To: marcs@znep.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4697: make doesn't handle dependencies with forced target correctly Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4697 >Category: bin >Synopsis: make doesn't handle dependencies with forced target correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 5 11:50:01 PDT 1997 >Last-Modified: >Originator: Marc Slemko >Organization: >Release: FreeBSD 2.2-STABLE i386 >Environment: FreeBSD 2.2-stable as of a few weeks ago, source examination shows it to be in -current as well. >Description: When you have forced dependencies in a makefile that have the same name as a file or directory, they are not called if the mtime on the file is the same as the current time. >How-To-Repeat: If I create the below Makefile: #---------------------------------------------------------------------- default: proxy @echo "Done building module subdirectories" proxy: ForceMe @echo making: $@ ForceMe: #---------------------------------------------------------------------- then do: marcs@alive:/tmp/tm$ touch proxy ; make Done building module subdirectories marcs@alive:/tmp/tm$ touch proxy ; sleep 1 ; make making: proxy Done building module subdirectories It doesn't execute the proxy target unless I make it pause in between. >Fix: Index: compat.c =================================================================== RCS file: /mnt/misc1/cvs//src/usr.bin/make/compat.c,v retrieving revision 1.8 diff -u -r1.8 compat.c --- compat.c 1997/02/22 19:27:07 1.8 +++ compat.c 1997/09/06 17:37:23 @@ -486,7 +486,7 @@ * check for gn->children being empty as well... */ if (!Lst_IsEmpty(gn->commands) || Lst_IsEmpty(gn->children)) { - gn->mtime = now; + gn->mtime = now+1; } #else /* @@ -508,7 +508,7 @@ * -- ardeb 1/12/88 */ if (noExecute || Dir_MTime(gn) == 0) { - gn->mtime = now; + gn->mtime = now+1; } if (gn->cmtime > gn->mtime) gn->mtime = gn->cmtime; >Audit-Trail: >Unformatted: