Skip to content
Snippets Groups Projects
Verified Commit 9cf4f5bf authored by orestis.malaspin's avatar orestis.malaspin
Browse files

updated makefile

parent cd5fc63c
No related branches found
No related tags found
No related merge requests found
......@@ -18,50 +18,31 @@ HTMLOPTIONS += -c css/tufte-css/tufte.css
HTMLOPTIONS += --self-contained
HTMLOPTIONS += --mathjax=MathJax.js
CLASS_SOURCES := $(sort $(filter-out README.md, $(wildcard *.md)))
SOURCES := $(filter-out 00_macros.md, $(CLASS_SOURCES))
SOURCES := $(filter-out 08_notes.md, $(CLASS_SOURCES))
all: cours.pdf cours.html
# %.tex: %.md
# pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $<
cours.pdf: 00_macros.md 01_rappel.md 02_optimisation.md 03_integrales.md 04_edo.md 05_fourier.md 06_probas_stats.md 07_remerciements.md 08_notes.md
cours.pdf: $(CLASS_SOURCES)
pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $^ --metadata-file metadata.yaml
cours.html: 00_macros.md 01_rappel.md 02_optimisation.md 03_integrales.md 04_edo.md 05_fourier.md 06_probas_stats.md 07_remerciements.md 08_notes.md
cours.html: $(CLASS_SOURCES)
pandoc -s $(OPTIONS) $(HTMLOPTIONS) -o $@ $^ --metadata-file metadata.yaml
hakyll_gen: 1_Rappel.markdown 2_Optimisation.markdown 3_Integrales.markdown 4_Equation_Differentielles_Ordinaires.markdown 5_Transformees_de_Fourier.markdown 6_Probabilites_et_Statistique.markdown 7_Remerciements.markdown
# macros: 00_macros.md
# sed "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 02_optimisation.md | head -n 1)\n---" $< > $@
1_Rappel.markdown: 00_macros.md 01_rappel.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 01_rappel.md | head -n 1)\nmathjax: on\n---" $@
2_Optimisation.markdown: 00_macros.md 02_optimisation.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 02_optimisation.md | head -n 1)\nmathjax: on\n---" $@
3_Integrales.markdown: 00_macros.md 03_integrales.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 03_integrales.md | head -n 1)\nmathjax: on\n---" $@
4_Equation_Differentielles_Ordinaires.markdown: 00_macros.md 04_edo.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 04_edo.md | head -n 1)\nmathjax: on\n---" $@
5_Transformees_de_Fourier.markdown: 00_macros.md 05_fourier.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 05_fourier.md | head -n 1)\nmathjax: on\n---" $@
6_Probabilites_et_Statistique.markdown: 00_macros.md 06_probas_stats.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 06_probas_stats.md | head -n 1)\nmathjax: on\n---" $@
MARKDOWN := $(patsubst %.md, %.markdown, $(SOURCES))
7_Remerciements.markdown: 00_macros.md 07_remerciements.md 08_notes.md
cat $^ > $@
sed -i "1i ---\ndate: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- 07_remerciements.md | head -n 1)\nmathjax: on\n---" $@
hakyll_gen: $(MARKDOWN)
$(MARKDOWN): %.markdown: 00_macros.md %.md 08_notes.md
$(file >$@,---)
$(file >>$@,\date: $(shell git log --follow -p -1 --format=%cd --date=format:'%Y-%m-%d' -- $(word 2,$^) | head -n 1))
$(file >>$@,mathjax: on)
$(file >>$@,---)
cat $^ >> $@
deploy: all
mkdir -p mti
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment