summaryrefslogtreecommitdiff
path: root/modules.mk
diff options
context:
space:
mode:
authorHolger Dengler <dengler@linutronix.de>2018-01-18 18:02:30 +0100
committerHolger Dengler <dengler@linutronix.de>2018-04-17 15:28:07 +0200
commit44797f7be06e047c2ecd56189c5bb11e7edf854f (patch)
tree534eb3fd2b85c3c07c60beadbb68265e5a406d5b /modules.mk
parent3f9156050b11fa26ea6ffbe751de8587faf13df3 (diff)
build: replace build command
Building latex files may require to re-run the build command more than once. The make target rules are normally called once. Make also does not check the dependencies, which are caused by tex statements (like \input{} or \includegraphics{}). Both problems are solved by latexmk. This wrapper scans all dependencies in the .tex file and calls the latex-command until all depending steps are resolved. The call of the build-command is forced in make, because the checking, if a tex-file requires a rebuild is done by latexmk. Signed-off-by: Holger Dengler <dengler@linutronix.de>
Diffstat (limited to 'modules.mk')
-rw-r--r--modules.mk12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules.mk b/modules.mk
index 941598f..5d511e6 100644
--- a/modules.mk
+++ b/modules.mk
@@ -16,14 +16,10 @@ ifdef CONFIG_BUILD_HANDOUTS
done
endif
-%.pdf: %.tex
+.FORCE:
+%.pdf: %.tex .FORCE
echo "Build" $@
- TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS):`pwd`/distribution/autotools $(BUILD) $(subst .pdf,.tex,$@)
-ifneq ($(CONFIG_BUILD_FAST_BUILD),y)
- TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS):`pwd`/distribution/autotools $(BUILD_BIB) $(subst .pdf,.aux,$@)
- TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS):`pwd`/distribution/autotools $(BUILD) $(subst .pdf,.tex,$@)
- TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS):`pwd`/distribution/autotools $(BUILD) $(subst .pdf,.tex,$@)
-endif
+ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS):`pwd`/distribution/autotools $(BUILD) $<
# DON'T delete this empty target! Need for incremental build
%.tex:
@@ -40,6 +36,8 @@ clean_texfiles:
rm -f *.blg
rm -f *.out
rm -f *.vrb
+ rm -f *.fls
+ rm -f *.fdb_latexmk
build_master_pres:
ifneq ($(filter $(PRES_PREFIX)%,$(obj-y)), )