Makefile: setup: fix missing dependencies.#388
Makefile: setup: fix missing dependencies.#388casasnovas wants to merge 1 commit intoefabless:mainfrom
Conversation
The Makefile was using a "Match-Anything Pattern Rule" (see https://www.gnu.org/software/make/manual/html_node/Match_002dAnything-Rules.html) as a hand-wavy way of calling target rules into the caravel repository. Despite the fact this rule depends on 'check-caravel', there was no actual dependency on the caravel repository being fully cloned. Indeed, when the `install` rule was called (the one cloning caravel), the directory `caravel` is created as one of the first step, but actual checkouts of the files within that repository is delayed after full cloning and compression of the repository. As such, any rule dependending on the caravel Makefile could fail. In order to clean this up a little: - The ambiguous rule 'install' was renamed to 'install_caravel' - The "Match-Anything Pattern Rule" is removed in favour of a more explicit rule, still using pattern matching, and depending explicitly on `install_caravel`, enforcing the latter has finished before the former starts. The Makefile definitely would need a bit of love at this point though... so this is just temporary band-aid in the hope it'd be useful for the next person hitting this problem. Signed-off-by: Quentin Casasnovas <quentin.casasnovas@gmail.com>
|
@casasnovas Thanks for looking into this and working on a solution. The intention was for the user to be able to access the targets in the That being said, dependencies are not valid on to The default I think I'll change the Thanks again for the review. Please let me know if you find anything else or disagree with the above decisions. Incidentally, the PHONY targets for non files seem to generate an unneeded message. Adding a PHONY target for Makefile eliminates this. |
The Makefile was using a "Match-Anything Pattern Rule" (see https://www.gnu.org/software/make/manual/html_node/Match_002dAnything-Rules.html) as a hand-wavy way of calling target rules into the caravel repository.
Despite the fact this rule depends on 'check-caravel', there was no actual dependency on the caravel repository being fully cloned. Indeed, when the
installrule was called (the one cloning caravel), the directorycaravelis created as one of the first step, but actual checkouts of the files within that repository is delayed after full cloning and compression of the repository. As such, any rule dependending on the caravel Makefile could fail.In order to clean this up a little:
The ambiguous rule 'install' was renamed to 'install_caravel'
The "Match-Anything Pattern Rule" is removed in favour of a more explicit rule, still using pattern matching, and depending explicitly on
install_caravel, enforcing the latter has finished before the former starts.The Makefile definitely would need a bit of love at this point though... so this is just temporary band-aid in the hope it'd be useful for the next person hitting this problem.