Commit f33f6fb8 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Tex: re-add .aux target to makefile

The target to produce an intermediate .aux file for latex documents
was removed in 071d7b5c to simplify the build without taking the overall
docs/ makefile into account. The latter relies on a destinct target for
.aux files.
This commit adds it back but makes sure that failed attempts to build it
still get retried by using pdflatex' drafmode (which does not write the
PDF file itself).

Also, fix some other minor issues in the makefile and the generation of
the directory of acronyms.
parent f030730e
Pipeline #147 passed with stage
in 26 seconds
......@@ -83,10 +83,10 @@
% Redefine the acro command (from acronym) to be used with glossaries %
......@@ -6,39 +6,37 @@ OUTDIR := ./
TEX := pdflatex -shell-escape -jobname $(JOB)
BIB := bibtex
IDX := makeindex
# ACR := /home/bla/bin/makeglossaries -d $(OUTDIR)
ACR := makeglossaries
VIEW := "gnome-open"
CWD := $(shell pwd)
TEX_OUT := $(OUTDIR)$(JOB).pdf
#all: $(TEX_OUT)
all: view
all: $(TEX_OUT)
# all: view
@$(TEX) $(TEX_MAIN).tex
@"$(VIEW)" "$(CWD)/$(TEX_OUT)"
@"$(VIEW)" "$(TEX_OUT)"
view: $(TEX_OUT)
@"$(VIEW)" "$(CWD)/$(TEX_OUT)"
@"$(VIEW)" "$(TEX_OUT)"
@rm -f $(TEX_OUT) $(OUTDIR)*.aux $(OUTDIR)*.bcf $(OUTDIR)*.bbl $(OUTDIR)*-blx.bib $(OUTDIR)*.run.xml $(OUTDIR)*.idx $(OUTDIR)*.ilg $(OUTDIR)*.lot $(OUTDIR)*.lof $(OUTDIR)*.lol $(OUTDIR)*.blg $(OUTDIR)*.alg $(OUTDIR)*.ind $(OUTDIR)*.toc $(OUTDIR)*.acl $(OUTDIR)*.acn $(OUTDIR)*.acr $(OUTDIR)*.out $(OUTDIR)*.log $(OUTDIR)*.gls $(OUTDIR)*.glo $(OUTDIR)*.glg $(OUTDIR)*.ist $(OUTDIR)*.brf $(OUTDIR)*.ver $(OUTDIR)*.hst $(OUTDIR)*.glsdefs
PREREQS := $(wildcard *.tex *.bib content/*.tex img/*.tex img/*.pdf img/*.png ../tex_common/*.tex ../tex_common/img/*.tex)
$(JOB).pdf: $(TEX_MAIN).aux $(PREREQS)
@rm -f "$(CWD)/$(TEX_OUT)"
@rm -f "$(TEX_OUT)"
$(TEX) -draftmode $(TEX_MAIN).tex
# only run bibtex if there exist bib files
ifneq (,$(filter %.bib,$(PREREQS)))
@$(TEX) $(TEX_MAIN).tex
#$(IDX) $(OUTDIR)$(JOB).idx
$(ACR) $(JOB)
#$(ACR) $(JOB)
# No prerequisites because we want to trigger this rule manually only
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment