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

Provide port-specific fetch of submodules #8070

Merged
merged 4 commits into from Jun 6, 2023

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jun 5, 2023

Fixes #8036.

  • Rename top-level make fetch-submodules and remove-submodules to fetch-all-submodules and remove-all-submodules.
  • In each ports/*, provide make fetch-port-submodules, which fetches only the submodules needed for that port.
  • make fetch-port-submodules does not require BOARD to be set, but most port-specific Makefiles assumed that BOARD would always be set. They did not anticipate non-board-specific make targets. Fix that, by fixing how bad or missing BOARD is handled, and by guarding various actions in Makefiles to not do things if BOARD is not specified. New variables available now include VALID_BOARD and ALL_PORT_BOARDS.
  • New script tools/fetch-submodules.sh. This could have been done solely in the makefiles, but it's less painful to use a shell script.

jepler
jepler previously approved these changes Jun 5, 2023
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine, didn't test. there's a low probability of folks invoking other targets in a port directory and not setting BOARD= but they can keep all the resulting pieces for themselves.

@dhalbert dhalbert requested a review from jepler June 6, 2023 00:45
@dhalbert
Copy link
Collaborator Author

dhalbert commented Jun 6, 2023

@jepler I found some bugs in the original intent of the PR -- I was so wrapped up in the other part I neglected to re-test. Tested again and make fetch-port-submodules now works.

py/circuitpy_defns.mk Outdated Show resolved Hide resolved
@dhalbert dhalbert requested a review from jepler June 6, 2023 15:06
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! again, didn't test.

@dhalbert dhalbert merged commit e631350 into adafruit:main Jun 6, 2023
421 checks passed
@dhalbert dhalbert deleted the port-specific-submodules branch June 6, 2023 18:46
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.

Fetch submodules lazily
2 participants