GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
1
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Handbook
Browse code
- Enabled multiple base documents.
master
1 parent
7d6c2a3
commit
b85c6f7049573cd03a32faa1e39adbdefed1b12d
nstanger
authored
on 1 Mar 2010
Patch
Showing
2 changed files
make-includes/build_misc_rules.make
makefile-templates/Makefile.misc
Ignore Space
Show notes
View
make-includes/build_misc_rules.make
################################################################################ # # File: $Id$ # # Standard variables and rules for building a general standalone document # that doesn't fall into any partcular category (such as lecture, tutorial). # The makefile assumes a single document source file. Anything more # complex than this will need to be handled by a custom makefile. # # Altering these definitions will affect ALL MAKEFILES FOR ALL PAPERS!! If # you need to do something specific for a particular paper, include a # custom rule in its makefile. DON'T add it here! # ################################################################################ ################################################################################ # # Include XSLT functions. # include $(TEACHING_SHARED)/Authoring/Handbook/make-includes/xslt_functions.make ################################################################################ # # Required make variables. These should be defined by the calling makefile. # # BASE_NAMES # The base name(s) of the document source file(s). It may be a list, which # enables multiple different documents to be built by the one Makefile. # BASE_PDF # BASE_PDF_2UP # BASE_TEX # BASE_HTML # Lists of various source and target files, all derived from BASE_NAMES. # BASE_NAMES?=$(error The required make variable BASE_NAMES has not been defined. Please set it to the base name(s) of the document source file(s)) BASE_PDF:=$(foreach n,$(BASE_NAMES),$(n).pdf) BASE_PDF_2UP:=$(foreach n,$(BASE_NAMES),$(n)-2up.pdf) BASE_TEX:=$(foreach n,$(BASE_NAMES),$(n).tex) BASE_HTML:=$(foreach n,$(BASE_NAMES),$(n).html) ################################################################################ # # Add standard file suffixes. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_suffixes.make ################################################################################ # # Standard directories. # IMGDIR=images ################################################################################ # # Standard paths. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_paths.make ################################################################################ # # Files to be cleaned by the various "clean" targets. Note that we don't # "tidy" .aux files because they may be needed by the xr package for inter- # document cross references, but won't get regenerated if the final target # PDF files exist. They will be caught by by the "clean" target though. # TIDY_FILES+=*.tmp *.out *.log *.nav *.toc *.snm *.head *.dvi \ *-derived.xml CLEAN_FILES+=*.aux *.pdf *.html ################################################################################ # # Various environment variables. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_environment.make # # List of standard "phony" build targets. # TARGETS+=web print print2up $(BASE_NAMES) # .PHONY: $(TARGETS) ################################################################################ # # Build everything. # all: web print print2up $(BASE_NAMES): %: %.pdf %-2up.pdf %.html ################################################################################ # # Build print version, 1-up or 2-up. # print: $(BASE_PDF) $(BASE_PDF): %.pdf: %.tex $(PRINT_IMAGES) $(PRINT_FILES) $(BASE_TEX): %.tex: %-derived.xml print2up: $(BASE_PDF_2UP) $(BASE_PDF_2UP): %-2up.pdf: %.pdf ################################################################################ # # Build web version. # web: $(BASE_HTML) $(BASE_HTML): %.html: %-derived.xml $(WEB_IMAGES) $(WEB_FILES) ################################################################################ # # Build the test document. # test: test.pdf test.pdf: test.tex ################################################################################ # # Debugging: print the values of the standard variables. # debug: @announce Externally defined variables @echo "TEACHING_SHARED = [$(TEACHING_SHARED)]" @announce Internally defined variables @echo "GLOBAL_HANDBOOK_INCLUDE = [$(GLOBAL_HANDBOOK_INCLUDE)]" @echo "BASE_NAMES = [$(BASE_NAMES)]" @echo "BASE_PDF = [$(BASE_PDF)]" @echo "BASE_PDF_2UP = [$(BASE_PDF_2UP)]" @echo "BASE_TEX = [$(BASE_TEX)]" @echo "BASE_HTML = [$(BASE_HTML)]" @echo "PRINT_IMAGES = [$(PRINT_IMAGES)]" @echo "PRINT_FILES = [$(PRINT_FILES)]" @echo "WEB_IMAGES = [$(WEB_IMAGES)]" @echo "WEB_FILES = [$(WEB_FILES)]" @echo "TIDY_FILES = [$(TIDY_FILES)]" @echo "CLEAN_FILES = [$(CLEAN_FILES)]" @echo "DRAFT = [$(DRAFT)]" @echo "LATEX_OPTS = [$(LATEX_OPTS)]" @echo "TARGETS = [$(TARGETS)]" ################################################################################ # # Clean up: get rid of all the temporary files. # tidy: rm -f $(TIDY_FILES) # # Clean up: get rid of everything except the original source. # clean: tidy rm -f $(CLEAN_FILES) ################################################################################ # # List all "phony" build targets. # targets: @echo "targets: $(TARGETS)" ################################################################################ # # Standard default rules. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_rules.make
################################################################################ # # File: $Id$ # # Standard variables and rules for building a general standalone document # that doesn't fall into any partcular category (such as lecture, tutorial). # The makefile assumes a single document source file. Anything more # complex than this will need to be handled by a custom makefile. # # Altering these definitions will affect ALL MAKEFILES FOR ALL PAPERS!! If # you need to do something specific for a particular paper, include a # custom rule in its makefile. DON'T add it here! # ################################################################################ ################################################################################ # # Include XSLT functions. # include $(TEACHING_SHARED)/Authoring/Handbook/make-includes/xslt_functions.make ################################################################################ # # Required make variables. These should be defined by the calling makefile. # # BASE_NAME # The base name of the document source file. # BASE_NAME?=$(error The required make variable BASE_NAME has not been defined. Please set it to the base name of the document source file) ################################################################################ # # Add standard file suffixes. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_suffixes.make ################################################################################ # # Standard directories. # IMGDIR=images ################################################################################ # # Standard paths. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_paths.make ################################################################################ # # Files to be cleaned by the various "clean" targets. Note that we don't # "tidy" .aux files because they may be needed by the xr package for inter- # document cross references, but won't get regenerated if the final target # PDF files exist. They will be caught by by the "clean" target though. # TIDY_FILES+=*.tmp *.out *.log *.nav *.toc *.snm *.head *.dvi \ *-derived.xml CLEAN_FILES+=*.aux *.pdf *.html ################################################################################ # # Various environment variables. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_environment.make # # List of standard "phony" build targets. # TARGETS+=web print print2up # .PHONY: $(TARGETS) ################################################################################ # # Build everything. # all: web print print2up ################################################################################ # # Build print version, 1-up or 2-up. # print: $(BASE_NAME).pdf $(BASE_NAME).pdf: $(BASE_NAME).tex $(PRINT_IMAGES) $(PRINT_FILES) $(BASENAME).tex: $(BASE_NAME)-derived.xml print2up: $(BASE_NAME)-2up.pdf $(BASE_NAME)-2up.pdf: $(BASE_NAME).pdf ################################################################################ # # Build web version. # web: $(BASE_NAME).html $(BASE_NAME).html: $(BASE_NAME)-derived.xml $(WEB_IMAGES) $(WEB_FILES) ################################################################################ # # Build the test document. # test: test.pdf test.pdf: test.tex ################################################################################ # # Debugging: print the values of the standard variables. # debug: @announce Externally defined variables @echo "TEACHING_SHARED = [$(TEACHING_SHARED)]" @announce Internally defined variables @echo "GLOBAL_HANDBOOK_INCLUDE = [$(GLOBAL_HANDBOOK_INCLUDE)]" @echo "BASE_NAME = [$(BASE_NAME)]" @echo "PRINT_IMAGES = [$(PRINT_IMAGES)]" @echo "PRINT_FILES = [$(PRINT_FILES)]" @echo "WEB_IMAGES = [$(WEB_IMAGES)]" @echo "WEB_FILES = [$(WEB_FILES)]" @echo "TIDY_FILES = [$(TIDY_FILES)]" @echo "CLEAN_FILES = [$(CLEAN_FILES)]" @echo "DRAFT = [$(DRAFT)]" @echo "LATEX_OPTS = [$(LATEX_OPTS)]" @echo "TARGETS = [$(TARGETS)]" ################################################################################ # # Clean up: get rid of all the temporary files. # tidy: rm -f $(TIDY_FILES) # # Clean up: get rid of everything except the original source. # clean: tidy rm -f $(CLEAN_FILES) ################################################################################ # # List all "phony" build targets. # targets: @echo "targets: $(TARGETS)" ################################################################################ # # Standard default rules. # include $(GLOBAL_HANDBOOK_INCLUDE)/standard_rules.make
Ignore Space
Show notes
View
makefile-templates/Makefile.misc
################################################################################ # # File: $Id$ # # Template makefile for building a general document. # ################################################################################ SHELL = /bin/sh ################################################################################ # # Required Environment Variables # # TEACHING_SHARED # This variable specifies the path to the top level of the teaching # shared directory hierarchy (e.g., /path/to/Teaching/Shared). # TEACHING_SHARED?=$(error The required environment variable TEACHING_SHARED has not been defined. It should point to the root level of the shared teaching directory (e.g., /path/to/Teaching/Shared)) ################################################################################ # # Set up paths to makefile include directories. # # GLOBAL_HANDBOOK_INCLUDE is the global include directory in the "Shared" # hierarchy, and is defined relative to the root of that hierarchy. # GLOBAL_HANDBOOK_INCLUDE?=$(TEACHING_SHARED)/Authoring/Handbook/make-includes ################################################################################ # # Clear out the suffixes list. DO NOT ALTER THIS LINE! # .SUFFIXES: # # Add any custom suffixes here (uncomment the line below). # The "standard" suffixes list currently includes: # .svg .pdf .tex .dvi .png .tif .plo .jpg .pict .eps .ps .R # # .SUFFIXES: ################################################################################ # # Define paths for various items here. The "standard" paths currently include: # # vpath %.pdf $(IMGDIR) # vpath %.png $(IMGDIR) # vpath %.tif $(IMGDIR) # vpath %.jpg $(IMGDIR) # vpath %.plo $(IMGDIR) # vpath %.ps $(IMGDIR) # vpath %.eps $(IMGDIR) # vpath %.svg $(IMGDIR) # vpath %.pict $(IMGDIR) # vpath %.R $(IMGDIR) # # There's nothing to stop you adding new paths for these file types. # # vpath foo bar ################################################################################ # # Specify the current paper number. THIS MUST BE DEFINED! # PAPER_NUMBER?=$(error The required variable PAPER_NUMBER has not been defined. Please set it to the correct value for this paper) ################################################################################ # # Specify the base name(s) for the document source file(s). It may be a list. # THIS MUST BE DEFINED! # BASE_NAMES?=$(error The required variable BASE_NAME has not been defined. Please set it to the base name(s) of the document source file(s)) ################################################################################ # # Standard file list variables. # # List of images used in the print version as actual content. # PRINT_IMAGES= # # List of other files used in the print version as actual content. # PRINT_FILES= # # List of images used in the web version as actual content. # WEB_IMAGES= # # List of other files used in the web version as actual content. # WEB_FILES= # # Files to be cleaned by the various "clean" targets. The "standard" values # are currently: # TIDY_FILES=*.tmp *.out *.log *.nav *.toc *.snm *.head *.dvi \ # *-derived.xml # CLEAN_FILES=*.aux *.pdf *.html # # $(TIDY_FILES) is a list of generated intermediate files to clean up. # TIDY_FILES= # # $(CLEAN_FILES) is everything else that might need to be cleaned up. # CLEAN_FILES= ################################################################################ # # Specify LaTeX document options (comma-separated list). The "standard" # value is currently: pdftex,usepdftitle=false,$(DRAFT).If you want to # override the "standard" options, redefine this variable after the # include line just below. # LATEX_OPTS= # # List of "phony" build targets (remember to define rules for # them!). The "standard" list is currently: # all debug test clean tidy targets web print print2up # TARGETS= ################################################################################ # # Add custom variables below here as necessary. # ################################################################################ # # Include standard variables and rules for building miscellaneous documents. # include $(GLOBAL_HANDBOOK_INCLUDE)/build_misc_rules.make ################################################################################ # # Add custom rules below here as necessary. # # If a custom rule has the same target and prerequisite as a default rule, # it overrides the default rule. If you want to replace it with a similar # but different target and prerequisite, cancel the existing rule first, # e.g.: # # %.foo : %.bar
################################################################################ # # File: $Id$ # # Template makefile for building a general document. # ################################################################################ SHELL = /bin/sh ################################################################################ # # Required Environment Variables # # TEACHING_SHARED # This variable specifies the path to the top level of the teaching # shared directory hierarchy (e.g., /path/to/Teaching/Shared). # TEACHING_SHARED?=$(error The required environment variable TEACHING_SHARED has not been defined. It should point to the root level of the shared teaching directory (e.g., /path/to/Teaching/Shared)) ################################################################################ # # Set up paths to makefile include directories. # # GLOBAL_HANDBOOK_INCLUDE is the global include directory in the "Shared" # hierarchy, and is defined relative to the root of that hierarchy. # GLOBAL_HANDBOOK_INCLUDE?=$(TEACHING_SHARED)/Authoring/Handbook/make-includes ################################################################################ # # Clear out the suffixes list. DO NOT ALTER THIS LINE! # .SUFFIXES: # # Add any custom suffixes here (uncomment the line below). # The "standard" suffixes list currently includes: # .svg .pdf .tex .dvi .png .tif .plo .jpg .pict .eps .ps .R # # .SUFFIXES: ################################################################################ # # Define paths for various items here. The "standard" paths currently include: # # vpath %.pdf $(IMGDIR) # vpath %.png $(IMGDIR) # vpath %.tif $(IMGDIR) # vpath %.jpg $(IMGDIR) # vpath %.plo $(IMGDIR) # vpath %.ps $(IMGDIR) # vpath %.eps $(IMGDIR) # vpath %.svg $(IMGDIR) # vpath %.pict $(IMGDIR) # vpath %.R $(IMGDIR) # # There's nothing to stop you adding new paths for these file types. # # vpath foo bar ################################################################################ # # Specify the current paper number. THIS MUST BE DEFINED! # PAPER_NUMBER?=$(error The required variable PAPER_NUMBER has not been defined. Please set it to the correct value for this paper) ################################################################################ # # Specify the base name for the document source. THIS MUST BE DEFINED! # BASE_NAME?=$(error The required variable BASE_NAME has not been defined. Please set it to the base name of the document source) ################################################################################ # # Standard file list variables. # # List of images used in the print version as actual content. # PRINT_IMAGES= # # List of other files used in the print version as actual content. # PRINT_FILES= # # List of images used in the web version as actual content. # WEB_IMAGES= # # List of other files used in the web version as actual content. # WEB_FILES= # # Files to be cleaned by the various "clean" targets. The "standard" values # are currently: # TIDY_FILES=*.tmp *.out *.log *.nav *.toc *.snm *.head *.dvi \ # *-derived.xml # CLEAN_FILES=*.aux *.pdf *.html # # $(TIDY_FILES) is a list of generated intermediate files to clean up. # TIDY_FILES= # # $(CLEAN_FILES) is everything else that might need to be cleaned up. # CLEAN_FILES= ################################################################################ # # Specify LaTeX document options (comma-separated list). The "standard" # value is currently: pdftex,usepdftitle=false,$(DRAFT).If you want to # override the "standard" options, redefine this variable after the # include line just below. # LATEX_OPTS= # # List of "phony" build targets (remember to define rules for # them!). The "standard" list is currently: # all debug test clean tidy targets web print print2up # TARGETS= ################################################################################ # # Add custom variables below here as necessary. # ################################################################################ # # Include standard variables and rules for building miscellaneous documents. # include $(GLOBAL_HANDBOOK_INCLUDE)/build_misc_rules.make ################################################################################ # # Add custom rules below here as necessary. # # If a custom rule has the same target and prerequisite as a default rule, # it overrides the default rule. If you want to replace it with a similar # but different target and prerequisite, cancel the existing rule first, # e.g.: # # %.foo : %.bar
Show line notes below