/* * NAME * latex - construct a LaTeX document * * DESCRIPTION * This cookbook defines how to construct a LaTeX document. * * It is currently quite simplistic, it doesn't parse any files, * and compiles LaTeX files with a single pass. * * VARIABLES * all targets of the all recipe * me name of the project. override when result is * not of the pattern foldername => foldername/me.ext * ext file extension of the resulting file (.pdf is default, * could be .dvi, depending on the project) * tex_source tex files on which the build depends on * dot_clean names of temporary files which are created buring build * * RECIPES * all: construct the targets defined in [all]. * clean: remove the files named in [dot_clean]. * clobber: remove the files name in [dot_clean] and [all]. * * MANIFEST: cookbook for constructing LaTeX */ #pragma once if [not [defined me]] then me = [entryname [dir [pathname x]]]; /* the extension of the result */ ext = .pdf; /* the name of the result */ all = [me][ext]; /* the source files used to build */ tex_source = [glob *.tex]; if [not [defined dot_clean]] then { /* default temporary file names */ dot_clean = *.aux *.log *.toc; } /* first target: all, used when no other specified */ all: [all] { set default; } /* build the resulting document, depending on the source files */ [all]: [tex_source] { pdflatex [me].tex; } clean: { rm -f [dot_clean] set clearstat; } clobber: clean { rm -f [all] set clearstat; }