Merge pull request #74 from DeforaNetworks/khorben/makefile

Import a Makefile for the sample report
This commit is contained in:
Patricia Piolon 2020-01-13 17:04:23 +01:00 committed by GitHub
commit ea241f636c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

38
xml/Makefile Normal file
View File

@ -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