From e25d52c293ae827d6e52fb0e7ad50d7fbdc678c0 Mon Sep 17 00:00:00 2001 From: icex2 Date: Thu, 2 Mar 2023 19:08:51 +0100 Subject: [PATCH] Makefile clang-format: Exclude import source files These should not be formatted because external sources with their own code style --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d33599..e29529a 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,12 @@ libc-version: $(V)mkdir -p $(BUILDDIR) $(V)echo "$(libcver)" > $(BUILDDIR)/libc-version +# Do not format external imports .PHONY: clang-format # Apply code style defined in .clang-format style to all code in src/ clang-format: - $(V)find src/ -iname *.h -o -iname *.c | xargs clang-format -i -style=file + $(V)find src/api -iname *.h -o -iname *.c | xargs clang-format -i -style=file + $(V)find src/main -iname *.h -o -iname *.c | xargs clang-format -i -style=file + $(V)find src/test -iname *.h -o -iname *.c | xargs clang-format -i -style=file .PHONY: package # Package the build output into distribution zip files package: $(BUILDDIR)/pumptools.zip $(BUILDDIR)/pumptools-public.zip