aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-04-17 23:59:22 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:16:34 +0200
commit9ffe5da010790ca8751e132841352c9543d06c5c (patch)
tree5671a4862f535e7d19416b48af334b121dfa5408 /Makefile
parent43d2363b0bf16df6932db54fff28089207f8e2b4 (diff)
check formatting in make script
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
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