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";
|
$clean_ext = "run.xml %R-blx.bib %R-blx.aux ist xdy";
|
||||||
|
|
||||||
# Rule to typeset minizinc files
|
# Rule to typeset minizinc files
|
||||||
add_cus_dep('mzn', 'mzntex', 0, 'run_pygmentize_mzn');
|
add_cus_dep('mzn', 'mzntex', 0, 'run_make');
|
||||||
sub run_pygmentize_mzn {
|
add_cus_dep('py', 'pytex', 0, 'run_make');
|
||||||
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].mzn > $_[0].mzntex";
|
sub run_make {
|
||||||
}
|
my $dest = $$Pdest;
|
||||||
add_cus_dep('py', 'pytex', 0, 'run_pygmentize_py');
|
system "make $dest"
|
||||||
sub run_pygmentize_py {
|
|
||||||
system "pipenv run pygmentize -f latex -Olinenos=True,texcomments=True,mathescape=True $_[0].py > $_[0].pytex";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rule to generate glossaries
|
# Rule to generate glossaries
|
||||||
|
14
Makefile
14
Makefile
@ -1,13 +1,25 @@
|
|||||||
PROJECT=dekker_thesis
|
PROJECT=dekker_thesis
|
||||||
|
|
||||||
|
MZN_LISTINGS := $(addsuffix tex, $(wildcard assets/mzn/*.mzn) )
|
||||||
|
PY_LISTINGS := $(addsuffix tex, $(wildcard assets/py/*.py) )
|
||||||
|
|
||||||
.PHONY: $(PROJECT).pdf clean clobber
|
.PHONY: $(PROJECT).pdf clean clobber
|
||||||
|
|
||||||
|
|
||||||
$(PROJECT).pdf: $(PROJECT).tex
|
$(PROJECT).pdf: $(PROJECT).tex
|
||||||
latexmk -use-make $<
|
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:
|
clean:
|
||||||
latexmk -c
|
latexmk -c
|
||||||
|
|
||||||
clobber:
|
clobber:
|
||||||
latexmk -C
|
latexmk -C
|
||||||
|
rm -f assets/mzn/*.mzntex
|
||||||
|
rm -f assets/py/*.pytex
|
||||||
|
Reference in New Issue
Block a user