diff --git a/Makefile b/Makefile index c0e019c2f..1c8b67ab9 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ endif # Define executables PYTHON_EXEC ?= python3 CLANG_FORMAT_EXEC ?= clang-format-10 +XML_FORMAT_EXEC ?= xmllint # Put it first so that "make" without argument is like "make help". export COMMENT_EXTRACT @@ -75,6 +76,13 @@ format-cpp: ${CLANG_FORMAT_EXEC} --style=file -i $${f} || exit 1; \ done +format-xml: +# Format all the XML files under this project, excluding submodules + for f in `find openfpga_flow/vpr_arch openfpga_flow/openfpga_arch -iname *.xml`; \ + do \ + ${XML_FORMAT_EXEC} --format $${f} || exit 1; \ + done + clean: # Remove current build results rm -rf ${BUILD_DIR} yosys/install