]> git.phdru.name Git - phdru.name/phdru.name.git/blob - Makefile
Restructured to separate fast and full rebuilding.
[phdru.name/phdru.name.git] / Makefile
1 # Makefile.
2 #
3 # This file is a part of phdru.name homepage/blog/news generator scripts.
4 # Author: Oleg BroytMan <phd@phdru.name>.
5 # Copyright: (C) 2006-2011 PhiloSoft Design.
6
7 # __version__ = "$Revision$"[11:-2]
8 # __revision__ = "$Id$"
9 # __date__ = "$Date$"[7:-2]
10 # __author__ = "Oleg Broytman <phd@phdru.name>"
11 # __copyright__ = "Copyright (C) 2006-2011 PhiloSoft Design"
12
13
14 %.py: %.tmpl
15         umask 022; cheetah compile --nobackup $< && compyle $@
16
17 %.html: %.tmpl
18         umask 022; PYTHONPATH=. cheetah fill --nobackup $<
19
20
21 .PHONY: fast
22 fast: news html
23
24
25 .PHONY: all
26 all: phdru.name
27
28
29 .PHONY: phdru.name
30 phdru.name: news blog
31
32
33 .PHONY: blog
34 blog: atom_10.py rss_20.py
35         ./reindex_blog_ru
36         $(MAKE) html
37
38
39 templates = $(shell find ../htdocs/phdru.name/public_html -type f -name \*.tmpl -print)
40 htmls = $(patsubst %.tmpl,%.html,$(templates))
41
42 .PHONY: html
43 html: phd_site.py $(htmls)
44
45
46 .PHONY: news
47 news: atom_10.py rss_20.py
48         (umask 022; PYTHONPATH=. ./make-news.py en ../htdocs/phdru.name/public_html && ./make-news.py ru ../htdocs/phdru.name/public_html/Russian)