comments
[nepi.git] / website / Makefile
1 ########## contents
2 ALL_MDS = $(shell git ls-files | grep '\.md$$')
3 # a first, quick and dirty approach is to publish right
4 # in /var/www/html so there's no impact on the httpd config
5 # of course we might have to isolate this underneath at some point
6 PUBLISH_PATH = /var/www/html
7
8 #ALL_PLUGINS = plugins/*.{js,css,html}
9
10 ########## default target
11 all: preview
12
13 preview: prepare index meta convert 
14 # this is what is invoked by restart-website.sh that is crontab'ed
15 install: preview publish
16
17 .PHONY: all preview publish install prepare index meta convert 
18 preview_and_nepiall: prepare index meta nepi_all convert 
19 install_and_nepiall: preview_and_nepiall publish
20
21 .PHONY: preview_and_nepiall install_and_nepiall
22
23 ########## global vars
24 # I am using the custom-made 'nepi' layout
25 # which was 'exported' (copied) from markdown-styles' 'bootstrap3' 
26
27 LAYOUT = ./nepi-layout
28
29 ##########
30 prepare:
31         @[ -d markdown ] || mkdir markdown
32         rsync -av --delete --relative $(ALL_MDS) markdown
33
34 # index.py is hard-wired to output in markdown/
35 index:
36         @[ -d markdown ] || mkdir markdown
37         export LC_ALL=en_US.UTF-8; ./index.py $(ALL_MDS)
38
39 # likewise
40 meta:
41         @[ -d markdown ] || mkdir markdown
42         ./meta.py
43
44 ################################
45
46 # compile status informations  by Nepi check
47 status:
48         @[ -d markdown ] || mkdir markdown
49         ./status.py
50
51 convert: 
52         generate-md --layout $(LAYOUT) --input markdown --output html
53
54 # default is ti publish locally as this runs right from r2lab.inria.fr
55 publish:
56         rsync -av --delete html/ $(PUBLISH_PATH)/
57
58 debug:
59         echo ALL_MDS=$(ALL_MDS)
60
61 clean:
62         rm -rf markdown html
63