diff --git a/HACKING b/HACKING index 1b37af6aa..f41d7e274 100644 --- a/HACKING +++ b/HACKING @@ -53,6 +53,8 @@ only for certain operations (like releases): pandoc used during Debian packaging for the conversion of IPython notebooks to html + svgo for reducing SVG images before generating the tarball + (install with: npm install -g svgo) ltl2ba used in the generated documentation and the test suite ltl2dstar likewise ltl3dra likewise diff --git a/doc/Makefile.am b/doc/Makefile.am index 1a295ed5d..8c59630b4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -## Copyright (C) 2010-2011, 2013-2019 Laboratoire de Recherche et +## Copyright (C) 2010-2011, 2013-2020 Laboratoire de Recherche et ## Développement de l'Epita (LRDE). ## Copyright (C) 2003-2005 Laboratoire d'Informatique de Paris 6 ## (LIP6), département Systèmes Répartis Coopératifs (SRC), Université @@ -29,15 +29,25 @@ endif all-local: $(DOXY_STAMP) $(srcdir)/org-stamp -.PHONY: doc +.PHONY: doc svgo doc: -rm -f stamp $(MAKE) stamp +# We use SVGO only if it is available. +SVGO = if ! (svgo -v >/dev/null); then :; else svgo --disable=removeViewBox +SVGOEND = ; fi + +dist-hook: svgo +svgo: + $(SVGO) -f $(distdir)/userdoc $(SVGOEND) + + stamp: $(srcdir)/Doxyfile.in $(top_srcdir)/configure.ac $(MAKE) Doxyfile -rm -rf spot.html spot.latex $(DOXYGEN) + $(SVGO) -f spot.html $(SVGOEND) touch $@ spot.html spot.tag: stamp