1. site, even dynamic, database-driven, etc. should be compiled "off-line" as much as possible. 2. there is "source tree" and "target tree" (the latter is actual content served to the web clients). 3. content separated from presentation as much as possible. basically, all html's generated from simple files containing text and basic html formatting, with all visible and non-visible (like meta tags) decorations added by including different perl modules representing different pages layout (currently there are only two - homepage::simple.pm and homepage::hairy.pm, both derived from homepage::base.pm). data (like list of some items) usually stored in perl hashes. 4. there is a build directory with a top "master" Makefile. build directory repeats partially the structure of the site, for those directories which should be processed not by general rules. files used in top directory and in each "special" directory: 4.1. specials (list of files needed special processing or no processing at all; may be absent) 4.2. rules.mk (build rules) 4.3. build_list_targets (generates list of targets from the list of sources; if this script is absent, one from the top build directory is taken) 5. on each invocation of make: 5.1. list of target files is calculated according to the list of source files and build rules (sort of "reverse makefile processing") 5.2. target tree braught in a sync with source tree (necessary directories created, unnecesary files and directories deleted) 5.3. each file in source tree build according to build rules: html files generated from .phtml or .php, image files are just copied, java classes are compiled, etc. 5.4. all html files are post-processed by a script which does things like converting russian translit to koi8, inserting missing image size attributes, doing some fine html tuning according to my (current) taste (see above), etc.