From 8d717954fcc436cf7fe7884a2212216d42928bd5 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 5 Apr 2025 14:08:05 -0300 Subject: Makefile: Setup structure to externally archive links --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 37eaa73..6fb3955 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PUBURL = public.asc .SUFFIXES: .SUFFIXES: .adoc .conf .snippets .indexentry .feedentry .sortdata .xml -.SUFFIXES: .htmlbody .htmlheader .htmlfooter .htmllisting .html .links +.SUFFIXES: .htmlbody .htmlheader .htmlfooter .htmllisting .html .links .caslinks .SUFFIXES: .gz .adoc.conf: @@ -61,6 +61,11 @@ PUBURL = public.asc .adoc.links: mkwb links $< > $@ +.links.caslinks: + grep -v '^link:' $< | xargs -I_ sh -c '\ + printf "%s\n" "_" | sha256sum | \ + printf "%s\t%s\n" "`cut -d" " -f1`" "_"' > $@ + all: @@ -74,6 +79,7 @@ sources.snippets = $(sources.adoc:.adoc=.snippets) sources.snippets.gz = $(sources.adoc:.adoc=.snippets.gz) sources.conf = $(sources.adoc:.adoc=.conf) sources.links = $(sources.adoc:.adoc=.links) +sources.caslinks = $(sources.adoc:.adoc=.caslinks) articles.indexentry = $(articles.adoc:.adoc=.indexentry) articles.feedentry = $(articles.adoc:.adoc=.feedentry) articles.sortdata = $(articles.adoc:.adoc=.sortdata) @@ -137,6 +143,7 @@ derived-assets = \ $(sources.snippets) \ $(sources.snippets.gz) \ $(sources.links) \ + $(sources.caslinks) \ $(sources.conf) \ src/dyn.conf \ src/base.conf \ -- cgit v1.2.3