🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1672

Make 3.57 bug (empty rule)

#1672
From: bothner
Date: Thu, 14 Dec 1989 00:17
40 lines
1581 bytes
The following Makefile does not work under make 3.57.
This is simplied from a Makefile that used to work under
previous versions.

gilroy/tmp:3>cat Makefile
cat Makefile
.SUFFIXES:
SRC = foo.c

foo: ${SRC}
        echo +CC+ $<

# and don't ever try to find a way to build the sources or headers. We
# like them the way they are...
${SRC} ::
gilroy/tmp:4>touch foo.c
touch foo.c
gilroy/tmp:5>touch foo
touch foo
gilroy/tmp:6>gmake -v foo
gmake -v foo
GNU Make version 3.57, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 1989 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

echo +CC+ foo.c
+CC+ foo.c
gilroy/tmp:7>

The problem is the '${SRC} ::' line. This rule gets triggered,
to "make" foo.c. Then make decides to set foo.c's
last_mtime field (since foo.c just go remade). I think
it sets it to "now". (It would probably be best to just
reset the time to "unknown.")  Then make thinks that foo.c is newer
than foo, so it tries to re-make foo.

	--Per Bothner
bothner@wsl.dec.com
Technical Details
Message-ID: <8912140017.AA20326@gilroy.pa.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu-cs!lll-winken!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!WSL.DEC.COM!bothner

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu-cs!lll-winken!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!WSL.DEC.COM!bothner
From: bothner@WSL.DEC.COM
Newsgroups: gnu.utils.bug
Subject: Make 3.57 bug (empty rule)
Message-ID: <8912140017.AA20326@gilroy.pa.dec.com>
Date: 14 Dec 89 00:17:06 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40