# # ${R_HOME}/doc/manual/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../.. subdir = doc/manual include $(top_builddir)/Makeconf 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 pkgsrcs = pkg-base.tex pkg-eda.tex pkg-lqs.tex pkg-modreg.tex \ pkg-mva.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) 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 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 dvi: Manual.dvi Reference.dvi Manual.dvi: Manual.tex Version.tex $(mansrcs) $(srcdir)/Rd.sty @echo "Making LaTeX documentation ..." @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 ..." @TEXINPUTS="$(srcdir):$$TEXINPUTS" \ $(LATEX) '\nonstopmode\input{Reference.tex}' @$(MAKEINDEX) Reference @TEXINPUTS="$(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: 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?? *.dvi *.log *.ps *.ps-2 distclean: clean @-rm -f auto Version.tex pkg-*.tex Makefile lib2tex \ ABOUT.tex Manual.tex 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