.POSIX: PREFIX = /usr MANPREFIX = $(PREFIX)/share/man DATE = 1970-01-01 VERSION = 0.1.0 NAME = gistatic MAILING_LIST = public-inbox TRANSLATIONS = pt fr eo CONTRIBLANGS = .SUFFIXES: .SUFFIXES: .in .in: @sed \ -e 's:@VERSION@:$(VERSION):g' \ -e 's:@DATE@:$(DATE):g' \ -e 's:@NAME@:$(NAME):g' \ < $< > $@ @if [ -x $< ]; then chmod +x $@; fi manpages.en.in = \ doc/gistatic.en.1.in manpages.in = $(manpages.en.in) \ doc/gistatic.pt.1.in \ doc/gistatic.fr.1.in \ doc/gistatic.eo.1.in manpages = $(manpages.in:.in=) all: src/gistatic $(manpages) tests/resources/repositories/repo-1/.git \ tests/resources/repositories/repo-2/.git: ln -s .gitdir $@ shellcheck: @shellcheck src/gistatic.in emit-index: src/gistatic @rm -rf tmp/index/ @./src/gistatic -i -o tmp/index/ ~/dev/published/git-permalink/ ../capim/ ../libedn/ ../listatic/ ../lisp-cli/ @ln -rfs tmp/git-permalink tmp/index/git-permalink emit-repo: src/gistatic @rm -rf tmp/git-permalink/ @time ./src/gistatic -o tmp/git-permalink/ -u FIXME-url-1 ~/dev/published/git-permalink/ run: shellcheck emit-index emit-repo check: all \ tests/resources/repositories/repo-1/.git \ tests/resources/repositories/repo-2/.git sh tests/build-sample.sh sh tests/integration.sh clean: rm -rf \ public/ $(manpages) README.*.md CHANGELOG.*.md messages.mo \ vgcore.* tmp/ src/config.h $(all-objects) $(t-objects) \ libgistatic.a gistatic gistatic-tests src/gistatic \ tests/resources/repositories/repo-1/.git \ tests/resources/repositories/repo-2/.git install: all mkdir -p \ '$(DESTDIR)$(PREFIX)/bin' \ '$(DESTDIR)$(PREFIX)/lib' \ '$(DESTDIR)$(PREFIX)/include' cp gistatic '$(DESTDIR)$(PREFIX)/bin' cp libgistatic.a '$(DESTDIR)$(PREFIX)/lib' cp src/gistatic.h '$(DESTDIR)$(PREFIX)/include' sh doc/manpages.sh -ip '$(DESTDIR)$(MANPREFIX)' $(manpages) uninstall: rm -f \ '$(DESTDIR)$(PREFIX)/bin/gistatic' \ '$(DESTDIR)$(PREFIX)/lib/libgistatic.a' \ '$(DESTDIR)$(PREFIX)/include/gistatic.h' sh doc/manpages.sh -up '$(DESTDIR)$(MANPREFIX)' $(manpages) # # Personal workflow targets # dev-check: check public sh tests/dev-integration.sh sh aux/assert-shellcheck.sh sh aux/workflow/assert-todos.sh sh aux/workflow/assert-changelog.sh -n '$(NAME)' $(EXTRA_VERSION) sh aux/workflow/assert-readme.sh -n '$(NAME)' -m '$(MAILING_LIST)' \ $(EXTRA_VERSION) sh aux/workflow/assert-manpages.sh -n '$(NAME)' -m '$(MAILING_LIST)' \ -l '$(TRANSLATIONS) en' $(manpages.en.in) sh aux/workflow/repocheck.sh -x1 -l1 -f7 dist: sh aux/workflow/dist.sh -d '$(DATE)' -V '$(VERSION)' \ -n '$(NAME)' -m '$(MAILING_LIST)' README.en.md: README.md ln -fs $? $@ CHANGELOG.en.md: CHANGELOG.md ln -fs $? $@ l10n-gen: README.en.md CHANGELOG.en.md $(manpages.en.in) sh aux/workflow/l10n.sh -l '$(TRANSLATIONS)' -L '$(CONTRIBLANGS)' $? public/makefile.svg: Makefile mkdir -p '$(@D)' makefile2graph check | dot -Tsvg > $@ public: l10n-gen TODOs.md $(manpages) public/makefile.svg sh aux/workflow/public.sh -l '$(TRANSLATIONS) $(CONTRIBLANGS) en' \ -n '$(NAME)' -m '$(MAILING_LIST)' -o public sh doc/manpages.sh -Ho public $(manpages) spellcheck: public sh aux/workflow/assert-spelling.sh -l '$(TRANSLATIONS) en' \ $$(find public -type f -name '*.html')