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

Add ability to dump all makefile variables for the specified target. #8256

Merged
merged 1 commit into from
Aug 15, 2020

Conversation

tzarc
Copy link
Member

@tzarc tzarc commented Feb 27, 2020

Description

Adds a new subtarget to builds, dump_vars, which allows for printing out all the variables that make knows about, after all substitutions occur.

Example: make handwired/onekey/proton_c:default:dump_vars

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@tzarc tzarc requested a review from a team February 27, 2020 10:22
@tzarc tzarc mentioned this pull request Feb 28, 2020
13 tasks
@drashna
Copy link
Member

drashna commented Mar 1, 2020

I'm assuming that this for more than the makefile stuff, but for system stuff too?

@drashna drashna added the core label Mar 1, 2020
@tzarc
Copy link
Member Author

tzarc commented Mar 1, 2020

Well it enables printing all the variables after all substitutions have been made.
In the case of qmk_compiler, it was complaining that things like the F4xx on the Noah and any parts with the flash size suffix were unknown, beacuse the supported MCUs were explicitly whitelisted in the compiler work.

This, at least, allows for invoking the command in the description to get the post-resolved value.

% make wete:default:dump_vars | grep MCU=
MCU=cortex-m0
% make matrix/noah:default:dump_vars | grep MCU=
MCU=cortex-m4

Those values are already whitelisted.
If you look at their respective rules.mk file, they've got the original MCU=.... lines as they've not yet been transformed by mcu_selection.mk.

@zvecr
Copy link
Member

zvecr commented May 3, 2020

Getting some issues on some avr targets,

$ make handwired/onekey/promicro:default:dump_vars | grep ^BOOTLOADER=
BOOTLOADER=caterina
tmk_core/rules.mk:394: *** Makefile  option cannot be blank. Stop.
make: *** [Makefile:579: handwired/onekey/promicro:default:dump_vars] Error 1

@stale
Copy link

stale bot commented Jun 17, 2020

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@Erovia
Copy link
Member

Erovia commented Jul 3, 2020

Works with AVR boards if the following options are passed:

make handwired/onekey/promicro:default:dump_vars ERROR_IF_EMPTY="" ERROR_IF_NONBOOL="" ERROR_IF_UNSET=""

@tzarc tzarc changed the base branch from master to develop August 12, 2020 20:48
@tzarc
Copy link
Member Author

tzarc commented Aug 12, 2020

Fixed up for the failing AVR's. Now working when doing make all:default:dump_vars for all boards.

@tzarc tzarc removed the on hold label Aug 12, 2020
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

__attribute__ ((weak)) ✔️

@noroadsleft noroadsleft merged commit 5cb57c7 into qmk:develop Aug 15, 2020
@noroadsleft
Copy link
Member

Thanks!

nicocesar pushed a commit to nicocesar/qmk_firmware that referenced this pull request Sep 6, 2020
@tzarc tzarc deleted the add-dump_vars branch September 10, 2020 02:28
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Sep 30, 2020
kjganz pushed a commit to kjganz/qmk_firmware that referenced this pull request Oct 28, 2020
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants