Mercurial > p > roundup > code
annotate website/www/Makefile @ 8513:d7d91e25a1c2
chore(build): bump anchore/scan-action from 7.2.3 to 7.3.0 pull #80
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 27 Jan 2026 21:41:37 -0500 |
| parents | 0663a7bcef6c |
| children |
| rev | line source |
|---|---|
|
4035
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
1 TMP := _tmp |
|
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
2 HTML := html |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
3 |
|
4035
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
4 .PHONY: help clean html linkcheck |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
5 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
6 # from https://www.thapaliya.com/en/writings/well-documented-makefiles/ via |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
7 # https://til.jakelazaroff.com/make/list-all-commands-in-a-makefile/ |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
8 help: |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
9 @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[.a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
10 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
11 ##@ Main Command |
|
6666
54af7ce65e6e
Add canonical url link in header
John Rouillard <rouilj@ieee.org>
parents:
6374
diff
changeset
|
12 # after upgrade to sphinx 1.8.5, search.html is missing load of searchtools. |
|
54af7ce65e6e
Add canonical url link in header
John Rouillard <rouilj@ieee.org>
parents:
6374
diff
changeset
|
13 # fix that in postprocess |
|
6668
4eee1aa1103e
reimplment meta opengraph removed in changeset 6628:2bb6d7baa47d
John Rouillard <rouilj@ieee.org>
parents:
6666
diff
changeset
|
14 # also sed index.html to properly format meta og:... entries. |
|
8412
0663a7bcef6c
feat: finish reauth docs, enhance code.
John Rouillard <rouilj@ieee.org>
parents:
8397
diff
changeset
|
15 html: doc_links ## make standalone HTML files (KEEP_HTML=1 speeds build) |
|
8280
f5007c91ba18
build: fixes for makfile to work with local autobuild of doc
John Rouillard <rouilj@ieee.org>
parents:
8271
diff
changeset
|
16 if [ -z "${KEEP_HTML}" ]; then rm -rf html; fi |
|
f5007c91ba18
build: fixes for makfile to work with local autobuild of doc
John Rouillard <rouilj@ieee.org>
parents:
8271
diff
changeset
|
17 rm -f html/robots.txt # otherwise sphinx errors |
|
4035
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
18 mkdir -p $(TMP)/doctrees $(HTML) |
|
6374
977e0ef08406
Enable nitpick mode and warnings as errors for html generation
John Rouillard <rouilj@ieee.org>
parents:
4703
diff
changeset
|
19 sphinx-build -n -W -b html -d $(TMP)/doctrees . $(HTML) |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
20 # install searchtools.js into search page. |
|
6666
54af7ce65e6e
Add canonical url link in header
John Rouillard <rouilj@ieee.org>
parents:
6374
diff
changeset
|
21 grep 'searchtools.js' html/search.html || sed -i -e '/language_data.js/s#</script>#</script>\n <script type="text/javascript" src="_static/searchtools.js"></script>#' html/search.html |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
22 # sphinx inserts \: for : in meta tags. Get rid of the \ in |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
23 # opengraph tags |
|
6811
075a2f6d703b
fix opengraph meta tags name should be property.
John Rouillard <rouilj@ieee.org>
parents:
6763
diff
changeset
|
24 sed -i -e '/<meta/s/og\\:/og:/' \ |
|
075a2f6d703b
fix opengraph meta tags name should be property.
John Rouillard <rouilj@ieee.org>
parents:
6763
diff
changeset
|
25 -e '/<meta/s/name="og:/property="og:/' html/index.html |
|
6763
d93b441ee778
Handle build issues, update css for mobile
John Rouillard <rouilj@ieee.org>
parents:
6668
diff
changeset
|
26 cp robots.txt html/robots.txt |
|
8280
f5007c91ba18
build: fixes for makfile to work with local autobuild of doc
John Rouillard <rouilj@ieee.org>
parents:
8271
diff
changeset
|
27 mkdir -p html/signatures && cp signatures/*.asc html/signatures |
|
7787
2ab234484708
docs: add older docs and link them from a Sphinx controlled doc
John Rouillard <rouilj@ieee.org>
parents:
7494
diff
changeset
|
28 cp --no-clobber -r docs/html_extra/. html/docs/. |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
29 cp htaccess html/.htaccess |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
30 @echo; \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
31 l=$$(find html -name '*.orig' -o -name '*~' | tee /dev/tty | wc -l);\ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
32 if [ $$l -ne 0 ]; then echo "Garbage files found" && false; fi |
|
8063
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
33 if [ -e templates.zip ]; then cp templates.zip \ |
|
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
34 html/CVE-2024-39124-templates.zip; fi |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
35 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
36 ##@ Utilities |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
37 clean: ## remove all produced files |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
38 -rm -rf $(TMP) $(HTML) docs COPYING.txt templates.zip |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
39 |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
40 linkcheck: ## check external links for existence |
|
4035
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
41 mkdir -p $(TMP)/linkcheck $(TMP)/doctrees |
|
e4950073153f
Adjust to better sync with roundup docs.
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
4022
diff
changeset
|
42 sphinx-build -b linkcheck -d $(TMP)/doctrees . $(TMP)/linkcheck |
|
4022
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
43 @echo |
|
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
44 @echo "Link check complete; look for any errors in the above output " \ |
|
d62831da3941
svn repository setup
Stefan Seefeld <stefan@users.sourceforge.net>
parents:
diff
changeset
|
45 "or in .build/linkcheck/output.txt." |
|
7445
abc2ec25b3d1
add target to push to sourceforge dev_docs area.
John Rouillard <rouilj@ieee.org>
parents:
7428
diff
changeset
|
46 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
47 # use to distribute template changes (e.g. for security issues) |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
48 # separate from releases |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
49 templates.zip: ## package share/roundup/templates into zip file |
|
8063
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
50 rm -f templates.zip |
|
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
51 (cd ../../share/roundup; hg status -A templates | \ |
|
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
52 sed -ne '/^[AMC]/s/^..//p' | sort | zip -@ - ) > templates.zip |
|
6d4b5005abf2
docs: changes to website docs to announce CVE's
John Rouillard <rouilj@ieee.org>
parents:
8044
diff
changeset
|
53 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
54 ##@ Sync/Distribution commands |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
55 sourceforge_dev_sync: ## sync html directory to sourceforce /dev_docs subdir |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
56 # --no-times makes _images/* and other files sync over every time |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
57 # so docs_backup-... is complete with all files and can be served |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
58 # as the docs tree. Without --no-times _static, _images and other |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
59 # directories are missing from the backup directory. |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
60 # Exclude docs_backup so it won't be deleted from sourceforge |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
61 # since: |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
62 # --delete-exclude |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
63 # IS NOT (and must not be) SET |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
64 read -p "sync to dev_docs y/N? " resp; echo "$$resp" | grep -i "^y" |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
65 rsync -av --no-times --delete --exclude 'docs_backup*' \ |
|
8397
cb6a86b92b36
build: exclude sending .buildinfo to sourceforge in rsync of docs.
John Rouillard <rouilj@ieee.org>
parents:
8280
diff
changeset
|
66 --exclude '.buildinfo' \ |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
67 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
68 html/. \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
69 web.sourceforge.net:/home/project-web/roundup/htdocs/dev_docs/. |
|
7494
022b7112c171
Add target to push production www docs.
John Rouillard <rouilj@ieee.org>
parents:
7445
diff
changeset
|
70 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
71 sourceforge_prod_sync: ## sync html directory to sourceforce production website |
|
7494
022b7112c171
Add target to push production www docs.
John Rouillard <rouilj@ieee.org>
parents:
7445
diff
changeset
|
72 read -p "sync to production y/N? " resp; echo "$$resp" | grep -i "^y" |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
73 rsync -av --no-times --delete --exclude 'docs_backup*' \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
74 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
75 html/. \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
76 web.sourceforge.net:/home/project-web/roundup/htdocs/. |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
77 |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
78 sourceforge_home_sync: ## sync html directory to sourceforge:~/roundup_docs |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
79 |
|
8044
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
80 read -p "sync to home y/N? " resp; echo "$$resp" | grep -i "^y" |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
81 rsync -av --no-times --delete --exclude 'docs_backup*' \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
82 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
83 html/. \ |
|
f9eaaa63fda2
build: update website build to sync built files
John Rouillard <rouilj@ieee.org>
parents:
7787
diff
changeset
|
84 web.sourceforge.net:roundup_docs/. |
|
8271
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
85 |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
86 ##@ Setup |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
87 doc_links: docs COPYING.txt ## recreate links to docs not in this tree |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
88 |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
89 docs: |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
90 ln -s ../../doc ./docs |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
91 |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
92 COPYING.txt: |
|
8824c81cc431
doc: add make help to all Makefiles and fix 2 Makefiles
John Rouillard <rouilj@ieee.org>
parents:
8064
diff
changeset
|
93 ln -s ../../COPYING.txt COPYING.txt |
