summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-03-31 05:39:34 -0300
committerEuAndreh <eu@euandre.org>2025-03-31 05:41:22 -0300
commite83fceb33f1517c87400a10cb041491fba97ceef (patch)
tree17ce43ed8a1174101a336d2506844afed4beb696 /Makefile
parentMakefile: "install.src.txt" file only depends on deps.mk! nice (diff)
downloadeuandre.org-e83fceb33f1517c87400a10cb041491fba97ceef.tar.gz
euandre.org-e83fceb33f1517c87400a10cb041491fba97ceef.tar.xz
Makefile: install.txt only depends on deps.mk and snippets! also nice
Diffstat (limited to '')
-rw-r--r--Makefile37
1 files changed, 27 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 24108b0..5050e32 100644
--- a/Makefile
+++ b/Makefile
@@ -111,6 +111,10 @@ contents = \
src/content/security.txt \
src/content/security.txt.gz \
+all-snippets = \
+ $(sources.snippets) \
+ $(sources.snippets.gz) \
+
all-contents = \
$(contents) \
$(contents.gz) \
@@ -138,8 +142,12 @@ derived-assets = \
src/content/security.txt \
src/content/security.txt.gz \
src/content/.well-known/security.txt \
- install.html.txt \
- install.src.txt \
+ src/all-contents.txt \
+ src/all-snippets-list.txt \
+ src/install.txt \
+ src/sources.txt \
+ install.txt \
+ sources.txt \
side-assets = \
src/collections/*/*/*/*/*.html.*.txt \
@@ -205,13 +213,22 @@ src/content/.well-known/security.txt: email.txt baseurl.txt expiry.txt
printf 'Encryption: %s/public.asc\n' "`cat baseurl.txt`" >> $@
printf 'Preferred-Languages: en, pt, fr, eo, es\n' >> $@
-install.html.txt: $(all-contents) $(sources.snippets) $(sources.snippets.gz)
- @echo '# find ... > $@. Use -n of make(1) for full listing.'
- @find $(all-contents) `cat $(sources.snippets) $(sources.snippets.gz)` \
- | sed 's|^src/content/||' > $@
+src/sources.txt:
+ printf '%s\n' $(sources) > $@
+
+src/all-contents.txt:
+ printf '%s\n' $(all-contents) > $@
+
+src/all-snippets-list.txt:
+ printf '%s\n' $(all-snippets) > $@
+
+src/install.txt: src/all-contents.txt src/all-snippets-list.txt $(all-snippets)
+ cat src/all-contents.txt `cat src/all-snippets-list.txt` > $@
-install.src.txt: deps.mk
- find $(sources) | sed 's|^src/content/||' > $@
+sources.txt: src/sources.txt
+install.txt: src/install.txt
+sources.txt install.txt:
+ sed 's|^src/content/||' src/$(@F) > $@
@@ -243,9 +260,9 @@ clean:
## Installs into $(DESTDIR)$(PREFIX). Its dependency target
## ensures that all installable artifacts are crafted beforehand.
install: all
- rsync --mkpath -a --files-from=install.html.txt src/content/ \
+ rsync --mkpath -a --files-from=install.txt src/content/ \
'$(DESTDIR)$(HTMLDIR)'
- rsync --mkpath -a --files-from=install.src.txt src/content/ \
+ rsync --mkpath -a --files-from=sources.txt src/content/ \
'$(DESTDIR)$(SRCDIR)'
## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror