mirror of https://github.com/openXC7/prjxray.git
MAKEFILE - FORMAT - Trailing Whitespace
`make format` now additionally removes trailing whitespace. Also now ignores .bit files. Signed-off-by: Jake Mercer <jake.mercer@civica.co.uk>
This commit is contained in:
parent
b243db2d05
commit
e2e2d41405
9
Makefile
9
Makefile
|
|
@ -58,7 +58,7 @@ test-cpp:
|
|||
|
||||
# Auto formatting of code.
|
||||
# ------------------------
|
||||
FORMAT_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*')
|
||||
FORMAT_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*') -and -not -name *.bit
|
||||
|
||||
CLANG_FORMAT ?= clang-format-5.0
|
||||
format-cpp:
|
||||
|
|
@ -76,10 +76,13 @@ TCL_FORMAT ?= utils//tcl-reformat.sh
|
|||
format-tcl:
|
||||
find . -name \*.tcl $(FORMAT_EXCLUDE) -print0 | xargs -0 -P $$(nproc) -n 1 $(TCL_FORMAT)
|
||||
|
||||
format: format-cpp format-docs format-py format-tcl
|
||||
format-trailing-ws:
|
||||
find . -type f $(FORMAT_EXCLUDE) | xargs sed -i 's@\s\+$$@@g'
|
||||
|
||||
format: format-cpp format-docs format-py format-tcl format-trailing-ws
|
||||
@true
|
||||
|
||||
.PHONY: format format-cpp format-py format-tcl
|
||||
.PHONY: format format-cpp format-py format-tcl format-trailing-ws
|
||||
|
||||
# Targets related to Project X-Ray databases
|
||||
# ------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue