summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-02-16 11:14:09 +0100
committerPaweł Redman <pawel.redman@gmail.com>2020-02-16 11:18:55 +0100
commit87eb67408f9230315494a8cf66fe264196a04ad0 (patch)
tree63ee9d8b92b7cffaa38d83b4222ffd1e391eb75b /Makefile
Ostateczna wersja pracy dyplomowejHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile84
1 files changed, 84 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e447a14
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,84 @@
+PYTHON3 := PYTHONPATH="." python3
+BIBTEX := bibtex
+MAKEINDEX := makeindex
+PDFLATEX := pdflatex -halt-on-error -file-line-error -interaction=nonstopmode
+
+IMAGES := \
+ build/planck.png \
+ build/diagram_xy.png \
+ build/diagram_uv.png \
+ build/diagram_uv_zoom.png \
+ build/diagram_uv76.png \
+ build/pasek_cct.png \
+ build/pasek_tecza.png \
+ build/cmf_xyz_v_lms.png \
+ build/tcs_ra.png \
+ build/d_wektory_wlasne.png \
+ build/d_spektra.png \
+ build/demo_ra.png \
+ build/demo_gai.png
+
+CRL := \
+ crl/color.py \
+ crl/cri.py \
+ crl/data.py \
+ crl/plots.py \
+ crl/tables.py \
+ crl/tables2.py \
+ crl/__init__.py
+
+TEX := \
+ build/00_strona_tytulowa.tex \
+ build/09_wstep.tex \
+ build/10_teoria.tex \
+ build/20_cri.tex \
+ build/30_literatura.tex \
+ build/35_pomiary.tex \
+ build/89_wnioski.tex \
+ build/90_wzory.tex \
+
+FINAL_NAME := W11_236771_2019_praca inżynierska
+
+build/main.pdf: build/main.tex build/main.ist \
+ main.bib ${IMAGES}
+ (cd build && ${PDFLATEX} "main.tex")
+ cp -f "main.bib" "build/main.bib"
+ (cd build && ${BIBTEX} "main")
+ cp "build/main.pdf" "build/${FINAL_NAME}.pdf"
+
+build/main.tex: build main.tex build/lab1.tex build/rea2008.tex $(TEX)
+ @unlink build/main.tex 2>&1 > /dev/null || exit 0
+ @ln -s "../main.tex" build/main.tex
+
+build/main.ist: build main.ist
+ @unlink build/main.ist 2>&1 > /dev/null || exit 0
+ @ln -s "../main.ist" build/main.ist
+
+build:
+ mkdir -p build
+
+build/%.tex: %.tex usuwanie_sierot.py
+ ${PYTHON3} usuwanie_sierot.py < "$<" > "$@"
+
+# FIXME...
+crl/tables.py: crl_tools/make_tables.py
+ ${PYTHON3} "crl_tools/make_tables.py" > "crl/tables.py"
+
+build/%.png: src/%.py src/shared.py ${CRL}
+ @rm -f "$@"
+ ${PYTHON3} "$<" "$@" && test -f "$@"
+ convert "$@" -trim "$@"
+
+build/lab1.tex: src/lab.py src/shared.py ${CRL}
+ ${PYTHON3} src/lab.py
+
+build/rea2008.tex: src/rea2008.py src/shared.py ${CRL}
+ ${PYTHON3} src/rea2008.py
+
+tests: src/tests.py ${CRL}
+ ${PYTHON3} src/tests.py
+
+clean:
+ rm -r build/ crl/tables.py
+
+.PHONY: build/main.pdf clean tests