-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
makefile.gen mistakenly thinks all my objects are up-to-date #354
Comments
I think this is a problem with the Docker build script as it works as expected when used natively on Windows. And actually this fixed the dependencies: before that modifying a .h file didn't rebuilt any files, now each C file including that header is properly rebuilt. |
I finally found the root cause. What I failed to notice originally was the target make said was up-to-date:
That's not my ROM... When you type "make" without specifying a target, it builds the first target in the makefile. However, the first target isn't what you'd think. This is because of this code in makefile.gen:
The included deps files define targets. So the first target is the thing in the first deps file, which is based on the first object in The next targets are those explicitly defined in the makefile: By convention, So, if you are in the habit of typing "make all", you wouldn't run into this bug. (Incidentally, the Dockerfile entrypoint by default doesn't specify a target, but you can pass one as an argument.) The solution is simply to move |
The DEPS support added in 8b07ad7 accidentally broke the default makefile target by including deps above the `all`, `default`, or `release` targets. Previously, the default (first) target had been `release`. This moves `all` and `default` to the top, both of which depend on `release`. Fixes Stephane-D#354
Oh yeah that's true, the deps file define targets, and then they become the default target. Thanks for pointing it out ! |
Happy to help! Thanks for making an amazing tool! |
When I build, then change a source, then rebuild, nothing happens. I'm using the docker image with the
:latest
tag on Linux.I went through recent changes and tested before and after 8b07ad7 ("re-introduced deps"). That is definitely the point at which the regression was introduced. If I build the docker image from the commit just before this, it all works correctly.
For a more concrete example, I have
src/main.c
, which doesn't get rebuilt when I change it.out/src/main.d
contains:I can't spot the problem. Could you please take a look? Maybe even consider reverting the change while you investigate, since the
:latest
docker tag is currently broken? Or giving a named tag to an older build, maybe something like:stable
?Thanks!
The text was updated successfully, but these errors were encountered: