🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by bothner Thu, 14 Dec 1989 00:17
Make 3.57 bug (empty rule)
#1672
Author: 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
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