aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-05-05 16:52:32 +0200
committerSébastien Dailly <sebastien@dailly.me>2024-05-05 16:52:32 +0200
commitbf88a0d0b0d3f03320ad3cc52eed7c7087ea1f3c (patch)
tree5a46d0a2dff91d02151b73d4b4879e492c52400a
parent780981c08e69048107bd6d9674559d250b92283c (diff)
Updated makefiles
-rwxr-xr-xexample_1/Makefile47
-rwxr-xr-xmodel_1/Makefile47
-rwxr-xr-xmodel_2/Makefile51
-rwxr-xr-xmodel_3/Makefile49
-rwxr-xr-xmodel_4/Makefile51
-rwxr-xr-xmodel_5/Makefile47
-rwxr-xr-xmodel_6/Makefile41
-rwxr-xr-xmodel_7/Makefile1
-rwxr-xr-xmodel_8/Makefile1
9 files changed, 7 insertions, 328 deletions
diff --git a/example_1/Makefile b/example_1/Makefile
index 99eb4e8..25786c6 100755
--- a/example_1/Makefile
+++ b/example_1/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_1/Makefile b/model_1/Makefile
index 99eb4e8..25786c6 100755
--- a/model_1/Makefile
+++ b/model_1/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_2/Makefile b/model_2/Makefile
index ae2f58e..25786c6 100755
--- a/model_2/Makefile
+++ b/model_2/Makefile
@@ -1,50 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_3/Makefile b/model_3/Makefile
index c078875..25786c6 100755
--- a/model_3/Makefile
+++ b/model_3/Makefile
@@ -1,48 +1 @@
-TEX=xelatex
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_4/Makefile b/model_4/Makefile
index ae2f58e..25786c6 100755
--- a/model_4/Makefile
+++ b/model_4/Makefile
@@ -1,50 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_5/Makefile b/model_5/Makefile
index c02fab5..25786c6 100755
--- a/model_5/Makefile
+++ b/model_5/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex) )
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=extarticle --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_6/Makefile b/model_6/Makefile
index 170dd32..25786c6 100755
--- a/model_6/Makefile
+++ b/model_6/Makefile
@@ -1,40 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-
-PDFS = $(SRC:.rst=.pdf)
-
-all: $(PDFS)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex) )
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=extarticle --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex | tmp
- $(TEX) -output-directory tmp $<
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_7/Makefile b/model_7/Makefile
index 05631bf..25786c6 100755
--- a/model_7/Makefile
+++ b/model_7/Makefile
@@ -1,2 +1 @@
include ../common/Makefile.common
-TEX=lualatex
diff --git a/model_8/Makefile b/model_8/Makefile
index 091ac60..d77d559 100755
--- a/model_8/Makefile
+++ b/model_8/Makefile
@@ -1,5 +1,4 @@
include ../common/Makefile.common
-TEX=lualatex
tmp/%.tex: %.rst $(INCLUDED_TEX) $(SOURCES) | tmp
$$(command -v rst2latex rst2latex.py | head -n 1) \