about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorCase Duckworth2022-05-19 15:34:39 -0500
committerCase Duckworth2022-05-19 15:34:39 -0500
commite5f19945f9a28001ebd3da9a2e273ba10440f5fd (patch)
tree834669739f1425d48aaa816b7b046dd3d8104a5b /Makefile
parentIgnore things (diff)
downloadhat-trick-e5f19945f9a28001ebd3da9a2e273ba10440f5fd.tar.gz
hat-trick-e5f19945f9a28001ebd3da9a2e273ba10440f5fd.zip
Fix building
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 19 insertions, 11 deletions
diff --git a/Makefile b/Makefile index 5b3cadd..168fac8 100644 --- a/Makefile +++ b/Makefile
@@ -25,7 +25,7 @@ PTMPC = \
25PTMPR = \ 25PTMPR = \
26 $$hb: $$ht ; \ 26 $$hb: $$ht ; \
27 ${HTAWK} < '$$ht' | \ 27 ${HTAWK} < '$$ht' | \
28 env HTTMP='$T' HTENV='$T/\$$<.env' HTOUT='\$$@' \ 28 env HTTMP='$T' HTENV='$T/\$$<.env' HTOUT='\$$@' HTBOD='\$$<.bod.txt' \
29 ${HTSH} '${PTMPL}' > '\$$@' 29 ${HTSH} '${PTMPL}' > '\$$@'
30 30
31ITMPL = tmpl.index.htm 31ITMPL = tmpl.index.htm
@@ -45,6 +45,19 @@ ITMPR = \
45TMPL = ${PTMPL} ${ITMPL} 45TMPL = ${PTMPL} ${ITMPL}
46BUILD_INPUTS = ${INPUT}/* ${TMPL} ${HT} 46BUILD_INPUTS = ${INPUT}/* ${TMPL} ${HT}
47 47
48RSYNCEXCLUDE = \
49 "*.ht" \
50 "*.sh" \
51 "*.htm" \
52 "*.mk" \
53 "*.awk" \
54 "*.bod.txt" \
55 "tmp/"
56RSYNCEXCLUDEFILE = ${BUILD}/.rsync-exclude
57RSYNC = rsync -avz --exclude-from="${RSYNCEXCLUDEFILE}" --delete
58
59####################
60
48${BUILD}: ${BUILD_INPUTS} 61${BUILD}: ${BUILD_INPUTS}
49 @touch ${LASTB} 62 @touch ${LASTB}
50 @mkdir -p ${BUILD} 63 @mkdir -p ${BUILD}
@@ -73,16 +86,11 @@ ${ITMPL}: ; printf '${ITMPC}' > '$@'
73 86
74.PHONY: clean clean-build nuke 87.PHONY: clean clean-build nuke
75clean: ; -rm -rf ${BUILD} ${HTMK} $T ${LASTB} 88clean: ; -rm -rf ${BUILD} ${HTMK} $T ${LASTB}
76clean-build:
77 rm -rf '${BUILD}/$T'
78 for file in ${BUILD}/*; do \
79 case "$$file" in \
80 *.ht|*.sh|*.htm|*.mk|*.awk) rm -rf "$$file" ;; \
81 esac \
82 done
83nuke: clean ; -rm ${TMPL} 89nuke: clean ; -rm ${TMPL}
84 90
85.PHONY: publish 91${RSYNCEXCLUDEFILE}: ${BUILD}
86publish: build clean-build 92 printf '%s\n' ${RSYNCEXCLUDE} > '$@'
87 scp -r ${BUILD}/* '${UPLOAD_TARGET}'; \
88 93
94.PHONY: publish
95publish: build ${RSYNCEXCLUDEFILE}
96 ${RSYNC} ${BUILD}/* '${UPLOAD_TARGET}'