Makefile anatomy #1
Replies: 3 comments 3 replies
-
The default action, if .DEFAULT_GOAL := check The three auto-generated files assembled by the CoRIM builder (i.e., CORIM_DIR := ietf-corim-cddl
CORIM_DEPS := $(foreach ca,corim comid xcorim,$(CORIM_DIR)/$(ca)-autogen.cddl) The needed tools (i.e., include $(CORIM_DIR)/tools.mk The include $(CORIM_DIR)/funcs.mk Here we tell $(CORIM_DEPS): ; $(MAKE) -C $(CORIM_DIR) We declare the check:: check-spdm Here we accumulate into the SPDM_FRAGS := spdm-toc.cddl
SPDM_FRAGS += ce-code-points.cddl
SPDM_FRAGS += comid-extensions.cddl
SPDM_FRAGS += comid-extn-code-points.cddl
SPDM_FRAGS += concise-evidence.cddl
SPDM_FRAGS += toc-code-points.cddl
SPDM_FRAGS += $(CORIM_DEPS) Then we declare which examples we want to automatically check against the spec. Note thought that the generated rule is not used at the moment because the CDDL doesn't validate yet. We'll append it to the SPDM_EXAMPLES := $(wildcard examples/spdm-*.diag) This is where all the "check" rules are synthesised by invoking the $(eval $(call cddl_check_template,spdm,$(SPDM_FRAGS),$(SPDM_EXAMPLES))) This is the rule that cleans up the mess in the current folder: clean: ; $(RM) $(CLEANFILES) This is the rule that cleans up the mess in the current folder as well as in the CoRIM sub folder: clean-extra: clean ; $(MAKE) -C $(CORIM_DIR) clean |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Makefile requires multiple targets for testing comid extensions separately from concise-evidence. These were added and examples based on the core schema execute cleanly. however, anything involving an extension point doesn't seem to be recognized. |
Beta Was this translation helpful? Give feedback.
-
It would help me if there were more comments in the makefile explaining what each statement accomplishes. Much of it is sorta obvious but looking for confirmation that I understand it.
Beta Was this translation helpful? Give feedback.
All reactions