Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Fix faults in Make builds #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix faults in Make builds #34

wants to merge 1 commit into from

Conversation

theosotr
Copy link

@theosotr theosotr commented Jan 1, 2020

Hello

This pull request fixes 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.

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

@rouben
Copy link
Collaborator

rouben commented Mar 30, 2020

I like this in principle, however, is this dependent on gcc? For example, one supported compiler for this make file is tcc (Tiny C Compiler?). Has anyone tested it with tcc?

@theosotr
Copy link
Author

The -MD option is supported by tcc.

@Barracuda72
Copy link

CLang also supports it:
https://clang.llvm.org/docs/ClangCommandLineReference.html#dependency-file-generation

@rouben
Copy link
Collaborator

rouben commented Mar 31, 2020

Yeah, I've been testing with with tcc and clang, both work. The build fails with tcc, but that's an issue unrelated to this change.
Given that this will fork the project from upstream, I'd like @Wind4 to weigh in as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants