# # file: Makefile # project: homepage # created: pasha may 1 2008 # purpose: top-level wrapper to distinguish between the whole site and separate # file processing # pending: - possibility to build separate directory # - possibility to build separate files in special dirs # - cope with blanks and apostrophes in filenames # # it will be included when processing the top dir; in special subdirs, # the variables defined there would be passed -include ./top.mk # TOP_SRC should be defined in top.mk export TOP_BUILD := $(TOP_SRC)/build# top "build directory" # (containing makefiles, build scripts, etc.) export RULES_MAKEFILE := rules.mk# ################ needed for $(RULES_MAKEFILE)'s ############# export RULES_COMMON := $(TOP_BUILD)/rules-common.mk export SRC := $(subst $(TOP_BUILD),$(TOP_SRC),$(CURDIR)) export TARGET := $(subst $(TOP_SRC),$(TOP_TARGET),$(SRC)) export YAEP := $(TOP_BUILD)/yaep \ --preclude=$(TOP_BUILD)/perl_preclude --conclude=$(TOP_BUILD)/perl_conclude# export HTMLPOSTPROCESS := perl -w -I$(TOP_BUILD) \ $(TOP_BUILD)/htmlpostprocess --webroot=$(TOP_SRC)# ############################################################# # process the whole site (default) site: FORCE $(MAKE) -r -f Makefile.site # process a separate file $(TOP_TARGET)/%: FORCE $(MAKE) -r -f $(RULES_MAKEFILE) $@ .PHONY: site FORCE # end of Makefile