diff --git a/document/Makefile b/document/Makefile index 7dbd2f111..c3886cb82 100644 --- a/document/Makefile +++ b/document/Makefile @@ -4,16 +4,16 @@ # all: - make -C presentation + make -C presentation all make -C pb clean: make -C presentation clean make -C pb -pdfclean: - make -C presentation pdf clean +clean-all: + make -C presentation clean-all make -C pb pdf clean -.PHONY: all clean pdfclean +.PHONY: all clean clean-all diff --git a/document/document.mk b/document/document.mk index c9ee8c224..49fb64946 100644 --- a/document/document.mk +++ b/document/document.mk @@ -1,13 +1,18 @@ -all: - make -C document/pb pb.pdf - make -C document/presentation presentation.pdf +all: $(TRGT).pdf + evince $< & -clean: - make -C document/pb clean - make -C document/presentation clean +$(TRGT).pdf: $(TRGT).tex $(OBJS) $(BIB) + pdflatex $(TRGT).tex + pdflatex $(TRGT).tex -pdfclean: - make -C document/pb pdfclean - make -C document/presentation pdfclean +clean-all: clean pdf-clean -.PHONY: all clean pdfclean +pdf-clean: clean + @rm $(TRGT).pdf + +clean: doc-clean + @rm -f $(TRGT).aux $(TRGT).log $(TRGT).dvi $(TRGT).bbl $(TRGT).blg + @rm -f *.nav *.out *.xml *.snm *.toc $(TRGT)-blx.bib + @rm -f *~ *.fls *.fdb_latexmk *.vrb *.aux *.bbl *.blg *.log + +.PHONY: all clean pdf-clean clean-all diff --git a/document/presentation/Makefile b/document/presentation/Makefile index 863965de9..c119a8dcf 100644 --- a/document/presentation/Makefile +++ b/document/presentation/Makefile @@ -1,25 +1,16 @@ -OBJS = $(patsubst %.odg,%.pdf,$(wildcard drawings/*.odg)) -TRGT = presentation +ROOT_DIR:=../.. +include ../../system.mk -run: $(TRGT).pdf - evince $< & +OBJS=$(patsubst %.odg,%.pdf,$(wildcard figures/*.odg)) +TRGT=presentation +BIB=$(TRGT).bib -$(TRGT).pdf: $(TRGT).tex $(OBJS) $(TRGT).bib - pdflatex $(TRGT).tex - pdflatex $(TRGT).tex - evince $@ & +include ../document.mk -drawings/%.pdf: drawings/%.odg - make -C drawings +figures/%.pdf: figures/%.odg + make -C figures all -clean: - @rm -f $(TRGT).aux $(TRGT).log $(TRGT).dvi $(TRGT).bbl $(TRGT).blg - @rm -f *.nav *.out *.xml *.snm *.toc $(TRGT)-blx.bib - @rm -f *~ *.fls *.fdb_latexmk *.vrb *.aux *.bbl *.blg *.log +doc-clean: make -C figures clean -pdfclean: clean - @rm $(TRGT).pdf - -.PHONY: run clean veryclean - +.PHONY: doc-clean