RSS Git Download  Clone
Raw Blame History
################################################################################
#	Makefile for Documentation
#				T.Barnaby,	BEAM Ltd,	2007-02-01
################################################################################
#
TOP	= ${shell pwd}

include ${TOP}/Makefile.config

BUILDDOC	= yes

FILES	= *.html *.jpg *.gif *.pdf *.doc libTmsApi libBeamApi

DOCSRCS	= $(wildcard *.od[tp])
DOCPDFS	:= $(DOCSRCS:.odt=.pdf)
DOCPDFS	:= $(DOCPDFS:.odp=.pdf)

.PHONY:	libTmsApi libBeamApi

all: build

ifeq ("$(BUILDDOC)", "yes")
build: libBeamApi libTmsApi ${DOCPDFS}
else
build:
endif


installPackages:
	dnf install texlive-scheme-small texlive-multirow texlive-hanging texlive-listofitems texlive-ulem texlive-wasysym texlive-ec texlive-sectsty texlive-refman texlive-newunicodechar texlive-etoc

dox:	libTmsApi libBeamApi

clean:
	rm -fr libBeamApi libTmsApi

install:	all
	mkdir -p ${DOCDIR}
	cp -a * ${DOCDIR}

includes:

libTmsApi:
	doxygen libTmsApi.dox
	#(cd libTmsApi/latex; make) > /dev/null 2>&1
	#cp libTmsApi/latex/refman.pdf libTmsApi.pdf
	#rm -fr libTmsApi/latex

libBeamApi:
	doxygen libBeamApi.dox
	#(cd libBeamApi/latex; make) > /dev/null 2>&1
	#cp libBeamApi/latex/refman.pdf libBeamApi.pdf
	#rm -fr libBeamApi/latex
	
rpms:	dox tms-doc.spec
	tar -czC .. -f ${RPM_DIR}/SOURCES/tms-doc.tar.gz tms-doc
	rpmbuild -bb tms-doc.spec

rpmsInstall:
	cp ${RPM_DIR}/RPMS/noarch/tms-doc-$(VERSION)-$(RELEASE)*.rpm ${DIST_DIR}/packages
	createrepo ${DIST_DIR}

%.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}