32 lines
983 B
Makefile
32 lines
983 B
Makefile
DOCS = Karta_Projektu dzw SWS_Archivium
|
|
MAIN = main
|
|
|
|
PDFS = $(addsuffix .pdf, $(DOCS))
|
|
|
|
.PHONY: all clean przygotuj_pliki
|
|
|
|
all: $(PDFS) $(MAIN).pdf
|
|
|
|
przygotuj_pliki:
|
|
# Kolejność jest kluczowa, aby nie nadpisać wielokrotnie tych samych słów!
|
|
sed -e 's/\\subsubsection{/\\paragraph{/g' \
|
|
-e 's/\\subsection{/\\subsubsection{/g' \
|
|
-e 's/\\section{/\\subsection{/g' \
|
|
-e 's/\\chapter{/\\section{/g' dzw.tex > dzw_zmienione.tex
|
|
|
|
sed -e 's/\\subsubsection{/\\paragraph{/g' \
|
|
-e 's/\\subsection{/\\subsubsection{/g' \
|
|
-e 's/\\section{/\\subsection{/g' \
|
|
-e 's/\\chapter{/\\section{/g' SWS_Archivium.tex > SWS_zmienione.tex
|
|
|
|
%.pdf: %.tex
|
|
latexmk -pdf -f -shell-escape -interaction=nonstopmode $<
|
|
|
|
$(MAIN).pdf: przygotuj_pliki $(MAIN).tex
|
|
latexmk -pdf -f -shell-escape -interaction=nonstopmode $(MAIN).tex
|
|
|
|
clean:
|
|
latexmk -C
|
|
rm -f *.run.xml *.bcf *.fdb_latexmk *.fls *.synctex.gz
|
|
rm -f $(MAIN).pdf $(PDFS)
|
|
rm -f dzw_zmienione.tex SWS_zmienione.tex
|