# # ${R_HOME}/doc/manual/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../.. subdir = doc/manual include $(top_builddir)/Makeconf # set the next to `.' if your LaTeX lacks the ae font package AE=ae distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = Manual.tex.in Reference.tex.in \ plotmath.tex primitive-funs.tex \ writing-Rd.tex Rd.sty lib2tex.in Makefile.in RLIB = $(top_builddir)/library RLIBsrc = $(top_srcdir)/src/library mansrcs = Manual.tex $(srcdir)/writing-Rd.tex \ $(srcdir)/plotmath.tex $(srcdir)/programming.tex \ $(srcdir)/primitive-funs.tex ## FIXME: This should be autogenerated! pkgsrcs = \ pkg-base.tex \ pkg-eda.tex \ pkg-lqs.tex \ pkg-modreg.tex \ pkg-mva.tex \ pkg-nls.tex \ pkg-splines.tex \ pkg-stepfun.tex \ pkg-ts.tex Manparts = Man-1.ps Man-2.ps Man-3.ps Man-4.ps \ Man-5.ps Man-6.ps Man-7.ps Man-8.ps Manbooks = $(Manparts:.ps=.bps) MAKEINFO = makeinfo TEXI2DVI = $(top_srcdir)/tools/texi2dvi .SUFFIXES: .SUFFIXES: .dvi .info .texi all: Makefile R lib2tex dvi Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @cd $(top_builddir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ $(SHELL) ./config.status R: @if [ "$(srcdir)" != "." ]; then \ for f in $(srcdir)/Rd.sty $(srcdir)/Rd2dvi.tex; do \ $(INSTALL_DATA) $$f . ; \ done \ fi lib2tex: $(srcdir)/lib2tex.in $(top_builddir)/config.status @cd $(top_builddir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ $(SHELL) ./config.status @chmod +x $@ Manual.tex: $(srcdir)/Manual.tex.in $(top_builddir)/config.status @cd $(top_builddir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ $(SHELL) ./config.status Reference.tex: $(srcdir)/Reference.tex.in $(top_builddir)/config.status @cd $(top_builddir) && \ CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ $(SHELL) ./config.status .texi.dvi: $(TEXI2DVI) $< .texi.info: $(MAKEINFO) $< dvi: Manual.dvi Reference.dvi R-external.dvi Manual.dvi: Manual.tex Version.tex $(mansrcs) $(srcdir)/Rd.sty @echo "Making LaTeX documentation ..." @$(RM) -f *.aux Manual.toc @TEXINPUTS="$(srcdir):$$TEXINPUTS" \ $(LATEX) '\nonstopmode\input{Manual.tex}' @$(MAKEINDEX) Manual @TEXINPUTS="$(srcdir):$$TEXINPUTS" \ $(LATEX) '\nonstopmode\input{Manual.tex}' Reference.dvi: Reference.tex Version.tex $(pkgsrcs) $(srcdir)/Rd.sty @echo "LaTeX documentation: Reference Index ..." @$(RM) -f *.aux Reference.toc Reference.ind @TEXINPUTS="$(srcdir)/$(AE):$(srcdir):$$TEXINPUTS" \ $(LATEX) '\nonstopmode\input{Reference.tex}' @$(MAKEINDEX) Reference @TEXINPUTS="$(srcdir)/$(AE):$(srcdir):$$TEXINPUTS" \ $(LATEX) '\nonstopmode\input{Reference.tex}' Version.tex: $(top_builddir)/bin/R $(top_builddir)/bin/R --version > $@ pkg-%.tex: FORCE @echo "Collecting components of $@ ..." @cd $(top_builddir)/src/library && \ OPTS="--latex" $(MAKE) PKGS="$*" DOCS ./lib2tex $* FORCE: R-external.dvi: R-external.texi $(srcdir)/texinfo.tex info: R-external.info R-external.info: R-external.texi PDFLATEX = pdflatex PDFTEX = pdftex pdf: Manual.pdf Reference.pdf R-external.pdf Manual.pdf: Manual.tex Version.tex $(mansrcs) $(srcdir)/Rd.sty @echo "Making PDF LaTeX documentation ..." @$(RM) -f *.aux Manual.toc @TEXINPUTS="$(srcdir)/pdf:$(srcdir):$$TEXINPUTS" \ $(PDFLATEX) '\nonstopmode\input{Manual.tex}' @$(MAKEINDEX) Manual @TEXINPUTS="$(srcdir)/pdf:$(srcdir):$$TEXINPUTS" \ $(PDFLATEX) '\nonstopmode\input{Manual.tex}' Reference.pdf: Reference.tex Version.tex $(pkgsrcs) $(srcdir)/Rd.sty @echo "PDF LaTeX documentation: Reference Index ..." @$(RM) -f *.aux Reference.toc Reference.ind @TEXINPUTS="$(srcdir)/pdf:$(srcdir):$$TEXINPUTS" \ $(PDFLATEX) '\nonstopmode\input{Reference.tex}' @$(MAKEINDEX) Reference @TEXINPUTS="$(srcdir)/pdf:$(srcdir):$$TEXINPUTS" \ $(PDFLATEX) '\nonstopmode\input{Reference.tex}' R-external.pdf: R-external.texi @TEXINPUTS="$(srcdir):$$TEXINPUTS" $(PDFTEX) R-external.texi @TEXINPUTS="$(srcdir):$$TEXINPUTS" $(PDFTEX) R-external.texi install: installdirs @echo "Installing doc/manual ..." @for f in `ls $(srcdir)/*.tex $(srcdir)/*.sty`; do \ $(INSTALL_DATA) $$f $(rhome)/doc/manual; \ done installdirs: @$(MKINSTALLDIRS) $(rhome)/doc/manual install-strip: install uninstall: @echo "Uninstalling doc/manual ..." @rm -rf $(rhome)/doc/manual mostlyclean: clean clean: @echo cleaning in doc/manual @if [ "$(srcdir)" != "." ]; then \ rm -f Rd.sty; \ fi @-rm -f *.aux *.toc Manual.i?? Reference.i?? *.log *.out \ *.ps *.ps-2 *.info* @-rm -f R-external.cp R-external.fn R-external.ky R-external.pg \ R-external.tmp R-external.tp R-external.vr distclean: clean @-rm -f auto Version.tex pkg-*.tex Makefile lib2tex \ ABOUT.tex Manual.tex *.pdf *.dvi maintainer-clean: distclean distdir: $(DISTFILES) @for f in $(DISTFILES); do \ test -f $(distdir)/$${f} \ || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \ || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \ done