Newer
Older
Handbook / makefile-templates / Makefile.section
################################################################################
#
# File: $Id$
#
# Template makefile for building a complete section of the handbook (e.g.,
# Tutorials). Place a copy of this file in the directory for each section,
# and modify as appropriate. The default makefile rebuilds all the
# documents within that section, using recursive make calls to each
# document. Most of the work is done by the include files, and should
# cater for almost all cases. However, if custom rules are needed for a
# section, they can be appended to the end of the section's makefile.
#
################################################################################


SHELL=/bin/sh


################################################################################
#
# Set up paths to makefile include directories.
#
# GLOBAL_HANDBOOK_INCLUDE is the global include directory in the "Shared"
# hierarchy, and should ideally be defined as an environment variable.
# It's an error not to define this variable.
#
# LOCAL_HANDBOOK_INCLUDE is the local include directory for this
# particular paper, and is defined relative to the current execution
# directory. We are assuming a fixed directory structure here! We can't
# really do this as an environment variable because the full path will be
# different for each paper, and we can't use the variables from
# paper_variables.make to set the path, because that file is in the
# include directory! <head spins> We will, however, allow for the
# possibility of someone wanting to define this as an environment variable
# by making it a conditional assignment.
#
GLOBAL_HANDBOOK_INCLUDE?=$(error The environment variable GLOBAL_HANDBOOK_INCLUDE has not been defined)

export LOCAL_HANDBOOK_INCLUDE?=$(shell cd ../..; pwd)/make-includes


################################################################################
#
# Include standard variables and rules for building a section.
#
include $(GLOBAL_HANDBOOK_INCLUDE)/build_section_rules.make


################################################################################
#
# Add custom rules below here, as necessary. Add files to be deleted to the
# variables below, as appropriate.
#
# WEB_CLEAN_FILES+=
# PRINT_CLEAN_FILES+=
# ALL_CLEAN_FILES+=