+.ONESHELL:
+$(BUILD_DIR)/rolling.html:
+ echo 'building rolling file'
+ $(export_common)
+ cat $(TEMPLATE_DIR)/head.template.html $(TEMPLATE_DIR)/rollingbody.template.html $(TEMPLATE_DIR)/foot.template.html > "$@"
+ for article_file in `ls $(SRC_DIR)`; do
+ $(call export_article,"$(SRC_DIR)/$$article_file")
+ envsubst < $(TEMPLATE_DIR)/rollingitem.template.html | sed -i "/<!-- ROLLING_ITEMS -->/r /dev/stdin" "$@"
+ done
+ envsubst < "$@" | sponge "$@"
+
+.ONESHELL:
+$(BUILD_DIR)/archive.html:
+ echo 'building archive file'
+ $(export_common)
+ cat $(TEMPLATE_DIR)/head.template.html $(TEMPLATE_DIR)/archivebody.template.html $(TEMPLATE_DIR)/foot.template.html > "$@"
+ envsubst < "$@" | sponge "$@"
+
+.ONESHELL:
+$(BUILD_DIR)/$(ARTICLE_PATH)/%.html: $(SRC_DIR)/%.md
+ echo "parsing $<"
+ $(export_common)
+ $(call export_article,"$<")
+ cat $(TEMPLATE_DIR)/head.template.html > "$@"
+ # module pipeline starts here
+ ./$(MODULE_DIR)/md "$^" >> "$@"
+ # module pipeline ends here
+ cat $(TEMPLATE_DIR)/foot.template.html >> "$@"
+ envsubst < "$@" | sponge "$@"