bothner@WSL.DEC.COM (12/14/89)
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