nelhage / reptyr

Reparent a running program to a new terminal
MIT License
5.8k stars 215 forks source link

Fix faults in Make builds #115

Closed theosotr closed 4 years ago

theosotr commented 4 years ago

Hello

This pull request improves the build script of this project. Specifically, it adds missing Make dependencies so that the targets of the project are re-generated correctly whenever there are updates to any of the dependent source files. For example, the object file reallocarray.o was not dependent on reallocarray.h even though it should have been.

In this way, the project is incrementally built and we no longer sacrifice time in clean builds (i.e., builds after a make clean).

Note that this fix follows the best practices for tracking dependencies automatically (through gcc -MD)

For more details, see here. https://www.gnu.org/software/make/manual/html_node/Automatic-Prerequisites.html