################################################################################ # Makefile for Documentation # T.Barnaby, BEAM Ltd, 2024-08-16 ################################################################################ # TOP = ${shell pwd}/.. include ${TOP}/Config.mk FILES = *.html *.jpg *.gif *.pdf *.doc libTmsApi libBeamApi DOCSRCS = $(wildcard *.od[tp] *.doc) DOCPDFS := $(DOCSRCS:.odt=.pdf) DOCPDFS := $(DOCPDFS:.odp=.pdf) DOCPDFS := $(DOCPDFS:.doc=.pdf) #.PHONY: libTmsApi libBeamApi all:: build ifeq ("$(BUILDDOC)", "yes") build: libBeamApi libTmsApi ${DOCPDFS} else build: endif configured: ${TOP}/Config.mk sed -i "s/PROJECT_NUMBER.*/PROJECT_NUMBER\t\t= ${VERSION}/g" libTmsApi.dox touch configured dox: libTmsApi libBeamApi clean: rm -fr libBeamApi libTmsApi clean-all: clean rm -f configured ${DOCPDFS} install: all mkdir -p ${DOCDIR} cp -a * ${DOCDIR} libTmsApi: configured doxygen libTmsApi.dox #(cd libTmsApi/latex; make) > /dev/null 2>&1 #cp libTmsApi/latex/refman.pdf libTmsApi.pdf #rm -fr libTmsApi/latex touch libTmsApi libBeamApi: configured doxygen libBeamApi.dox #(cd libBeamApi/latex; make) > /dev/null 2>&1 #cp libBeamApi/latex/refman.pdf libBeamApi.pdf #rm -fr libBeamApi/latex touch libBeamApi %.pdf: %.od[tp] @# Need separate working directory for soffice instances @TMPDIR=$$(mktemp -d /tmp/bds-soffice-XXXXXXXXXX);\ soffice -env:UserInstallation=file:///$${TMPDIR} --headless --convert-to pdf $<;\ rm -fr $${TMPDIR} %.pdf: %.doc @# Need separate working directory for soffice instances @TMPDIR=$$(mktemp -d /tmp/bds-soffice-XXXXXXXXXX);\ soffice -env:UserInstallation=file:///$${TMPDIR} --headless --convert-to pdf $<;\ rm -fr $${TMPDIR}