From 83bac10703926457b5c439b423ff887296232881 Mon Sep 17 00:00:00 2001 From: "A.J. Stein" Date: Thu, 12 Oct 2023 01:15:12 -0400 Subject: [PATCH] Explain `$(@D)` make alias usage in #116 Per PR review with Nikita, cite documentation for `make` and `Makefile` on how `$(@D)` is an alias to show to the the target wildcard file without the filename, useful for creating nested directories of content before copying. --- build/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/Makefile b/build/Makefile index 42404058..6c64876f 100644 --- a/build/Makefile +++ b/build/Makefile @@ -73,6 +73,9 @@ artifacts: copy-readmes copy-xml-content resolve-xml-profiles convert-min-json-c copy-readmes: $(GEN_READMES) ## Copy README files to release location $(GEN_CONTENT_DIR)/%.md: $(SRC_DIR)/%.md + # $(@D): The directory part of the file name of the target, with the + # trailing slash removed. + # https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html @mkdir -p $(@D) @cp $(SRC_DIR)/$*.md $(GEN_CONTENT_DIR)/$*.md