From e5f19945f9a28001ebd3da9a2e273ba10440f5fd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 19 May 2022 15:34:39 -0500 Subject: Fix building --- Makefile | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5b3cadd..168fac8 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PTMPC = \ PTMPR = \ $$hb: $$ht ; \ ${HTAWK} < '$$ht' | \ - env HTTMP='$T' HTENV='$T/\$$<.env' HTOUT='\$$@' \ + env HTTMP='$T' HTENV='$T/\$$<.env' HTOUT='\$$@' HTBOD='\$$<.bod.txt' \ ${HTSH} '${PTMPL}' > '\$$@' ITMPL = tmpl.index.htm @@ -45,6 +45,19 @@ ITMPR = \ TMPL = ${PTMPL} ${ITMPL} BUILD_INPUTS = ${INPUT}/* ${TMPL} ${HT} +RSYNCEXCLUDE = \ + "*.ht" \ + "*.sh" \ + "*.htm" \ + "*.mk" \ + "*.awk" \ + "*.bod.txt" \ + "tmp/" +RSYNCEXCLUDEFILE = ${BUILD}/.rsync-exclude +RSYNC = rsync -avz --exclude-from="${RSYNCEXCLUDEFILE}" --delete + +#################### + ${BUILD}: ${BUILD_INPUTS} @touch ${LASTB} @mkdir -p ${BUILD} @@ -73,16 +86,11 @@ ${ITMPL}: ; printf '${ITMPC}' > '$@' .PHONY: clean clean-build nuke clean: ; -rm -rf ${BUILD} ${HTMK} $T ${LASTB} -clean-build: - rm -rf '${BUILD}/$T' - for file in ${BUILD}/*; do \ - case "$$file" in \ - *.ht|*.sh|*.htm|*.mk|*.awk) rm -rf "$$file" ;; \ - esac \ - done nuke: clean ; -rm ${TMPL} -.PHONY: publish -publish: build clean-build - scp -r ${BUILD}/* '${UPLOAD_TARGET}'; \ +${RSYNCEXCLUDEFILE}: ${BUILD} + printf '%s\n' ${RSYNCEXCLUDE} > '$@' +.PHONY: publish +publish: build ${RSYNCEXCLUDEFILE} + ${RSYNC} ${BUILD}/* '${UPLOAD_TARGET}' -- cgit 1.4.1-21-gabe81