# VPATH must include the directory the RST files are in in a checkout of # https://github.com/chbrandt/dachs-doc.git RST_DIR=../../dachs-doc/docs/source VPATH=$(RST_DIR):. HTMLTARGET=vo.ari.uni-heidelberg.de:/var/www/docs/DaCHS RST_SOURCES=data_checklist.rstx howDoI.rstx ref.rstx tutorial.rstx\ booster.rstx install.rstx stc.rstx processors.rstx adql.rstx\ votable.rstx commonproblems.rstx tapquery.rstx develNotes.rstx\ elemref.rstx templating.rstx dachs.1.rstx ALL_HTML=index.html $(subst .rstx,.html,$(RST_SOURCES)) HTML_FILES=$(ALL_HTML) ALL_PDF=$(subst .rstx,.pdf,$(RST_SOURCES)) # cancel any direct rule some folks have defined %.pdf: %.rstx %.html: %.rstx gavo gendoc html $< >$@ %.dvi: %.tex latex $< latex $< rm $*.log %.ps: %.dvi dvips $< %.pdf: %.tex pdflatex $< pdflatex $< %.tex: %.rstx gavo gendoc latex $< > $@ .PHONY: ref.rstx elemref.rstx apidoc-stamp dachs.1: $(RST_DIR)/dachs.1.rstx rst2man --no-datestamp --no-generator $< $@ dachs.1.pdf: dachs.1 mandoc -T pdf $< > $@ dachs.1.html: dachs.1 mandoc -T html $< > $@ ref.rstx: gavo --debug --traceback gendoc refdoc > ref.rstx cp $@ $(RST_DIR) elemref.rstx: python3 makeElementIndex.py > $@ # Since building apidoc takes forever, you need to manually trigger it # using make apidoc-stamp apidoc-stamp: touch apidoc-stamp apidoc: apidoc-stamp rm -rf apidoc sphinx-apidoc -F -a $(shell realpath ../gavo) -e -o $@ (cd apidoc; env GAVO_OOTTEST=1 make html) mv apidoc/_build/html/* apidoc/ install: all rsync -av *.css gavodoc.js $(HTML_FILES) $(ALL_PDF) index.rstx apidoc $(HTMLTARGET) rsync -av $(RST_DIR)/*.rstx $(HTMLTARGET) all: $(HTML_FILES) $(ALL_PDF) dachs.1 clean: rm -f $(ALL_HTML) rm -f *.log *.aux *.out *.pdf *.toc rm -f apidoc-stamp