diff options
author | Case Duckworth | 2022-05-24 17:16:49 -0500 |
---|---|---|
committer | Case Duckworth | 2022-05-24 17:16:49 -0500 |
commit | 849013a6d2ae99ea1b088298b8f2067818b7404d (patch) | |
tree | ec3b58022c90b82425e855fd3c8f864f2671071d /Makefile | |
parent | Use rsync -u to avoid .last_build (diff) | |
download | hat-trick-849013a6d2ae99ea1b088298b8f2067818b7404d.tar.gz hat-trick-849013a6d2ae99ea1b088298b8f2067818b7404d.zip |
Generate a feed
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile index 87e730d..e7c5863 100644 --- a/Makefile +++ b/Makefile | |||
@@ -41,7 +41,13 @@ ITMPR = \ | |||
41 | env HTTMP='$T' HTOUT='\$$@' \ | 41 | env HTTMP='$T' HTOUT='\$$@' \ |
42 | ${HTSH} "${ITMPL}" < /dev/null > '\$$@' | 42 | ${HTSH} "${ITMPL}" < /dev/null > '\$$@' |
43 | 43 | ||
44 | TMPL = ${PTMPL} ${ITMPL} | 44 | RTMPL = tmpl.feed.xml |
45 | RTMPR = \ | ||
46 | feed.xml: ${RTMPL} index.html $$(cat ${TPG}); \ | ||
47 | env HTTMP='$T' HTOUT='\$$@' \ | ||
48 | ${HTSH} "${RTMPL}" < /dev/null > '\$$@' | ||
49 | |||
50 | TMPL = ${PTMPL} ${ITMPL} ${RTMPL} | ||
45 | BUILD_INPUTS = ${INPUT}/* ${TMPL} ${HT} | 51 | BUILD_INPUTS = ${INPUT}/* ${TMPL} ${HT} |
46 | 52 | ||
47 | RSYNCEXCLUDE = \ | 53 | RSYNCEXCLUDE = \ |
@@ -51,6 +57,7 @@ RSYNCEXCLUDE = \ | |||
51 | "*.mk" \ | 57 | "*.mk" \ |
52 | "*.awk" \ | 58 | "*.awk" \ |
53 | "*.bod.txt" \ | 59 | "*.bod.txt" \ |
60 | "tmpl.*" \ | ||
54 | "tmp/" | 61 | "tmp/" |
55 | RSYNCEXCLUDEFILE = ${BUILD}/.rsync-exclude | 62 | RSYNCEXCLUDEFILE = ${BUILD}/.rsync-exclude |
56 | RSYNC = rsync -auvz --exclude-from="${RSYNCEXCLUDEFILE}" --delete | 63 | RSYNC = rsync -auvz --exclude-from="${RSYNCEXCLUDEFILE}" --delete |
@@ -75,7 +82,8 @@ ${HTMK}: Makefile ${INPUT}/*.ht $T | |||
75 | done >> '$@' | 82 | done >> '$@' |
76 | 83 | ||
77 | @printf '%s\n' "${ITMPR}" >> '$@' | 84 | @printf '%s\n' "${ITMPR}" >> '$@' |
78 | @printf "build: $$(cat ${TPG}) index.html" >> '$@' | 85 | @printf '%s\n' "${RTMPR}" >> '$@' |
86 | @printf "build: $$(cat ${TPG}) index.html feed.xml" >> '$@' | ||
79 | @printf '%s\n' 'done' | 87 | @printf '%s\n' 'done' |
80 | 88 | ||
81 | $T: ; mkdir -p "$@" | 89 | $T: ; mkdir -p "$@" |