annotate Makefile @ 77:92846a71739f pelican_comment_system

The changes were merged to the default branch.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 06 Jan 2016 16:12:07 +0100
parents 3b69622879c9
children 6dc02dba2c17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1 PY=python
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 PELICAN=pelican
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 PELICANOPTS=
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 BASEDIR=$(CURDIR)
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 INPUTDIR=$(BASEDIR)/content
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 OUTPUTDIR=$(BASEDIR)/output
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 CONFFILE=$(BASEDIR)/pelicanconf.py
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 PUBLISHCONF=$(BASEDIR)/publishconf.py
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 FTP_HOST=localhost
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12 FTP_USER=anonymous
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 FTP_TARGET_DIR=/
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14
5
48e0e2d8babd proper settings for make_rsync_upload
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
15 SSH_HOST=xanthippe
0
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 SSH_PORT=22
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 SSH_USER=dirk
5
48e0e2d8babd proper settings for make_rsync_upload
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
18 SSH_TARGET_DIR=/var/www/htdocs/blog
0
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
20 S3_BUCKET=my_s3_bucket
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
22 DROPBOX_DIR=~/Dropbox/Public/
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
23
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
24 help:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
25 @echo 'Makefile for a pelican Web site '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26 @echo ' '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27 @echo 'Usage: '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
28 @echo ' make html (re)generate the web site '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
29 @echo ' make clean remove the generated files '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
30 @echo ' make regenerate regenerate files upon modification '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
31 @echo ' make publish generate using production settings '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
32 @echo ' make serve serve site at http://localhost:8000'
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
33 @echo ' make devserver start/restart develop_server.sh '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
34 @echo ' make stopserver stop local server '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
35 @echo ' ssh_upload upload the web site via SSH '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36 @echo ' rsync_upload upload the web site via rsync+ssh '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 @echo ' github upload the web site via gh-pages '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
38 @echo ' '
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
39
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
40
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
41 html: clean $(OUTPUTDIR)/index.html
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
42
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
43 $(OUTPUTDIR)/%.html:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
44 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
45
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
46 clean:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
47 [ ! -d $(OUTPUTDIR) ] || find $(OUTPUTDIR) -mindepth 1 -delete
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
48
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
49 regenerate: clean
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
50 $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
51
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
52 serve:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
53 cd $(OUTPUTDIR) && $(PY) -m pelican.server
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
54
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
55 devserver:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
56 $(BASEDIR)/develop_server.sh restart
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
57
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
58 stopserver:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
59 kill -9 `cat pelican.pid`
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
60 kill -9 `cat srv.pid`
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
61 @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
62
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
63 publish:
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
64 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
13
3b69622879c9 do not allow access to the generated captcha DB via the web server
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 6
diff changeset
65 cp $(INPUTDIR)/.htaccess $(OUTPUTDIR)
0
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
66
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
67 ssh_upload: publish
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
68 scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
69
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
70 rsync_upload: publish
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
71 rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
72
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
73 github: publish
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
74 ghp-import $(OUTPUTDIR)
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
75 git push origin gh-pages
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
76
4cd9b65e10e4 initial import of the pelican based blog
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
77 .PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload github