]> git.phdru.name Git - phdru.name/phdru.name.git/blob - Makefile
Fix(phd.py): Change URL for Lurk
[phdru.name/phdru.name.git] / Makefile
1 # Makefile.
2 #
3 # This file is a part of phdru.name homepage/blog/news generator scripts.
4
5 # __author__ = "Oleg Broytman <phd@phdru.name>"
6 # __copyright__ = "Copyright (C) 2006-2017 PhiloSoft Design"
7
8
9 .SUFFIXES: # Clear the suffix list
10 .SUFFIXES: .py .tmpl .html
11
12
13 %.py: %.tmpl
14         umask 022; cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@
15
16 %.html: %.tmpl
17         umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -f utf-8 -t koi8-r >$@
18
19
20 .PHONY: fast
21 fast: news html
22
23
24 .PHONY: all
25 all: phdru.name
26
27
28 .PHONY: phdru.name
29 phdru.name: news blog
30
31
32 .PHONY: blog
33 blog: phd_site.py atom_10.py rss_20.py
34         ./reindex_blog_ru
35         $(MAKE) html
36
37
38 allfiles = $(shell find ../htdocs/phdru.name -type f ! -name sitemap.xml -print)
39 templates = $(shell find ../htdocs/phdru.name -type f -name \*.tmpl -print)
40 htmls = $(patsubst %.tmpl,%.html,$(templates))
41
42 .PHONY: html
43 html: phd_site.py $(htmls) sitemap
44
45
46 .PHONY: news
47 news: atom_10.py rss_20.py
48         (umask 022; PYTHONPATH=. ./make-news.py en ../htdocs/phdru.name && ./make-news.py ru ../htdocs/phdru.name/Russian)
49
50
51 SITEMAP = ../htdocs/phdru.name/sitemap.xml
52
53 .PHONY: sitemap
54 sitemap: $(SITEMAP)
55
56 $(SITEMAP): $(allfiles)
57         sitemap_gen.py --config=sitemaps/phdru.name-config.xml