]> git.ipfire.org Git - thirdparty/make.git/commit
Don't add a target to its own also_make list
authorPaul Smith <psmith@gnu.org>
Sun, 4 Aug 2024 21:13:07 +0000 (17:13 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 4 Aug 2024 21:13:07 +0000 (17:13 -0400)
commit6970561de07e071b85f0681062756f316eead29b
tree216157bd395fcb4a372f5585ddac2522f518c043
parentf0db5e321faf654df6f21e54b5b0ed509e18340c
Don't add a target to its own also_make list

* src/dep.h (copy_dep): Make a copy of one struct dep.
* src/misc.c (copy_dep): Implement the new function.
(copy_dep_chain): Call copy_dep() for each dep in the chain.
* src/read.c (record_files): Write our own copy loop and omit the
current file from its own also_make list.  Since we don't keep
the function's also_make, free it.
src/dep.h
src/misc.c
src/read.c