chore: clean up makefiles a bit
parent
d2afb98268
commit
9c387937ef
14
Makefile
14
Makefile
|
@ -106,10 +106,14 @@ $(BUILD_DIR)/$(TEST_DIR)/%.c.o: $(TEST_DIR)/%.c
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
clang-format -n --Werror $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL)
|
clang-format -n --Werror $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL)
|
||||||
|
make -C lsm lint
|
||||||
|
make -C landerctl lint
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL)
|
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL)
|
||||||
|
make -C lsm fmt
|
||||||
|
make -C landerctl fmt
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check:
|
check:
|
||||||
|
@ -117,21 +121,21 @@ check:
|
||||||
cppcheck \
|
cppcheck \
|
||||||
$(addprefix -I,$(INC_DIRS)) \
|
$(addprefix -I,$(INC_DIRS)) \
|
||||||
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
||||||
--project=compile_commands.json \
|
|
||||||
--error-exitcode=1 \
|
--error-exitcode=1 \
|
||||||
--enable=warning,style \
|
--enable=warning,style \
|
||||||
-ithirdparty/* \
|
|
||||||
-itrie/* \
|
|
||||||
--inline-suppr \
|
--inline-suppr \
|
||||||
--check-level=exhaustive \
|
--check-level=exhaustive \
|
||||||
--quiet \
|
--quiet \
|
||||||
-j$(shell nproc)
|
-j$(shell nproc) \
|
||||||
|
$(SRCS)
|
||||||
|
make -C lsm check
|
||||||
|
make -C landerctl check
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR)
|
rm -rf $(BUILD_DIR)
|
||||||
$(MAKE) -C lsm clean
|
$(MAKE) -C lsm clean
|
||||||
|
$(MAKE) -C landerctl clean
|
||||||
|
|
||||||
.PHONY: bear
|
.PHONY: bear
|
||||||
bear: clean
|
bear: clean
|
||||||
|
|
|
@ -98,13 +98,13 @@ check:
|
||||||
cppcheck \
|
cppcheck \
|
||||||
$(addprefix -I,$(INC_DIRS)) \
|
$(addprefix -I,$(INC_DIRS)) \
|
||||||
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
||||||
--project=compile_commands.json \
|
|
||||||
--error-exitcode=1 \
|
--error-exitcode=1 \
|
||||||
--enable=warning,style \
|
--enable=warning,style \
|
||||||
--inline-suppr \
|
--inline-suppr \
|
||||||
--check-level=exhaustive \
|
--check-level=exhaustive \
|
||||||
--quiet \
|
--quiet \
|
||||||
-j$(shell nproc)
|
-j$(shell nproc) \
|
||||||
|
$(SRCS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
14
lsm/Makefile
14
lsm/Makefile
|
@ -97,6 +97,20 @@ lint:
|
||||||
fmt:
|
fmt:
|
||||||
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL) $(SRCS_EXAMPLE)
|
clang-format -i $(SRCS) $(SRCS_H) $(SRCS_H_INTERNAL) $(SRCS_EXAMPLE)
|
||||||
|
|
||||||
|
.PHONY: check
|
||||||
|
check:
|
||||||
|
mkdir -p $(BUILD_DIR)/cppcheck
|
||||||
|
cppcheck \
|
||||||
|
$(addprefix -I,$(INC_DIRS)) \
|
||||||
|
--cppcheck-build-dir=$(BUILD_DIR)/cppcheck \
|
||||||
|
--error-exitcode=1 \
|
||||||
|
--enable=warning,style \
|
||||||
|
--inline-suppr \
|
||||||
|
--check-level=exhaustive \
|
||||||
|
--quiet \
|
||||||
|
-j$(shell nproc) \
|
||||||
|
$(SRCS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR)
|
rm -rf $(BUILD_DIR)
|
||||||
|
|
Loading…
Reference in New Issue