[script] developing xml formatting command

This commit is contained in:
tangxifan 2022-10-07 10:16:00 -07:00
parent 4d4ab60fe4
commit 6c12e8dc24
1 changed files with 8 additions and 0 deletions

View File

@ -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