From 0ecaa06f6adfdf2e2d0aebc9f8e7a267e0b05794 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 2 Jan 2020 17:44:53 +0100 Subject: [PATCH] Import a Makefile for the sample report --- xml/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 xml/Makefile diff --git a/xml/Makefile b/xml/Makefile new file mode 100644 index 0000000..321b5c3 --- /dev/null +++ b/xml/Makefile @@ -0,0 +1,38 @@ +PROJECT = sample-report +TARGETS = target/report_$(PROJECT).pdf +OBJS = target/report_$(PROJECT).fo +FOP = fop -c rosbot/fop.conf +JAVA = java +MKDIR = mkdir -p +MV = mv -f +RM = rm -f +UNZIP = unzip +WGET = wget + + +all: $(TARGETS) + +target/report_$(PROJECT).pdf: $(OBJS) + $(FOP) target/report_$(PROJECT).fo -pdf $@ + +target/report_$(PROJECT).fo: ../saxon9he.jar sample-report/source/report.xml xslt/generate_report.xsl + $(MKDIR) -- target + $(JAVA) -jar ../saxon9he.jar \ + -s:"sample-report/source/report.xml" \ + -xsl:"xslt/generate_report.xsl" \ + -o:"$@" \ + -xi + +../saxon9he.jar: + $(WGET) -O download.zip https://sourceforge.net/projects/saxon/files/Saxon-HE/9.7/SaxonHE9-7-0-11J.zip/download + $(UNZIP) download.zip saxon9he.jar + $(RM) -- download.zip + $(MV) -- saxon9he.jar $@ + +clean: + $(RM) -- $(OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +.PHONY: clean distclean