Skip to content

Commit

Permalink
Explain $(@d) make alias usage in usnistgov#116
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aj-stein-nist committed Oct 27, 2023
1 parent cc51eb9 commit 83bac10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 83bac10

Please sign in to comment.