Date: Sat, 6 Sep 1997 11:48:19 -0600 (MDT) From: Marc Slemko <marcs@znep.com> To: hackers@freebsd.org Subject: BSD make broken with forced targets Message-ID: <Pine.BSF.3.95.970906113026.14839A-100000@alive.znep.com>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970906113026.14839A-100000>