I am using a Makefile for generating a document from its tex source. The whole project consisting of own input files (.tex,.bib,.eps, ...) and non-pre-installed static input files (cls, sty, bst) is kept under version control (svn) for colloborative writing. I try to avoid messing up the main folder and use subdirectories for output and different kinds of input files.
All files which are not available within standard texlive should be in the repository to allow everyone a simple
svn checkout and
make to create the document. My question is: is there any convenient way which allows me to place all .cls,.sty,.bst into a ./texmf folder with in the document tree:
document-folder/.svn/... document-folder/docname.tex document-folder/docname.bib document-folder/graphics/fig-... document-folder/texmf/<...>.cls document-folder/output/docname.pdf document-folder/output/docname.aux document-folder/output/...
The Makefile looks like this
LATEX := pdflatex ODIR := ./output LATEXOPTS:= --output-dir=$(ODIR) $(TEXFILE).pdf: $(TEXFILE).tex $(TEXFILE).bib $(LATEX) $(LATEXOPTS) $(TEXFILE).tex
Following solution works but as colloborators have to adjust environment variables every time or their
.bashrc for this project, I am not really happy about it:
$ export TEXINPUTS=".:./texmf:~/texmf:$TEXINPUTS" $ make
Changing environment variables within a Makefile is not possible as far as I know.