diff options
author | EuAndreh <eu@euandre.org> | 2025-03-31 05:39:34 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-03-31 05:41:22 -0300 |
commit | e83fceb33f1517c87400a10cb041491fba97ceef (patch) | |
tree | 17ce43ed8a1174101a336d2506844afed4beb696 | |
parent | Makefile: "install.src.txt" file only depends on deps.mk! nice (diff) | |
download | euandre.org-e83fceb33f1517c87400a10cb041491fba97ceef.tar.gz euandre.org-e83fceb33f1517c87400a10cb041491fba97ceef.tar.xz |
Makefile: install.txt only depends on deps.mk and snippets! also nice
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | Makefile | 37 |
2 files changed, 33 insertions, 12 deletions
@@ -14,10 +14,14 @@ feed.xmldeps feed.xml /src/global.conf *.gz +/src/sources.txt +/src/all-contents.txt +/src/all-snippets-list.txt +/src/install.txt +/sources.txt +/install.txt /email.txt /baseurl.txt /expiry.txt -/install.html.txt -/install.src.txt /src/content/security.txt /src/content/.well-known/ @@ -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 |