2023-09-20 12:05:31 -04:00
|
|
|
|
|
|
|
#tagged_index_template ?= tagged-index.gmi.m4
|
|
|
|
|
|
|
|
# support indexing
|
|
|
|
|
|
|
|
|
|
|
|
#tags = $(shell cut --delimiter ' ' --fields 3 ${tag_list} | sort)
|
|
|
|
#tagged_indicies = $(addprefix ${STAGING}/, $(addsuffix .gmi, ${tags}))
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
#
|
|
|
|
# User interface
|
|
|
|
#
|
|
|
|
#> This makefile supports the following targets:
|
|
|
|
#>
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
|
|
|
|
.PHONY: default build clean show help
|
|
|
|
|
|
|
|
# define the default target explicitly
|
|
|
|
default: build
|
|
|
|
|
2023-09-20 12:06:49 -04:00
|
|
|
build: #> Build the site (default)
|
2023-09-20 12:05:31 -04:00
|
|
|
@echo "✗ Building tagged index files not yet supported."
|
|
|
|
@echo
|
|
|
|
|
|
|
|
show: #> Show enironment variables with values
|
|
|
|
@echo "✗ Showing variables not yet supported."
|
|
|
|
@echo
|
|
|
|
|
|
|
|
clean: #> Delete generated files
|
|
|
|
@echo "✗ Cleaning tagged index files not yet supports."
|
|
|
|
@echo
|
|
|
|
|
|
|
|
help: #> Display this help message
|
|
|
|
@awk -f ${AWKHELP} ${self}
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
#
|
|
|
|
# File system interface
|
|
|
|
#
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
|
|
|
|
#${tagged_indicies}: ${STAGING}/%.gmi: tag-index-template.gmi.m4 ${tag_list}
|
|
|
|
# @m4 --include=.. \
|
|
|
|
# --define=TAG=% \
|
|
|
|
# --define=ENTRIES=${entries} \
|
|
|
|
# --define=HEADER=${header} \
|
|
|
|
# --define=FOOTER=${footer} \
|
|
|
|
# tag-index-template.gmi.m4 $< > $@
|
|
|
|
# @echo ✓ Created index $@
|
|
|
|
|
|
|
|
# generate the index entries across all posts
|
|
|
|
#${index_entries}: ${tag_list}
|
|
|
|
# @grep "^---" $^ | cut --delimiter=' ' --fields=2 | sort --reverse --key=3 > $@
|
|
|
|
# @echo ✓ Created $@
|