diff options
Diffstat (limited to 'v2/dynamic.mk')
-rw-r--r-- | v2/dynamic.mk | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/v2/dynamic.mk b/v2/dynamic.mk index dc5e64e..238e6e9 100644 --- a/v2/dynamic.mk +++ b/v2/dynamic.mk @@ -55,7 +55,7 @@ clean: public/ $(derived-assets) *.sentinel generated.mk -public: $(favicons) public-copy-content.sentinel +public: $(favicons) public-copy-content.sentinel public-copy-code-snippets.sentinel public-mkdir.sentinel: mkdir -p public @@ -67,18 +67,29 @@ public/favicon.png: public-mkdir.sentinel src/content/favicon.svg public/favicon.ico: public-mkdir.sentinel src/content/favicon.svg convert src/content/favicon.svg $@ -public-copy-content.sentinel: $(all-generated.html) $(static-content) \ - src/content/public.asc.txt src/content/.well-known/security.txt - echo $? | \ - tr ' ' '\n' | \ - sed 's|^src/content/||' | \ - tee $@-tmp | \ - xargs dirname | \ - sort | \ - uniq | \ +content = \ + $(all-generated.html) \ + $(static-content) \ + src/content/public.asc.txt \ + src/content/.well-known/security.txt \ + +public-copy-content.sentinel: $(content) public-content-mkdir.sentinel + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + xargs -P`nproc` -I% cp src/content/% public/% + touch $@ + +public-copy-code-snippets.sentinel: $(all-generated.snippets) public-content-mkdir.sentinel + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + awk '{ printf "cp `cat src/content/%s` public/`dirname %s`\n", $$0, $$0 }' | \ + sh + touch $@ + +public-content-mkdir.sentinel: $(content) $(all-generated.snippets) + echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ + xargs dirname | \ + sort | \ + uniq | \ xargs -P`nproc` -I% mkdir -p public/% - xargs -P`nproc` -I% cp src/content/% public/% < $@-tmp - rm -f $@-tmp touch $@ src/content/public.asc.txt: @@ -93,6 +104,7 @@ test-files = \ aux/checks/shellcheck.sh \ aux/checks/todos.sh \ +aux/checks/shellcheck.sh: src/lib/base-conf $(test-files): ALWAYS sh $@ |