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
- Added cleaning for temporary PDFs.
master
1 parent
f8d8f08
commit
c2bcf983e7e1752dd19ee5afcd7128b55d7cfb49
nstanger
authored
on 19 Feb 2009
Patch
Showing
1 changed file
make-includes/build_misc_rules.make
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_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 $(IMGDIR)/*-tmp.pdf 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
################################################################################ # # 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
Show line notes below