mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Makefile: target checks for macOS
recode is missing on macOS by default. grep on macOS is BSD grep by default.
This commit is contained in:
parent
82d99522b4
commit
0733310300
1 changed files with 7 additions and 0 deletions
7
Makefile
7
Makefile
|
@ -210,13 +210,20 @@ style:
|
||||||
|
|
||||||
# Detecting weird codepages and tabs.
|
# Detecting weird codepages and tabs.
|
||||||
checks:
|
checks:
|
||||||
|
# Make sure recode is installed
|
||||||
|
@which recode >/dev/null || ( echo "Please install 'recode' package first" ; exit 1 )
|
||||||
@echo "Files with suspicious chars:"
|
@echo "Files with suspicious chars:"
|
||||||
@find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" -or -name "*.v" \) \
|
@find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" -or -name "*.v" \) \
|
||||||
-exec sh -c "cat {} |recode utf8.. >/dev/null || echo {}" \;
|
-exec sh -c "cat {} |recode utf8.. >/dev/null || echo {}" \;
|
||||||
@echo "Files with tabs:"
|
@echo "Files with tabs:"
|
||||||
# to remove tabs within lines, one can try with: vi $file -c ':set tabstop=4' -c ':set et|retab' -c ':wq'
|
# to remove tabs within lines, one can try with: vi $file -c ':set tabstop=4' -c ':set et|retab' -c ':wq'
|
||||||
|
ifeq ($(platform),Darwin)
|
||||||
|
@find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \
|
||||||
|
-exec egrep -l '\t' {} \;
|
||||||
|
else
|
||||||
@find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \
|
@find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \
|
||||||
-exec grep -lP '\t' {} \;
|
-exec grep -lP '\t' {} \;
|
||||||
|
endif
|
||||||
# @echo "Files with printf \\\\t:"
|
# @echo "Files with printf \\\\t:"
|
||||||
# @find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \
|
# @find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \
|
||||||
# -exec grep -lP '\\t' {} \;
|
# -exec grep -lP '\\t' {} \;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue