summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-08-17 05:17:10 +0200
committerache <ache@ache.one>2017-08-17 05:17:10 +0200
commit4d483292bab90796fac57ff1bbdd025219b1c852 (patch)
tree3e40db773c2f876f30e3365c12e98af12cf35014 /makefile
parentAjout des liens sur les logos SVG (diff)
New website prototype
Diffstat (limited to 'makefile')
-rw-r--r--makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..b9e9794
--- /dev/null
+++ b/makefile
@@ -0,0 +1,58 @@
+
+ALL_ARTICLES=$(wildcard article/*.md)
+ALL_ARTICLES_OUT=$(ALL_ARTICLES:.md=.html)
+ALL_ARTICLES_INTRO_OUT=$(ALL_ARTICLES:.md=_intro.html)
+BASE_HTML=left.htm headers.htm articles.htm
+
+all: $(ALL_ARTICLES_OUT) index.html bin/articleFilter bin/introFilter clean
+
+
+bin/articleFilter: src/articleFilter.hs src/Id.hs
+ mkdir -p bin
+ mkdir -p /tmp/articleFilter
+ ghc -dynamic $< -isrc -outputdir /tmp/articleFilter -o $@
+
+bin/introFilter: src/introFilter.hs src/Id.hs
+ mkdir -p bin
+ mkdir -p /tmp/introFilter
+ ghc -dynamic $< -isrc -outputdir /tmp/introFilter -o $@
+
+
+article/%.html: article/%.md bin/articleFilter $(BASE_HTML)
+ pandoc --filter bin/articleFilter $< > ${@:.html=.htm}
+ cat ${@:.html=.htm} | m4 > $@
+
+NUMBERS = 1 2 3 4
+
+article/%_intro.html: article/%.md bin/introFilter
+ pandoc --filter bin/introFilter $< > ${@:.html=.htm}
+ cat ${@:.html=.htm} | m4 -D linkFileNameArticle=${<:.md=.html} > $@
+
+articles.htm: $(ALL_ARTICLES_INTRO_OUT) bin/introFilter
+ cat $(ALL_ARTICLES_INTRO_OUT) > $@
+
+
+
+index.html: index.m4 $(BASE_HTML)
+ m4 $< > $@
+
+left.htm: res/twitterLogo.svg res/mastoLogo.svg res/gitLogo.svg res/acheLogo.svg left.m4
+ m4 left.m4 > left.htm
+
+headers.htm: headers.m4
+ m4 headers.m4 > headers.htm
+
+clean:
+ rm -f $(BASE_HTML)
+ rm -f articles.html
+ rm -f $(ALL_ARTICLES:.md=_intro.htm)
+ rm -f $(ALL_ARTICLES:.md=.htm)
+
+mrproper:
+ rm -f bin/*
+ rm -f index.html
+ rm -f $(ALL_ARTICLES_OUT)
+ rm -f $(ALL_ARTICLES_INTRO_OUT)
+
+
+