aboutsummaryrefslogtreecommitdiff
path: root/dynamic.mk
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-06-01 20:33:47 -0300
committerEuAndreh <eu@euandre.org>2022-06-01 20:33:51 -0300
commitd42d6fc45f50a09d36d912c0d68ee0794ac1e520 (patch)
treec1d2dfc0dccd5438892b83e4099868552f1a917d /dynamic.mk
parentsrc/development/frontmatter-env.sh: Use single quote for heredoc marker (diff)
downloadeuandre.org-d42d6fc45f50a09d36d912c0d68ee0794ac1e520.tar.gz
euandre.org-d42d6fc45f50a09d36d912c0d68ee0794ac1e520.tar.xz
Move files.mk and deps.mk into generated.mk
Make torrent files dynamic instead of listed in Makefile.
Diffstat (limited to '')
-rw-r--r--dynamic.mk15
1 files changed, 6 insertions, 9 deletions
diff --git a/dynamic.mk b/dynamic.mk
index c02d934..d16d99b 100644
--- a/dynamic.mk
+++ b/dynamic.mk
@@ -1,5 +1,6 @@
.POSIX:
+.SUFFIXES:
.SUFFIXES: .md .env .html
.md.env:
@@ -8,18 +9,14 @@
.md.html:
sh src/development/genhtml.sh $< > $@
-include files.mk
-include deps.mk
-
-torrents: $(torrent-files)
-
-$(torrent-files): files.mk deps.mk
- mktorrent -f -v -d -n $@ -o $@ -c '' "$$(echo $@ | sed 's/\.torrent$$//')"
-
include generated.mk
+
pastebins.env = $(pastebins.md:.md=.env)
pastebins.html = $(pastebins.md:.md=.html)
-all: $(pastebins.env) $(pastebins.html)
+all: $(pastebins.env) $(pastebins.html) $(torrent-files)
+
+$(torrent-files):
+ mktorrent -f -v -d -n $@ -o $@ -c '' "$(@D)/`basename $@ .torrent`"