I thought that I had done this
[libresoc-isa-manual.git] / libresoc-isa-manual / powerpc-add / build / Makefile
1 #=======================================================================
2 # Makefile for generating LaTeX documents
3 #-----------------------------------------------------------------------
4 #
5 # This is a simple makefile for generating LaTeX documents. It will
6 # run bibtex, generate eps from xfig figures, and make pdfs. The
7 # makefile supports builds in non-source directories: just make a
8 # build directory, copy the makefile there, and change the srcdir
9 # variable accordingly.
10 #
11 # Note that the makefile assumes that the default dvips/ps2pdfwr
12 # commands "do the right thing" for fonts in pdfs. This is true on
13 # Athena/Linux and Fedora Core but is not true for older redhat installs ...
14 #
15 # At a minimum you should just change the main variable to be
16 # the basename of your toplevel tex file. If you use a bibliography
17 # then you should set the bibfile variable to be the name of your
18 # .bib file (assumed to be in the source directory).
19 #
20
21 srcdir = ../src
22
23 docs_with_bib = power-spec
24 docs_without_bib =
25
26 srcs = $(wildcard $(srcdir)/*.tex)
27 figs = $(wildcard $(srcdir)/figs/*)
28 bibs = $(srcdir)/power-spec.bib
29
30 #=======================================================================
31 # You shouldn't need to change anything below this
32 #=======================================================================
33
34 PDFLATEX := TEXINPUTS=$(srcdir): pdflatex -interaction=nonstopmode -halt-on-error
35 BIBTEX := BIBINPUTS=$(srcdir): bibtex
36
37 default : pdf
38
39 #------------------------------------------------------------
40 # PDF
41
42 pdfs_with_bib = $(addsuffix .pdf, $(docs_with_bib))
43 pdfs_without_bib = $(addsuffix .pdf, $(docs_without_bib))
44 pdfs = $(pdfs_with_bib) $(pdfs_without_bib)
45
46 pdf : $(pdfs)
47 .PHONY: pdf open
48
49 open: $(pdfs)
50 open $(pdfs)
51
52 $(pdfs_with_bib): %.pdf: $(srcdir)/%.tex $(srcs) $(figs) $(bibs)
53 $(PDFLATEX) $*
54 $(BIBTEX) $*
55 $(PDFLATEX) $*
56 $(PDFLATEX) $*
57
58 $(pdfs_without_bib): %.pdf: $(srcdir)/%.tex $(srcs) $(figs)
59 $(PDFLATEX) $*
60 $(PDFLATEX) $*
61
62 junk += $(pdfs) *.aux *.log *.bbl *.blg *.toc *.out
63
64 #------------------------------------------------------------
65 # Other Targets
66
67 clean :
68 rm -rf $(junk) *~ \#*