X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Makefile;h=3583e98035dd3f5dab58f8eb25e11dfd909a4564;hb=c979d8e477cde0da0e4ed7accbdf68066f3fa04e;hp=3e4ba3710dddbbfa36b19583f2965126d68902dc;hpb=258947e263dc68d972e704b02b4a8b6b1c3d4b1c;p=phdru.name%2Fphdru.name.git diff --git a/Makefile b/Makefile index 3e4ba37..3583e98 100644 --- a/Makefile +++ b/Makefile @@ -1,44 +1,57 @@ # Makefile. # -# This file is a part of phd.pp.ru homepage/blog/news generator scripts. -# Author: Oleg BroytMann . -# Copyright: (C) 2006 PhiloSoft Design. +# This file is a part of phdru.name homepage/blog/news generator scripts. -# __version__ = "$Revision$"[11:-2] -# __revision__ = "$Id$" -# __date__ = "$Date$"[7:-2] -# __author__ = "Oleg Broytmann " -# __copyright__ = "Copyright (C) 2006 PhiloSoft Design" +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2006-2017 PhiloSoft Design" -%.html: %.tmpl - @(umask 022; PYTHONPATH=.; export PYTHONPATH; cheetah fill --nobackup $<) +.SUFFIXES: # Clear the suffix list +.SUFFIXES: .py .tmpl .html -.PHONY: phd.pp.ru -phd.pp.ru: phd_pp_ru.py news blog html +%.py: %.tmpl + umask 022; cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@ -phd_pp_ru.py: phd_pp_ru.tmpl - @(umask 022; cheetah compile --nobackup $<) +%.html: %.tmpl + 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 >$@ -.PHONY: news -news: ../htdocs/phd.pp.ru/news.tmpl ../htdocs/phd.pp.ru/Russian/news.tmpl +.PHONY: fast +fast: news html -../htdocs/phd.pp.ru/news.tmpl: news_en - @(umask 022; PYTHONPATH=.; export PYTHONPATH; ./make-news.py en '' ../htdocs/phd.pp.ru/news.tmpl) -../htdocs/phd.pp.ru/Russian/news.tmpl: news_ru - @(umask 022; PYTHONPATH=.; export PYTHONPATH; ./make-news.py ru Russian ../htdocs/phd.pp.ru/Russian/news.tmpl) +.PHONY: all +all: phdru.name + + +.PHONY: phdru.name +phdru.name: news blog .PHONY: blog -blog: - @./reindex_blog_ru +blog: phd_site.py atom_10.py rss_20.py + ./reindex_blog_ru + $(MAKE) html -templates = $(shell find ../htdocs/phd.pp.ru -type f -name \*.tmpl -print) +allfiles = $(shell find ../htdocs/phdru.name -type f ! -name sitemap.xml -print) +templates = $(shell find ../htdocs/phdru.name -type f -name \*.tmpl -print) htmls = $(patsubst %.tmpl,%.html,$(templates)) .PHONY: html -html: $(htmls) +html: phd_site.py $(htmls) sitemap + + +.PHONY: news +news: atom_10.py rss_20.py + (umask 022; PYTHONPATH=. ./make-news.py en ../htdocs/phdru.name && ./make-news.py ru ../htdocs/phdru.name/Russian) + + +SITEMAP = ../htdocs/phdru.name/sitemap.xml + +.PHONY: sitemap +sitemap: $(SITEMAP) + +$(SITEMAP): $(allfiles) + sitemap_gen.py --config=sitemaps/phdru.name-config.xml