/
Makefile
50 lines (33 loc) · 1.32 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
PELICAN=/usr/bin/env pelican
PELICANOPTS=None
BASEDIR=$(PWD)
INPUTDIR=$(BASEDIR)/src
OUTPUTDIR=$(BASEDIR)/2013-2014
CONFFILE=$(BASEDIR)/pelican.conf.py
THEME=pelican-courseboot
SSH_HOST=web
SSH_TARGET_DIR=markbetnel.com/courses/labscience
DROPBOX_DIR=~/Dropbox/Public/
help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make clean remove the generated files '
@echo ' make all html ssh_upload '
@echo ' make html (re)generate the web site '
@echo ' ssh_upload upload the web site using SSH '
@echo ' '
all: html ssh_upload git
html: clean $(OUTPUTDIR)/index.html
@echo 'Done'
git:
git status
@echo 'COMMIT CHANGES TO THE REPO!!!!!'
$(OUTPUTDIR)/%.html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) -t $(THEME)
clean:
rm -fr $(OUTPUTDIR)
mkdir $(OUTPUTDIR)
ssh_upload: $(OUTPUTDIR)/index.html
scp -r $(OUTPUTDIR)/* web:$(SSH_TARGET_DIR)
.PHONY: html help clean ftp_upload ssh_upload dropbox_upload github