1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#
# Targets which don't generate files should be listed as dependencies
# of the special target .PHONY
#
.PHONY: install install_dvi install_ps install_html
.PHONY: clean
#
# This should be the first rule. It will create a document without
# installing it.
#
default:: install
# Note that LaTeX should be run three times to resolve references
$(TARGET_DVI): $(TEX) $(SUBTEX)
echo $(srcdir)
TEXINPUTS=$(TEXINPUTS); export TEXINPUTS; \
BIBINPUTS=$(TEXINPUTS); export BIBINPUTS; \
$(LATEX) $<; $(BIBTEX) $(MAN); $(LATEX) $<; $(LATEX) $<
$(TARGET_PS): $(DVI)
$(DVIPS) -o $@ $<
$(TARGET_HTML): $(TEX) $(SUBTEX)
TEXINPUTS=$(TEXINPUTS); export TEXINPUTS; \
$(LATEX2HTML) -tmp /tmp -dir $(currdir)/html -external_file $(currdir)/$(<F:%.tex=%) -mkdir -local_icons $<
#
# do installations
#
install:: install_dvi install_ps install_html
ifdef TARGET_DVI
install_dvi:: $(TARGET_DVI)
$(MKDIRS) $(dvidir)
$(INSTALL_DATA) $(TARGET_DVI) $(dvidir)
endif
ifdef TARGET_PS
install_ps:: $(TARGET_PS)
$(MKDIRS) $(psdir)
$(INSTALL_DATA) $(TARGET_PS) $(psdir)
endif
ifdef TARGET_HTML
install_html:: $(TARGET_HTML)
$(?F:%.html=$(MKDIRS) $(htmldir)/%;)
$(?F:%.html= CDIR=%; $(INSTALL_DATA) $(currdir)/html/* $(htmldir)/$$CDIR;)
endif
#
# clean up
#
realclean:: dviclean psclean htmlclean
-rm -f *.aux *.log *.toc *.bbl
-rm -rf html
clean:: dviclean psclean htmlclean
dviclean:
-rm -f *.dvi
psclean:
-rm -f *.ps
htmlclean:
-rm -rf $(TARGET_HTML:%.html=%)
#
# keep the configuration information and makefiles up-to-date
#
top_srcdir = @top_srcdir@
mysrcdir = @srcdir@
# this is checked from the documentation subdirs, so we need two-levels up
top_objdir = ../..
$(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
cd $(top_srcdir) && autoconf
$(top_objdir)/config.status: $(top_srcdir)/configure
cd $(top_objdir) && ./config.status --recheck
Makefile: $(mysrcdir)/Makefile.in $(top_objdir)/config.status
cd $(top_objdir) && CONFIG_FILES=doc/Makefile ./config.status
../MakeVars: $(top_srcdir)/doc/MakeVars.in $(top_objdir)/config.status
cd $(top_objdir) && CONFIG_FILES=doc/MakeVars ./config.status
../MakeRules: $(top_srcdir)/doc/MakeRules.in $(top_objdir)/config.status
cd $(top_objdir) && CONFIG_FILES=doc/MakeRules ./config.status
|