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

Make build/filesystem.bin and build/initfs.tag targets .PHONY #961

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@ids1024
Member

ids1024 commented Jun 10, 2017

This needs to be run to check for updates in the cookbook.

A more ideal solution would only rebuild these files if the cookbook updated a package; I don't know how best to implement that though.

Make build/filesystem.bin and build/initfs.tag targets .PHONY
This needs to be run to check for updates in the cookbook.
@jackpot51

This comment has been minimized.

Member

jackpot51 commented Jun 10, 2017

I would prefer a rebuild target that removes those two files, and then runs make

@ids1024

This comment has been minimized.

Member

ids1024 commented Jun 10, 2017

I don't know; it seems rather unintuitive if make ignores changes to userspace code.

@jackpot51

This comment has been minimized.

Member

jackpot51 commented Jun 10, 2017

You could add FORCE to the prerequisites of build/initfs.tag and build/filesystem.bin

Phony is for targets that are not files

@ids1024

This comment has been minimized.

Member

ids1024 commented Jun 10, 2017

I know that's the primary use of .PHONY, but it seems appropriate here.

I haven't heard of FORCE, but the GNU make manual says this about it (https://www.gnu.org/software/make/manual/html_node/Force-Targets.html):

Using ‘.PHONY’ is more explicit and more efficient. However, other versions of make do not support ‘.PHONY’; thus ‘FORCE’ appears in many makefiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment