diff options
| author | Fuwn <[email protected]> | 2022-12-27 23:45:48 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-12-27 23:45:48 +0000 |
| commit | 4ce89095ec8e67fb56d8248063059fed53f7a433 (patch) | |
| tree | 0e9461fa29ab5073cb2900b38ae38c5d76d02d8c | |
| parent | ci(docker): make image significantly smaller (diff) | |
| download | maple-4ce89095ec8e67fb56d8248063059fed53f7a433.tar.xz maple-4ce89095ec8e67fb56d8248063059fed53f7a433.zip | |
build(build.ninja): add formatting task
| -rw-r--r-- | build.ninja | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build.ninja b/build.ninja index 56ac2fe..3d31c08 100644 --- a/build.ninja +++ b/build.ninja @@ -11,10 +11,16 @@ rule compile rule link command = $cc $ldflags $in -o $out +rule clang_format + command = clang-format -i -style=LLVM $src_dir/*$cc_ext $src_dir/*.hh + build $out_dir/$name.o: compile $src_dir/$name.cc build $out_dir/gemini.o: compile $src_dir/gemini.cc build $out_dir/titan.o: compile $src_dir/titan.cc build $out_dir/$name: link $out_dir/$name.o $out_dir/gemini.o $out_dir/titan.o +build _format: clang_format +build format: phony _format + default $out_dir/$name |