-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
place all example Make scripts into separate Makefiles and add them v…
…ia minted to the slides
- Loading branch information
Showing
16 changed files
with
115 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
all: report.txt | ||
|
||
report.txt: plot1.pdf plot2.pdf | ||
touch report.txt | ||
|
||
plot1.pdf plot2.pdf: plot.py data.txt | ||
python plot.py # plot.py produziert sowohl plot1.pdf als auch plot2.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
all: report.txt | ||
|
||
report.txt: plot1.pdf plot2.pdf | ||
touch report.txt | ||
|
||
plot2.pdf plot1.pdf &: plot.py data.txt # das &: definiert die targets als group | ||
python plot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
all: report.txt | ||
|
||
report.txt: plot1.pdf plot2.pdf plot3.pdf plot4.pdf plot5.pdf | ||
touch report.txt | ||
|
||
plot1.pdf plot2.pdf plot3.pdf plot4.pdf plot5.pdf & : plot.py data.txt | ||
python plot.py # plot.py produziert alle plot{i}.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
all: report.txt | ||
|
||
script_targets = plot1.pdf plot2.pdf plot3.pdf plot4.pdf plot5.pdf # Variablen Definition | ||
|
||
report.txt: $(script_targets) # Variablen Verwendung | ||
touch report.txt | ||
|
||
$(script_targets) & : plot.py data.txt # Variablen Verwendung | ||
python plot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
all: report.txt | ||
|
||
plots = $(addprefix build/, $(addsuffix .pdf, plot1 plot2 plot3 plot4)) # Definition | ||
|
||
report.txt: $(plots) # Verwendung | ||
touch report.txt | ||
|
||
$(plots) & : plot.py data.txt # Verwendung | ||
python plot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target: prerequisites | ||
recipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
plot.pdf: plot.py data.txt | ||
python plot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Kuchen: Teig Backofen | ||
Ofen auf 140°C vorheizen | ||
Teig in Backform geben und in den Ofen schieben | ||
Kuchen nach 40 min herausnehmen | ||
|
||
Teig: Eier Mehl Zucker Milch Rumrosinen | Schüssel | ||
Eier schlagen | ||
Mehl, Zucker und Milch hinzugeben | ||
Rumrosinen unterrühren | ||
|
||
Rumrosinen: Rum Rosinen | ||
Rosinen in Rum einlegen | ||
Vier Wochen stehen lassen | ||
|
||
Schüssel: | ||
Rührschüssel auf den Tisch stellen, wenn nicht vorhanden | ||
|
||
clean: | ||
Kuchen essen | ||
Küche sauber machen und aufräumen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: build/report.pdf | ||
|
||
build/plot.pdf: plot.py data.txt | build | ||
python plot.py # savefig('build/plot.pdf') | ||
|
||
build/report.pdf: report.tex build/plot.pdf | build | ||
lualatex --output-directory=build report.tex | ||
|
||
build: | ||
mkdir -p build | ||
|
||
clean: | ||
rm -rf build | ||
|
||
.PHONY: all clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
all: report.pdf # convention | ||
|
||
plot.pdf: plot.py data.txt | ||
python plot.py | ||
|
||
report.pdf: report.tex | ||
lualatex report.tex | ||
|
||
report.pdf: plot.pdf # add prerequisite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build/file.pdf: FORCE plots... tabellen... | ||
TEXINPUTS=build: \ | ||
max_print_line=1048576 \ | ||
latexmk \ | ||
--lualatex \ | ||
--output-directory=build \ | ||
--interaction=nonstopmode \ | ||
--halt-on-error \ | ||
file.tex | ||
|
||
FORCE: | ||
|
||
.PHONY: FORCE all clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
clean: | ||
rm plot.pdf report.pdf |