################################################################################ # # File: $Id$ # # Template makefile for building a particular content file for a document. # Place a copy of this file in the directory containing the content file, # and modify as appropriate. The makefile should be called with the name # of a specific content file as target. It will then check whether there # are any prerequisites to that file that may have changed, and rebuild # them if necessary.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 document's # makefile. # # Note that the ONLY mode of operation for this makefile is to be called # from the makefile for a particular document, with the name of a specific # content file as the target. This makefile cannot be easily executed # standalone! This is because the content directory can exist at a # relatively arbitrary location within the paper's directory hierarchy. We # therefore don't know where to look, relative to the current directory, # to find the local include directory, and thus cannot provide a # meaningful value for the variable LOCAL_HANDBOOK_INCLUDE. The value of # LOCAL_HANDBOOK_INCLUDE must therefore be passed in from the calling # environment. # ################################################################################ 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. Since we don't know our current location in the paper's # directory hierarchy, this has to be defined by the makefile's calling # environment. It's an error not to define this variable. # GLOBAL_HANDBOOK_INCLUDE?=$(error The environment variable GLOBAL_HANDBOOK_INCLUDE has not been defined) LOCAL_HANDBOOK_INCLUDE?=$(error The environment variable LOCAL_HANDBOOK_INCLUDE has not been defined) ################################################################################ # # Include standard variables and rules for building content files. (Mainly # oriented towards graphics generation.) # include $(GLOBAL_HANDBOOK_INCLUDE)/build_content_rules.make ################################################################################ # # Add custom rules below here, as necessary. Rules should ensure that they # at least touch their targets. #