diff options
Diffstat (limited to '')
-rw-r--r-- | v2/dynamic.mk | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/v2/dynamic.mk b/v2/dynamic.mk new file mode 100644 index 0000000..ca0f245 --- /dev/null +++ b/v2/dynamic.mk @@ -0,0 +1,77 @@ +.POSIX: +FQDN = euandre.org +PORT = 4444 +BASE_URL = + + +default: all + +include generated.mk + + + +.SUFFIXES: +.SUFFIXES: .md .html .in + + +.in: + sed \ + -e 's|@FQDN@|$(FQDN)|g' \ + -e 's|@BASE_URL@|$(BASE_URL)|g' \ + < $< > $@ + if [ -x $< ]; then chmod +x $@; fi + +.md.html: + sh src/development/genhtml.sh $< > $@ + + +pastebins.html = $(pastebins.md:.md=.html) + + +html = \ + $(pastebins.html) \ + + +ALL = \ + src/content/TODOs.html \ + $(html) \ + + + +all: $(ALL) + + +$(html): src/development/genhtml.sh src/development/config.env + + +collections = pastebins + +clean: + for c in $(collections); do \ + rm -f \ + src/content/$$c/*.txt \ + src/content/$$c/*.atom; \ + done + rm -rf \ + $(ALL) generated.mk src/development/config.env \ + +src/content/TODOs.html: TODOs.md + sh aux/workflow/TODOs.sh -n website -m public-inbox > $@ + +public: all + + +check: +dev-check: check + +fqdn: + printf '$(FQDN)' + + + +run: all + open 'http://localhost:$(PORT)' + serve -d src/content/ -p $(PORT) + +deploy: all + rsync -avzP src/content/ $(FQDN):/home/user-data/www/default/v2/ --delete |