diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2024-05-09 17:14:24 +0200 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2025-06-15 01:30:28 +0200 |
| commit | 3e21e8873ea1f47c117fcd80fbf6d98c66aea17b (patch) | |
| tree | cd3eecb4d09ee58f23e7f3ad81a6ce21ee614e5e /Makefile | |
| parent | 4ee9c036e1a3f174b31e372cf36b480fbb5480d4 (diff) | |
| download | haunt-blog-3e21e8873ea1f47c117fcd80fbf6d98c66aea17b.tar.gz haunt-blog-3e21e8873ea1f47c117fcd80fbf6d98c66aea17b.tar.bz2 haunt-blog-3e21e8873ea1f47c117fcd80fbf6d98c66aea17b.zip | |
Makefile: add target to automatically update the articles list.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -29,7 +29,16 @@ VENDOR_REPLICANT_ARTWORK_PATH ?= external/vendor_replicant_artwork SENTINEL = -.PHONY: all build deploy generate-wordpress-articles help markdown serve +.PHONY: \ + all \ + build \ + deploy \ + generate-wordpress-articles \ + help \ + markdown \ + serve \ + update-makefile \ + $(SENTINEL) # Input: wordpress/articles/2015_07_replicant-source-code-hosting-and-rmll-2015.html # Output: https://blog.replicant.us/2015/07/replicant-source-code-hosting-and-rmll-2015/ @@ -83,6 +92,9 @@ WORDPRESS_PAGES = \ wordpress/pages/replicant_blog_page_0.html \ $(SENTINEL) +# If there is a MARKDOWN_ARTICLES variable below it is auto-generated +# from links.txt by the build/update-makefile.scm script. You can use +# the update-makefile target to update the list below. MARKDOWN_ARTICLES = \ markdown/2010_09_welcome-to-replicant.md \ markdown/2010_11_fdroid-a-free-software-alternative-to-google-market.md \ @@ -183,6 +195,16 @@ links.txt: $(WORDPRESS_PAGES) python3 get_links.py $$f | sort -u >> $@ ; \ done +# do not depend on links.txt as a human is supposed to review it manually +update-makefile: + bash -c 'tmp=`mktemp` && \ + guile \ + -L . \ + -c \ + "(display (@@ (build update-makefile) new-makefile-text))" \ + > $${tmp} && \ + cp $${tmp} Makefile && rm -f $${tmp}' + wordpress/articles/%.html: curl "$(guile $(get-wordpress-article-url))" -o $@ @@ -248,4 +270,5 @@ website.tar.gz: build --transform="s#^site#web#" \ --transform="s#^pages/img/#web/img/#" check: build - ./tests.sh + tests/tests.sh + guile -L . tests/update-makefile.scm |
