Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: R-2-15-branch
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 160 lines (137 sloc) 4.684 kb
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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
#
# ${R_HOME}/doc/Makefile

VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@

top_builddir = ..
subdir = doc

include $(top_builddir)/Makeconf

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
INSTFILES = AUTHORS COPYING COPYRIGHTS CRAN_mirrors.csv \
KEYWORDS KEYWORDS.db THANKS
DISTFILES = Makefile.in Makefile.win $(INSTFILES) R.aux Rscript.1 NEWS.Rd
## NEWS.rds is also installed, but generated later.
NON_SVN_INSTFILES = FAQ RESOURCES
SUBDIRS = html manual

HELP2MAN = perl $(top_srcdir)/tools/help2man.pl

R_EXE = $(top_builddir)/bin/R --vanilla --slave

all: Makefile R docs
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

R: Makefile svnonly
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rdocdir=$(top_builddir)/doc install-sources; \
fi

docs: R.1 NEWS.rds ../NEWS html/NEWS.html ../NEWS.pdf
@(cd manual && $(MAKE) $@)

R.1:
@$(HELP2MAN) --include=$(srcdir)/R.aux --no-info --output=R.1 \
--name="a language for data analysis and graphics" \
$(top_builddir)/bin/R

NEWS.rds: $(srcdir)/NEWS.Rd
@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\"), stages = 'install'), 'NEWS.rds')" | $(R_EXE)

../NEWS: NEWS.rds
@$(ECHO) "creating NEWS"
@$(ECHO) 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "../NEWS")' | $(R_EXE)

html/NEWS.html: NEWS.rds
@$(ECHO) 'options(warn=1);tools:::Rd2HTML_NEWS_in_Rd("NEWS.rds", "html/NEWS.html")' | $(R_EXE)

PDFLATEX = @PDFLATEX@
## needs pdflatex (and more)
## Need LC_COLLATE to work around the misuse of [A-z] in texi2dvi 1.135
## (as reported by MM)
../NEWS.pdf: NEWS.rds
@if test -z "$(PDFLATEX)"; then \
$(ECHO) "'pdflatex' is needed to make NEWS.pdf but is missing on your system."; \
else \
$(ECHO) "creating NEWS.pdf"; \
$(ECHO) 'options(warn=1);tools:::Rd2pdf_NEWS_in_Rd("NEWS.rds", "../NEWS.pdf")' | LC_COLLATE=C $(R_EXE); \
fi


install: install-message installdirs install-sources install-sources2 install-man
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done
installdirs:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rdocdir)"
@$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
install-man: installdirs R.1 Rscript.1
@rm -f $(DESTDIR)$(mandir)/man1/R.1
@$(INSTALL_DATA) R.1 $(DESTDIR)$(mandir)/man1
@rm -f $(DESTDIR)$(mandir)/man1/Rscript.1
@@$(INSTALL_DATA) ${srcdir}/Rscript.1 $(DESTDIR)$(mandir)/man1
install-message:
@$(ECHO) "installing $(subdir) ..."
## installed from srcdir, including to builddir
install-sources:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rdocdir)"
@for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rdocdir)"; \
done
## installed from builddir
install-sources2: installdirs
@for f in $(NON_SVN_INSTFILES) NEWS.rds; do \
$(INSTALL_DATA) $${f} "$(DESTDIR)$(rdocdir)"; \
done
install-strip: install

uninstall:
@$(ECHO) "uninstalling $(subdir) ..."
@if test -d "$(DESTDIR)$(rdocdir)" \
&& test "`cd \"$(DESTDIR)$(rhome)\"; $(GETWD)`" \
!= "`cd $(top_builddir); $(GETWD)`"; then \
for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done; \
for f in $(INSTFILES) $(NON_SVN_INSTFILES) NEWS.rds; do \
rm -f "$(DESTDIR)$(rdocdir)"/$${f}; \
done; \
rmdir "$(DESTDIR)$(rdocdir)" 2>/dev/null \
|| $(ECHO) " subdir $(DESTDIR)$(subdir) not removed"; \
fi
@rm -f $(DESTDIR)$(mandir)/man1/R.1 $(DESTDIR)$(mandir)/man1/Rscript.1

dvi info pdf::
@(cd manual && $(MAKE) $@)

mostlyclean:
clean:
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@); \
done
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES) R.1; \
fi
-@rm -f NEWS.rds
distclean: clean
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(NON_SVN_INSTFILES) ../NEWS; \
fi
-@rm -f Makefile R.1
maintainer-clean: distclean


svnonly:
@if test -f "$(srcdir)/FAQ" ; then \
if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(NON_SVN_INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} .; \
done \
fi \
fi

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
@for f in FAQ RESOURCES ; do \
cp -p $${f} $(distdir)/$${f}; \
done
@for d in $(SUBDIRS); do \
test -d $(distdir)/$${d} \
|| mkdir $(distdir)/$${d} \
|| exit 1; \
chmod 755 $(distdir)/$${d}; \
(cd $${d} && $(MAKE) distdir) \
|| exit 1; \
done
Something went wrong with that request. Please try again.