Compare commits

...

3 Commits

Author SHA1 Message Date
9aeee46e42 Remove directory creation as a recipe
Using directory modification times is fraught with peril. Since all we
need is to ensure that the directory is there, call `mkdir -p` prior to
writing a file.
2023-10-10 18:32:25 -07:00
95c875b2b6 Add a space for clarity 2023-10-10 15:26:51 -07:00
994a9ea35b Delete extra blank line 2023-10-10 08:53:38 -07:00
2 changed files with 12 additions and 19 deletions

View File

@ -33,12 +33,12 @@ include ${env_make}
# build lists of content directories # build lists of content directories
# TODO: do we need the quoted variables? # TODO: do we need the quoted variables?
curate ?= about stuff CURATE ?= about stuff
curate_dirs ::= $(addprefix ${CONTENT}/, ${curate}) curate_dirs ::= $(addprefix ${CONTENT}/, ${CURATE})
#curate_quoted ::= $(shell echo ${curate} | sed -e "s/ /, /g") #curate_quoted ::= $(shell echo ${curate} | sed -e "s/ /, /g")
index ?= posts staff INDEX ?= posts staff
index_dirs ::= $(addprefix ${CONTENT}/, ${index}) index_dirs ::= $(addprefix ${CONTENT}/, ${INDEX})
#index_quoted ::= $(shell echo ${index} | sed -e "s/ /, /g") #index_quoted ::= $(shell echo ${index} | sed -e "s/ /, /g")
# files that this file builds directly # files that this file builds directly
@ -109,7 +109,7 @@ show: #> Display key variables
@echo "Build message: ${BUILD_DATE_MSG}" @echo "Build message: ${BUILD_DATE_MSG}"
@${MAKE} -f ${env_make} @${MAKE} -f ${env_make}
@echo @echo
@#${MAKE} -f ${curate.mk} show @${MAKE} -f ${curate_make} show
@echo @echo
@#${MAKE} -f ${index_make} show @#${MAKE} -f ${index_make} show
@#echo @#echo
@ -132,35 +132,29 @@ help: #> Display this help message
# #
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# Isolating the directory making logic here so that we are not repeatedly ${banner}: ${banner_template}
# building directories and changing timestamps--let's have Make deal with this @mkdir -p ${WORKING}
${WORKING} ${STAGING}: %:
@mkdir -p $@
@echo "\t✓Created $@"
${banner}: ${banner_template} ${WORKING}
@m4 --include=${MAKO_DIR} $< > $@ @m4 --include=${MAKO_DIR} $< > $@
@echo "\t✓ Generated site banner" @echo "\t✓ Generated site banner"
${site_index}: ${site_index_template} ${banner} ${curate_dirs} ${index_dirs} ${site_index}: ${site_index_template} ${banner} ${curate_dirs} ${index_dirs}
@mkdir -p ${STAGING}
@m4 --include=${MAKO_DIR} --define=WORKING=${WORKING} $< > $@ @m4 --include=${MAKO_DIR} --define=WORKING=${WORKING} $< > $@
@echo ${BUILD_DATE_MSG} >> $@ @echo ${BUILD_DATE_MSG} >> $@
@echo "\t✓ Generated site index file" @echo "\t✓ Generated site index file"
${curate_dirs}: %: ${WORKING} ${STAGING} ${curate_dirs}: %:
@echo @echo
@echo "Entering section: $@" @echo "Entering section: $@"
@echo @echo
@mkdir -p ${WORKING}/$@ ${STAGING}/$@ @${MAKE} -C $@ -f ${CURATE_MAKE} build
@cd $@ && ${MAKE} -f ${CURATE_MAKE} build
@echo "✓ Completed $@ section" @echo "✓ Completed $@ section"
${index_dirs}: %: ${WORKING} ${STAGING} ${index_dirs}: %:
@echo @echo
@echo "Entering section: $@" @echo "Entering section: $@"
@echo @echo
@mkdir -p ${WORKING}/$@ ${STAGING}/$@ @cd ${CONTENT}/$@ && ${MAKE} -f ${index_make} build
@#cd ${CONTENT}/$@ && ${MAKE} -f ${index_make} build
@echo "✓ Completed $@ section" @echo "✓ Completed $@ section"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-# #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#

View File

@ -71,7 +71,6 @@ build: ${gemtext_copied} ${templates_expanded}
@echo "✓ Completed processing ${section}" @echo "✓ Completed processing ${section}"
@echo @echo
show: #> Show enironment variables with values show: #> Show enironment variables with values
@echo "Key variables defined in ${self}:" @echo "Key variables defined in ${self}:"
@echo @echo