stephane-adjemian.fr/Makefile

55 lines
2.2 KiB
Makefile

.PHONY: all publish push assets clean serve
all: publish assets clean
OS := $(shell uname -s)
ARCH := $(shell uname -p)
ifeq ($(OS), Linux)
EMACS=emacs
endif
ifeq ($(OS),Darwin)
ifeq ($(ARCH), arm)
EMACS=/opt/homebrew/bin/emacs
else
EMACS=/usr/local/opt/emacs
endif
endif
publish:
@EMACS --batch --no-init --load publish.el --funcall org-publish-all
sed -i '' -e 's/<pre class="src src-python">/<pre><code class="language-python">/g' ./output/posts/simulation-du-modele-de-solow/index.html
sed -i '' -e 's/<\/pre>/<\/code><\/pre>/g' ./output/posts/simulation-du-modele-de-solow/index.html
sed -i '' -e 's/<pre class="src src-python">/<pre><code class="language-python">/g' ./output/posts/modele-de-solow/index.html
sed -i '' -e 's/<\/pre>/<\/code><\/pre>/g' ./output/posts/modele-de-solow/index.html
sed -i '' -e 's/<pre class="src src-python">/<pre><code class="language-python">/g' ./output/posts/representer-graphiquement-une-serie-temporelle-du-pib/index.html
sed -i '' -e 's/<\/pre>/<\/code><\/pre>/g' ./output/posts/representer-graphiquement-une-serie-temporelle-du-pib/index.html
sed -i '' -e 's/<pre class="src src-python">/<pre><code class="language-python">/g' ./output/posts/donnees-mankiw-romer-weil-1992/index.html
sed -i '' -e 's/<\/pre>/<\/code><\/pre>/g' ./output/posts/donnees-mankiw-romer-weil-1992/index.html
assets:
@rsync --recursive -avz assets/fonts output
@rsync --recursive -avz assets/fontawesome output
@rsync --recursive -avz assets/css output
@rsync --recursive -avz assets/highlight output
@rsync --recursive -avz assets/dynare output
@rsync --recursive -avz assets/papers output
@rsync --recursive -avz assets/thesis output
@rsync --recursive -avz assets/oldies output
@rsync assets/stepan.gpg-pub.asc output
@rsync assets/favicon.ico output
clean:
@rm -rf output/posts/.ltx
@rm -rf output/posts/representation-ma-du-processus-ar2/.ltx
@rm -rf output/posts/simulation-du-modele-de-solow/.ltx
@rm -rf output/posts/modele-de-solow/.ltx
@rm -rf output/posts/fonction-de-production-ces/.ltx
@rm -rf output/posts/donnees-mankiw-romer-weil-1992/.ltx
push: publish assets clean
@rsync --recursive -avz --progress output/* puck:/home/www/stephane-adjemian.fr
serve: publish assets clean
@cd output; python3 -m http.server