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.
This commit is contained in:
Andrew Stryker 2023-10-10 18:32:25 -07:00
parent 95c875b2b6
commit 9aeee46e42

View File

@ -132,17 +132,13 @@ help: #> Display this help message
#
#-----------------------------------------------------------------------------#
# Isolating the directory making logic here so that we are not repeatedly
# building directories and changing timestamps--let's have Make deal with this
${WORKING} ${STAGING}: %:
@mkdir -p $@
@echo "\t✓ Created $@"
${banner}: ${banner_template} ${WORKING}
${banner}: ${banner_template}
@mkdir -p ${WORKING}
@m4 --include=${MAKO_DIR} $< > $@
@echo "\t✓ Generated site banner"
${site_index}: ${site_index_template} ${STAGING} ${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} $< > $@
@echo ${BUILD_DATE_MSG} >> $@
@echo "\t✓ Generated site index file"
@ -158,7 +154,7 @@ ${index_dirs}: %:
@echo
@echo "Entering section: $@"
@echo
@#cd ${CONTENT}/$@ && ${MAKE} -f ${index_make} build
@cd ${CONTENT}/$@ && ${MAKE} -f ${index_make} build
@echo "✓ Completed $@ section"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#