Index of /~tzafrir/latex_make/latex_make-0.2.0

      Name                    Last modified       Size  Description

[DIR] Parent Directory 01-Jul-2002 14:35 - [TXT] Makefile 07-Feb-2002 20:39 1k [TXT] TODO 07-Feb-2002 20:39 1k [TXT] latex_make 07-Feb-2002 20:39 1k [TXT] latex_make.mak 07-Feb-2002 20:39 25k [DIR] sample/ 07-Feb-2002 20:39 - [TXT] set_makefile 07-Feb-2002 20:39 2k

This directory contains a makefile for building documents with LaTeX

INSTALLATION
""""""""""""

run 'make install' . 

This will copy the scripts (latex_make and set_makefile) to a directory
<PREFIX>/bin and latex_make.mak to <PREFIX>/share/latex_make/
<PREFIX> is by default $HOME

You can override those defaults by setting either PREFIX , BINDIR or
PROJECT_DATA_DIR in the 'make' command. e.g:

  make PREFIX=/usr/local install

Alternatively, copy those files manually, and edit the script 
latex_make to reflect the location of latex_make.mak .

SETTING UP A "PROJECT"
""""""""""""""""""""""
1. Create a new LaTeX document, sat doc.tex and place it in some 
   directory

2. Create a makefile for this project. This makefile *should* contains
   the following:

     DOCUMENT=doc

   (assuming that the name of the document is doc.tex). alternatively,
   you may use: 
     
     latex_make vars >doc.mak

   and edit the DOCUMENT line (this will give you a big file with many
   options demonstrated and remmed-out)

3. run 'set_makefile doc'

USAGE
"""""
'latex_make help' for usage instructions. The basics are:
 
- latex_make: updates the default target (by default - dvi)
- latex_make view: view the dvi file (create it, if necessary)
- latex_make ps: create a postscript copy
- latex_make tgz: pack sources to a tarball
- latex_make copy: copy some selected targets to a (possibly) remote
                   directory
- latex_make mail MAIL_RCPT=user@server.ac.il
             Send some files (as mime attachments) to specified user

You can have multiple projects in the same directory. Only one of them 
can be 'active' (be the one symlinked by Makefile). You can change 
active project using 'set_makefile' or explicitly use 'make -f doc.mak'
instead of 'make' .

Troubleshooting
"""""""""""""""
1. grab a rifle
2. aim
3. shoot

latex_make simply runs make. any command-line parameter is passed to
make. Useful switches of make:

  -n : don't do anything. Just print what you'll do

  And if you want to fool make:
  
  -o <file>: assume <file> is Older, and don't remake it
  -W <file>: Assume that <file> is new and needs remaking

That asiade, the makefile will only work with GNU make (gmake) and not with
BSD make. If your default 'make' is not GNU make, you will get a strange error
message (probably because of the 'ifdefs'). 
use 'gmake' (edit latex_make, if necessary).


Another problem is that if you run 'latex_make' and latex fails in the 
middle, but still outputs an incomplete DVI file, the next time you run
'make', you will get "nothing to do for 'all'".
In that case use either 'make clean' to delete the created DVI file 
(although it is a bit dangerous) or 'make latex' a couple of times.

Also be warned that VARS_DESCRIPTION is quite sensitive to changes. After
modifying it, always make sure that it still works. For instance, you can
forget to quote ('\') a '#' character and get a wierd error message.

If you get many warnings about "circular dependency" it is possible
that the value of DOCUMENT in the makefile is incorrect. Make sure that
$(DOCUMENT).tex indeed exists (e.g: if you set DOCUMENT=doc, make sure
that doc.tex exists)