Keep generation commands in Makefile
This commit is contained in:
parent
04a0f91ef9
commit
33072b7758
12
.latexmkrc
12
.latexmkrc
@ -6,13 +6,11 @@ $bibtex_use = 2;
|
||||
$clean_ext = "run.xml %R-blx.bib %R-blx.aux ist xdy";
|
||||
|
||||
# Rule to typeset minizinc files
|
||||
add_cus_dep('mzn', 'mzntex', 0, 'run_pygmentize_mzn');
|
||||
sub run_pygmentize_mzn {
|
||||
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].mzn > $_[0].mzntex";
|
||||
}
|
||||
add_cus_dep('py', 'pytex', 0, 'run_pygmentize_py');
|
||||
sub run_pygmentize_py {
|
||||
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].py > $_[0].pytex";
|
||||
add_cus_dep('mzn', 'mzntex', 0, 'run_make');
|
||||
add_cus_dep('py', 'pytex', 0, 'run_make');
|
||||
sub run_make {
|
||||
my $dest = $$Pdest;
|
||||
system "make $dest"
|
||||
}
|
||||
|
||||
# Rule to generate glossaries
|
||||
|
14
Makefile
14
Makefile
@ -1,13 +1,25 @@
|
||||
PROJECT=dekker_thesis
|
||||
|
||||
MZN_LISTINGS := $(addsuffix tex, $(wildcard assets/mzn/*.mzn) )
|
||||
PY_LISTINGS := $(addsuffix tex, $(wildcard assets/py/*.py) )
|
||||
|
||||
.PHONY: $(PROJECT).pdf clean clobber
|
||||
|
||||
|
||||
$(PROJECT).pdf: $(PROJECT).tex
|
||||
latexmk -use-make $<
|
||||
|
||||
listings: $(MZN_LISTINGS) $(PY_LISTINGS)
|
||||
|
||||
%.mzntex : %.mzn
|
||||
pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,escapeinside="@@",envname="BVerbatim" $< > $@
|
||||
|
||||
%.pytex : %.py
|
||||
pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,escapeinside="@@",envname="BVerbatim" $< > $@
|
||||
|
||||
clean:
|
||||
latexmk -c
|
||||
|
||||
clobber:
|
||||
latexmk -C
|
||||
rm -f assets/mzn/*.mzntex
|
||||
rm -f assets/py/*.pytex
|
||||
|
Reference in New Issue
Block a user