From fe9368b2f810c2f2d869abbe2e73b8eff090ca78 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 14 Apr 2025 13:05:29 -0300 Subject: mkdeps.sh, Makefile: Fix generation of correct categories.htmllisting files --- Makefile | 50 +++++++++++++++++++++++++++----------------------- deps.mk | 30 ++++++++++++++++++++---------- mkdeps.sh | 6 ++++-- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index 7aea2f9..6eebe56 100644 --- a/Makefile +++ b/Makefile @@ -75,26 +75,27 @@ all: include deps.mk -listings.adoc = $(categories.adoc) $(indexes.adoc) -sources.adoc = $(articles.adoc) $(listings.adoc) $(pages.adoc) -sources.htmlbody = $(sources.adoc:.adoc=.htmlbody) -sources.html = $(sources.adoc:.adoc=.html) -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) -articles.categorydata = $(articles.adoc:.adoc=.categorydata) -listings.htmlheader = $(listings.adoc:.adoc=.htmlheader) -listings.htmlfooter = $(listings.adoc:.adoc=.htmlfooter) -listings.htmllisting = $(listings.adoc:.adoc=.htmllisting) -listings.html = $(listings.adoc:.adoc=.html) -categories.txt = $(categories.adoc:.adoc=.txt) -categories.xml = $(categories.adoc:.adoc=.xml) -categories.xml.gz = $(categories.adoc:.adoc=.xml.gz) +listings.adoc = $(categories.adoc) $(indexes.adoc) +sources.adoc = $(articles.adoc) $(listings.adoc) $(pages.adoc) +sources.htmlbody = $(sources.adoc:.adoc=.htmlbody) +sources.html = $(sources.adoc:.adoc=.html) +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) +articles.categorydata = $(articles.adoc:.adoc=.categorydata) +listings.htmlheader = $(listings.adoc:.adoc=.htmlheader) +listings.htmlfooter = $(listings.adoc:.adoc=.htmlfooter) +listings.htmllisting = $(listings.adoc:.adoc=.htmllisting) +listings.html = $(listings.adoc:.adoc=.html) +categories.htmllisting = $(categories.adoc:.adoc=.htmllisting) +categories.txt = $(categories.adoc:.adoc=.txt) +categories.xml = $(categories.adoc:.adoc=.xml) +categories.xml.gz = $(categories.adoc:.adoc=.xml.gz) sources = \ $(sources.adoc) \ @@ -158,13 +159,13 @@ derived-assets = \ src/dyn.conf \ src/base.conf \ src/global.conf \ - $(listings.htmlheader) \ - $(listings.htmlfooter) \ - $(listings.htmllisting) \ $(articles.indexentry) \ $(articles.feedentry) \ $(articles.sortdata) \ $(articles.categorydata) \ + $(listings.htmlheader) \ + $(listings.htmlfooter) \ + $(listings.htmllisting) \ $(categories.txt) \ $(categories.xml) \ $(categories.xml.gz) \ @@ -223,6 +224,9 @@ src/global.conf: src/base.conf $(listings.html): cat $*.htmlheader $*.htmllisting $*.htmlbody $*.htmlfooter > $@ +$(categories.htmllisting): + mkwb categoriesbody $*.conf > $@ + $(categories.txt): mkwb categories $(@D) > $@ diff --git a/deps.mk b/deps.mk index 76dcd8c..9ca83f5 100644 --- a/deps.mk +++ b/deps.mk @@ -860,6 +860,16 @@ src/content/pastebins/categories.htmlheader src/content/pastebins/categories.htm src/content/podcasts/categories.htmlheader src/content/podcasts/categories.htmlfooter: src/content/podcasts/categories.conf src/content/screencasts/categories.htmlheader src/content/screencasts/categories.htmlfooter: src/content/screencasts/categories.conf src/content/tils/categories.htmlheader src/content/tils/categories.htmlfooter: src/content/tils/categories.conf +src/content/blog/index.htmllisting: src/content/blog/index.conf +src/content/pastebins/index.htmllisting: src/content/pastebins/index.conf +src/content/podcasts/index.htmllisting: src/content/podcasts/index.conf +src/content/screencasts/index.htmllisting: src/content/screencasts/index.conf +src/content/tils/index.htmllisting: src/content/tils/index.conf +src/content/blog/categories.htmllisting: src/content/blog/categories.conf +src/content/pastebins/categories.htmllisting: src/content/pastebins/categories.conf +src/content/podcasts/categories.htmllisting: src/content/podcasts/categories.conf +src/content/screencasts/categories.htmllisting: src/content/screencasts/categories.conf +src/content/tils/categories.htmllisting: src/content/tils/categories.conf src/content/blog/index.html: src/content/blog/index.htmlheader src/content/blog/index.htmlfooter src/content/pastebins/index.html: src/content/pastebins/index.htmlheader src/content/pastebins/index.htmlfooter src/content/podcasts/index.html: src/content/podcasts/index.htmlheader src/content/podcasts/index.htmlfooter @@ -918,9 +928,9 @@ src/content/blog/categories.htmllisting: $(articles.blog.sortdata) src/content/blog/categories.txt: src/content/blog/sortdata.txt src/content/blog/categories.txt: $(articles.blog.sortdata) src/content/blog/index.htmllisting src/content/blog/categories.htmllisting: $(articles.blog.indexentry) -src/content/blog/categories.htmllisting src/content/blog/categories.txt: $(articles.blog.categorydata) +src/content/blog/categories.txt: $(articles.blog.categorydata) src/content/blog/categories.txt src/content/blog/feed.xml: $(articles.blog.feedentry) -src/content/blog/categories.xml: src/content/blog/categories.txt +src/content/blog/categories.htmllisting src/content/blog/categories.xml: src/content/blog/categories.txt articles.pastebins.adoc = \ @@ -963,9 +973,9 @@ src/content/pastebins/categories.htmllisting: $(articles.pastebins.sortdata) src/content/pastebins/categories.txt: src/content/pastebins/sortdata.txt src/content/pastebins/categories.txt: $(articles.pastebins.sortdata) src/content/pastebins/index.htmllisting src/content/pastebins/categories.htmllisting: $(articles.pastebins.indexentry) -src/content/pastebins/categories.htmllisting src/content/pastebins/categories.txt: $(articles.pastebins.categorydata) +src/content/pastebins/categories.txt: $(articles.pastebins.categorydata) src/content/pastebins/categories.txt src/content/pastebins/feed.xml: $(articles.pastebins.feedentry) -src/content/pastebins/categories.xml: src/content/pastebins/categories.txt +src/content/pastebins/categories.htmllisting src/content/pastebins/categories.xml: src/content/pastebins/categories.txt articles.podcasts.adoc = \ @@ -987,9 +997,9 @@ src/content/podcasts/categories.htmllisting: $(articles.podcasts.sortdata) src/content/podcasts/categories.txt: src/content/podcasts/sortdata.txt src/content/podcasts/categories.txt: $(articles.podcasts.sortdata) src/content/podcasts/index.htmllisting src/content/podcasts/categories.htmllisting: $(articles.podcasts.indexentry) -src/content/podcasts/categories.htmllisting src/content/podcasts/categories.txt: $(articles.podcasts.categorydata) +src/content/podcasts/categories.txt: $(articles.podcasts.categorydata) src/content/podcasts/categories.txt src/content/podcasts/feed.xml: $(articles.podcasts.feedentry) -src/content/podcasts/categories.xml: src/content/podcasts/categories.txt +src/content/podcasts/categories.htmllisting src/content/podcasts/categories.xml: src/content/podcasts/categories.txt articles.screencasts.adoc = \ @@ -1011,9 +1021,9 @@ src/content/screencasts/categories.htmllisting: $(articles.screencasts.sortdata) src/content/screencasts/categories.txt: src/content/screencasts/sortdata.txt src/content/screencasts/categories.txt: $(articles.screencasts.sortdata) src/content/screencasts/index.htmllisting src/content/screencasts/categories.htmllisting: $(articles.screencasts.indexentry) -src/content/screencasts/categories.htmllisting src/content/screencasts/categories.txt: $(articles.screencasts.categorydata) +src/content/screencasts/categories.txt: $(articles.screencasts.categorydata) src/content/screencasts/categories.txt src/content/screencasts/feed.xml: $(articles.screencasts.feedentry) -src/content/screencasts/categories.xml: src/content/screencasts/categories.txt +src/content/screencasts/categories.htmllisting src/content/screencasts/categories.xml: src/content/screencasts/categories.txt articles.tils.adoc = \ @@ -1057,6 +1067,6 @@ src/content/tils/categories.htmllisting: $(articles.tils.sortdata) src/content/tils/categories.txt: src/content/tils/sortdata.txt src/content/tils/categories.txt: $(articles.tils.sortdata) src/content/tils/index.htmllisting src/content/tils/categories.htmllisting: $(articles.tils.indexentry) -src/content/tils/categories.htmllisting src/content/tils/categories.txt: $(articles.tils.categorydata) +src/content/tils/categories.txt: $(articles.tils.categorydata) src/content/tils/categories.txt src/content/tils/feed.xml: $(articles.tils.feedentry) -src/content/tils/categories.xml: src/content/tils/categories.txt +src/content/tils/categories.htmllisting src/content/tils/categories.xml: src/content/tils/categories.txt diff --git a/mkdeps.sh b/mkdeps.sh index bb846c8..96fb138 100755 --- a/mkdeps.sh +++ b/mkdeps.sh @@ -75,6 +75,7 @@ articles | sed 's/^\(.*\)\.adoc$/\1.categorydata:\t\1.conf/' printf '\n' listings | sed 's/^\(.*\)\.adoc$/\1.htmlheader\t\1.htmlfooter:\t\1.conf/' +listings | sed 's/^\(.*\)\.adoc$/\1.htmllisting:\t\1.conf/' listings | sed 's/^\(.*\)\.adoc$/\1.html:\t\1.htmlheader\t\1.htmlfooter/' listings | sed 's/^\(.*\)\.adoc$/\1.html:\t\1.htmllisting\t\1.htmlbody/' printf '\n' @@ -110,7 +111,6 @@ for colllink in src/collections/*; do printf '%s/categories.htmllisting:\t' "$c" printf '$(articles.%s.indexentry)\n' "$name" - printf '%s/categories.htmllisting\t' "$c" printf '%s/categories.txt:\t' "$c" printf '$(articles.%s.categorydata)\n' "$name" @@ -118,5 +118,7 @@ for colllink in src/collections/*; do printf '%s/feed.xml:\t' "$c" printf '$(articles.%s.feedentry)\n' "$name" - printf '%s/categories.xml:\t%s/categories.txt\n' "$c" "$c" + printf '%s/categories.htmllisting\t' "$c" + printf '%s/categories.xml:\t' "$c" + printf '%s/categories.txt\n' "$c" done -- cgit v1.2.3