Complete the macro approach to defining variables
This commit is contained in:
parent
1dfeffeb0f
commit
768280a135
@ -34,8 +34,10 @@ ifndef ENV_LOADED
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#$(info $(value MAKE_SECTION_VARS))
|
||||||
|
|
||||||
# Compute definitions for the section, working, and staging directories
|
# Compute definitions for the section, working, and staging directories
|
||||||
$(eval $(call SECTION_DIRS))
|
$(eval ${MAKE_SECTION_VARS})
|
||||||
|
|
||||||
# Gather file lists
|
# Gather file lists
|
||||||
templates ::= $(wildcard *.gmi.m4)
|
templates ::= $(wildcard *.gmi.m4)
|
||||||
@ -68,7 +70,6 @@ create: #> Create a new post (default)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
build: ${gemtext_copied} ${templates_expanded}
|
build: ${gemtext_copied} ${templates_expanded}
|
||||||
@echo "Makeflags .................... '$${MAKEFLAGS}'"
|
|
||||||
@echo "✓ Completed processing ${section}"
|
@echo "✓ Completed processing ${section}"
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
@ -72,15 +72,23 @@ export STAGING
|
|||||||
# assume the values appropriate for the current section. This approach defines
|
# assume the values appropriate for the current section. This approach defines
|
||||||
# a macro that we can call when we recurse into each section
|
# a macro that we can call when we recurse into each section
|
||||||
#
|
#
|
||||||
# TODO: not call to the shell repeatedly
|
# TODO: Is it possible to simplify this?
|
||||||
define SECTION_DIRS
|
define MAKE_SECTION_WORKING
|
||||||
section = $$(shell basename $${CURDIR})
|
working_section ::= ${WORKING}/$$(value $${1})
|
||||||
#working_section ::= ${WORKING}/$${section}
|
|
||||||
#staging_section = ${STAGING}/$$(value section)
|
|
||||||
working_section = ${WORKING}/$$(shell basename $${CURDIR})
|
|
||||||
staging_section ::= ${STAGING}/$$(shell basename $${CURDIR})
|
|
||||||
endef
|
endef
|
||||||
export SECTION_DIRS
|
export MAKE_SECTION_WORKING
|
||||||
|
|
||||||
|
define MAKE_SECTION_STAGING
|
||||||
|
staging_section ::= ${STAGING}/$${1}
|
||||||
|
endef
|
||||||
|
export MAKE_SECTION_STAGING
|
||||||
|
|
||||||
|
define MAKE_SECTION_VARS
|
||||||
|
section ::= $$(shell basename $${CURDIR})
|
||||||
|
$$(eval $$(call MAKE_SECTION_WORKING,$${section}))
|
||||||
|
$$(eval $$(call MAKE_SECTION_STAGING,$${section}))
|
||||||
|
endef
|
||||||
|
export MAKE_SECTION_VARS
|
||||||
|
|
||||||
# Makefiles
|
# Makefiles
|
||||||
CURATE_MAKE ::= ${MAKO_DIR}/curate.mk
|
CURATE_MAKE ::= ${MAKO_DIR}/curate.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user