From 9ffe5da010790ca8751e132841352c9543d06c5c Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Wed, 17 Apr 2024 23:59:22 +0200 Subject: check formatting in make script --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5c2af44..9f48c8a 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ $(BUILD)/_%.o : %.s | $(BUILD) # install xbuild first. (cargo install xbuild) # Compile the rust part: note that the the cargo crate is of type [staticlib], if you don't # define this, the linker will have troubles, especially when we use a "no_std" build -rust_kernel: +rust_kernel: check cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAGS) # need nasm @@ -72,6 +72,11 @@ startup.o: boot/startup-$(ARCH).s | $(BUILD) $(BUILD): @mkdir -p $@ +.PHONY: check +check: + @echo "---CHECKING FORMATTING---" + @cargo fmt --all -- --check -l + clean: cargo clean rm -f bootdisk.iso -- cgit v1.2.3-70-g09d2