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

Makefile: setup: fix missing dependencies. #388

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

Conversation

casasnovas
Copy link

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.

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 <[email protected]>
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.

1 participant