From owner-freebsd-hackers Sat Sep 6 10:48:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA24482 for hackers-outgoing; Sat, 6 Sep 1997 10:48:49 -0700 (PDT) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA24475 for ; Sat, 6 Sep 1997 10:48:44 -0700 (PDT) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.7/8.8.7) with UUCP id LAA21414 for hackers@freebsd.org; Sat, 6 Sep 1997 11:48:43 -0600 (MDT) Received: from localhost (marcs@localhost) by alive.znep.com (8.7.5/8.7.3) with SMTP id LAA15098 for ; Sat, 6 Sep 1997 11:48:19 -0600 (MDT) Date: Sat, 6 Sep 1997 11:48:19 -0600 (MDT) From: Marc Slemko To: hackers@freebsd.org Subject: BSD make broken with forced targets Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. Any workarounds other than changing the target to proxy_targ or something like that? Aha. The below patch fixes it for me. Anyone agree with the patch? 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;