From 4d97d9ce506f78d8d02217c2c85a4c136a1845f7 Mon Sep 17 00:00:00 2001 From: Andrew Stryker Date: Tue, 10 Oct 2023 19:50:24 -0700 Subject: [PATCH] Continue movement to making directories in recipes --- index.mk | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/index.mk b/index.mk index 7997b99..d872942 100644 --- a/index.mk +++ b/index.mk @@ -55,20 +55,20 @@ build_date_msg ?= This page was built on $$(date). # Define special files index_template ::= index.gmi.m4 -index ::= ${STG_SECTION}/index.gmi +index ::= ${STAGING_SECTION}/index.gmi header_template ::= header.gmi.m4 -header ::= ${WRK_SECTION}/header.gmi +header ::= ${WORKING_SECTION}/header.gmi footer_template ::= footer.gmi.m4 -footer ::= ${WRK_SECTION}/footer.gmi +footer ::= ${WORKING_SECTION}/footer.gmi # Capture all posts as Gemtext files that begin with an ISO formatted date posts_gmi ::= $(shell ls *.gmi | grep "[[:digit:]]\{4\}\(-[[:digit:]]\{2\}\)\{2\}") -posts ::= $(addprefix ${STG_SECTION}/, ${posts_gmi}) -entries ::= $(addprefix ${WRK_SECTION}/, ${posts_gmi:.gmi=.lnk}) +posts ::= $(addprefix ${STAGING_SECTION}/, ${posts_gmi}) +entries ::= $(addprefix ${WORKING_SECTION}/, ${posts_gmi:.gmi=.lnk}) -TAG_LIST ::= ${WRK_SECTION}/tag-list +TAG_LIST ::= ${WORKING_SECTION}/tag-list export TAG_LIST # Create list of potential dependencies of *.gmi.m4 templates @@ -122,21 +122,20 @@ help: #> Display this help message # #-----------------------------------------------------------------------------# -${WRK_SECTION} ${STG_SECTION}: %: - @mkdir -p $@ - @echo "\t✓ Created space: $@" - -${header} ${footer}: ${WRK_SECTION}/%: % ${WRK_SECTION} ${template_depends} +${header} ${footer}: ${WORKING_SECTION}/%: % ${template_depends} + @mkdir -p ${WORKING_SECTION} @m4 --include=${MAKO_DIR} $< > $@ @echo "\t✓ Created: $@" -${posts}: ${STG_SECTION}/%: % ${header} ${footer} ${STG_SECTION} +${posts}: ${STAGING_SECTION}/%: % ${header} ${footer} + @mkdir -p ${STAGING_SECTION} @cat ${header} $< ${footer} > $@ @echo "${build_date_msg}" >> $@ @echo "\t✓ Created $@" -${entries}: ${WRK_SECTION}/%.lnk: ${MAKO_DIR}/create-index-entry.awk %.gmi ${WRK_SECTION} - @awk -f $(notdir $^) > $@ +${entries}: ${WORKING_SECTION}/%.lnk: ${MAKO_DIR}/create-index-entry.awk %.gmi + @mkdir -p ${WORKING_SECTION} + @awk -f $^ > $@ @echo "\t✓ Created: $@" ${TAG_LIST}: ${entries}