Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow incremental rebuilds #1113

Merged
merged 1 commit into from
Aug 16, 2023
Merged

build: allow incremental rebuilds #1113

merged 1 commit into from
Aug 16, 2023

Conversation

rnpnr
Copy link
Collaborator

@rnpnr rnpnr commented Jul 29, 2023

Its been annoying me for a while that every time I change a single source
file I have to rebuild all of them. Now we rebuild only the files that
were touched.

This should also make the ci marginally faster since the files can be
built in parallel.

@rnpnr rnpnr force-pushed the makefile branch 2 times, most recently from b4b9e4d to 583ee82 Compare July 29, 2023 17:45
@TwoF1nger
Copy link

This doesn't detect changes in header files (both Vis own, and system ones).
You might want to use the -MD or -MMD gcc options.

I have a similar commit it in my fork - build: incremental compilation

@rnpnr
Copy link
Collaborator Author

rnpnr commented Jul 31, 2023

I guess I never really bother tracking headers. I'm not really against
it though. What do other people think? I've added it as a second commit
for now.

@mcepl
Copy link
Contributor

mcepl commented Aug 1, 2023

PR has been merged to https://git.sr.ht/~mcepl/vis and although only the Makefile part is relevant (and I have also added https://git.sr.ht/~mcepl/vis/commit/25fe086eb427 for build.sr.ht), it seems to be building and working just fine.

@rnpnr rnpnr merged commit 4360440 into martanne:master Aug 16, 2023
24 checks passed
@rnpnr rnpnr deleted the makefile branch August 16, 2023 15:19
@erf
Copy link
Contributor

erf commented Aug 17, 2023

I think it happened after this commit that a bunch of .d and .o files are generated on make. Is it possible to avoid this as it clutters up the directory?

@rnpnr
Copy link
Collaborator Author

rnpnr commented Aug 17, 2023

Is it possible to avoid this as it clutters up the directory?

Yes you are right, fixed here: 4ca7119.

@rnpnr
Copy link
Collaborator Author

rnpnr commented Aug 17, 2023

fixed here: 4ca7119.

Oh oops I guess | in make rules is a GNU extension so I broke building
on Open/FreeBSD (macOS uses GNU make). I will have to do a separate fix
for that.

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

Successfully merging this pull request may close these issues.

4 participants