]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - Makefile
Fix(Makefile): All generated files depend on `phd.py`
[phdru.name/phdru.name.git] / Makefile
index 862279fa93403fcf52dfcc39d2b579ee0f8de67b..f3909120a78746264df3adb891932a4a96471345 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 
 %.py: %.tmpl
 
 
 %.py: %.tmpl
-       umask 022; cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@
+       umask 022; python2.7 `which cheetah` compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@
 
 
-%.html: %.tmpl
-       umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -c -f utf-8 -t koi8-r >$@
+%.html: %.tmpl phd.py phd_site.py
+       umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace python2.7 `which cheetah` fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -c -f utf-8 -t koi8-r >$@
 
 
 .PHONY: fast
 
 
 .PHONY: fast
@@ -30,7 +30,7 @@ phdru.name: blog news
 
 
 .PHONY: blog
 
 
 .PHONY: blog
-blog: phd_site.py atom_10.py rss_20.py
+blog: phd.py phd_site.py atom_10.py rss_20.py
        ./reindex_blog_ru
        $(MAKE) html
 
        ./reindex_blog_ru
        $(MAKE) html
 
@@ -40,7 +40,7 @@ templates = $(shell find ../htdocs/phdru.name -type f -name \*.tmpl -print)
 htmls = $(patsubst %.tmpl,%.html,$(templates))
 
 .PHONY: html
 htmls = $(patsubst %.tmpl,%.html,$(templates))
 
 .PHONY: html
-html: phd_site.py $(htmls) special-templates sitemap
+html: phd.py phd_site.py $(htmls) special-templates sitemap
 
 
 .PHONY: news
 
 
 .PHONY: news
@@ -53,7 +53,7 @@ SITEMAP = ../htdocs/phdru.name/sitemap.xml
 .PHONY: sitemap
 sitemap: $(SITEMAP)
 
 .PHONY: sitemap
 sitemap: $(SITEMAP)
 
-$(SITEMAP): $(allfiles)
+$(SITEMAP): $(allfiles) sitemaps/phdru.name-config.xml
        sitemap_gen.py --config=sitemaps/phdru.name-config.xml
 
 
        sitemap_gen.py --config=sitemaps/phdru.name-config.xml