# Produce pdf output from LaTeX source # Copyright (C) 2008-2010 W. Trevor King # # This file is part of ChemDB. # # ChemDB is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # ChemDB is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with ChemDB. If not, see . # exposed targets : # all : generate each output file and call view # view : call '$(PDF_VIEWER) main.pdf &' to see the pdf file # clean : semi-clean and remove the $(GENERATED_FILES) as well # semi-clean : remove all intermediate $(TEMP_FILES) used during generation # # pdf : generate the pdf file (Portable Document Format) # Non image source files MAIN_SOURCE_FILES = main.tex *.tex NFPA_704_SOURCE_FILES = nfpa_704.tex nfpa_704.sty # Files removed on clean or semi-clean TEMP_FILES = *[.]aux *[.]log *[.]out *[.]bak # Files generated by Python PYTHON_GENERATED_FILES = *_data.tex inventory_title.tex main.tex # Files removed only on clean GENERATED_FILES = *.pdf $(PYTHON_GENERATED_FILES) PDF_VIEWER = xpdf # you can also try evince, acroread, 'xpdf -view H', etc. ## Big targets all : pdf view # html dvi view view : pdf $(PDF_VIEWER) main.pdf & clean : semi-clean rm -rf $(GENERATED_FILES) semi-clean : rm -f $(TEMP_FILES) ## Mid-level indirection targets pdf : main.pdf nfpa_704.pdf ## The meat of the generation # generate the pdf output directly with pdflatex main.pdf : $(MAIN_SOURCE_FILES) pdflatex -interaction=batchmode -draftmode $< pdflatex -interaction=batchmode $< nfpa_704.pdf : $(NFPA_704_SOURCE_FILES) pdflatex -interaction=batchmode -draftmode $< pdflatex -interaction=batchmode $<