-
-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
Remove build option firmware size impacts #6947
Merged
drashna
merged 7 commits into
qmk:master
from
amberstarlight:firmware-size-impacts-removal
Oct 19, 2019
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b7c22af
Update rules.mk template to remove build option size impacts
amberstarlight 3372a9e
Add rules.mk cleaning script
amberstarlight 7cfe709
Update all rules.mk files to remove build option firmware size impact…
amberstarlight 213041b
Remove references to feature filesize in documentation
amberstarlight 4a9380d
Revert "Update all rules.mk files to remove build option firmware siz…
amberstarlight 92a70c1
Fix regex in cleanup script and exclude keymaps/ directories
amberstarlight 12a3c80
Update quantum/template/avr/rules.mk
amberstarlight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# This script finds all rules.mk files in keyboards/ subdirectories, | ||
# and deletes the build option filesize impacts from them. | ||
|
||
# Print an error message with the word "ERROR" in red. | ||
echo_error() { | ||
echo -e "[\033[0;91mERROR\033[m]: $1" | ||
} | ||
|
||
# If we've been started from util/, we want to be in qmk_firmware/ | ||
[[ "$PWD" == *util ]] && cd .. | ||
|
||
# The root qmk_firmware/ directory should have a subdirectory called quantum/ | ||
if [ ! -d "quantum" ]; then | ||
echo_error "Could not detect the QMK firmware directory!" | ||
echo_error "Are you sure you're in the right place?" | ||
exit 1 | ||
fi | ||
|
||
# Set the inplace editing parameter for sed. | ||
# macOS/BSD sed expects a file extension immediately following -i. | ||
set_sed_i() { | ||
sed_i=(-i) | ||
|
||
case $(uname -a) in | ||
*Darwin*) sed_i=(-i "") | ||
esac | ||
} | ||
set_sed_i | ||
|
||
# Exclude keyamps/ directories | ||
files=$(find keyboards -type f -name 'rules.mk' -not \( -path '*/keymaps*' -prune \)) | ||
|
||
# Edit rules.mk files | ||
for file in $files; do | ||
sed "${sed_i[@]}" -e "s/(+[0-9].*)$//g" "$file" | ||
done | ||
|
||
echo "Cleaned up rules.mk files." |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we've been trying to move to a python based CLI system, and ideally, this should be added to the qmk cli code, if possible.
https://docs.qmk.fm/#/cli_development
If you don't think you can do that, that's fine, no worries. But if you're able to, awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not au fait with Python, so I'd have to take a look at this in the future after some learning.