What this does is build a simple LaTeX + BibTeX document, and outputs a PDF or a PS document. It is available for download here
For those who don’t know makefiles, here’s a basic rundown of usage:
- Put
latex_makefilein the directory of your document, and rename it toMakefile. - Open up
Makefilein a text editor, set TRG to the name of your document (without the .tex), and setHASBIBtoyesif you have a BibTeX bibliography, ornoif not. - Save and exit your text editor.
- Run
makein the directory of your document. This will spell-check your document, and then generate a PDF file of whatever your document name is.
This is a rather simple makefile, so it should work almost anywhere, as long as the variables are configured.
There are two other modes of operation, instead of the default:
make printalso runs the dvi generated by LaTeX through dvips, which by default sends the generated postscript to the default printer (at least on OS X). I do not expect this to be portable; hack in your own printing functions if you want it.make cleancleans the directory of the clutter left behind by running LaTeX, but it doesn’t remove your source TeX or BibTeX files.
I wrote it on Mac OS 10.4.9 for gmake, with latex, dvipdf, and dvips out of fink. I know that latex is available almost anywhere, and dvipdf is available on Fedora Core and OS X. My FC6 installation only shows dvipdf, so printing support will be iffy.


No Responses to “LaTeX Makefile”
Care to comment?