git clone https://github.com/wch/r-source
cd r-source
tools/rsync-recommended
./configure
- arch/manjaro Linuxでほぼ何もしていない状況だと、以下のようなことが確認される。PDFができていないのは、PDFを作るアプリか何かを入れていないからだと思う
R is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation directory: /usr/local
C compiler: gcc -g -O2
Fortran 77 compiler: f95 -g -O2
C++ compiler: g++ -g -O2
C++11 compiler: g++ -std=c++11 -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Interfaces supported: X11
External libraries: readline, curl
Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
Options enabled: shared BLAS, R profiling
Capabilities skipped:
Options not enabled: memory profiling
Recommended packages: yes
configure: WARNING: you cannot build PDF versions of the R manuals
configure: WARNING: you cannot build PDF versions of vignettes and help pages
#
# ${R_HOME}/Makefile
srcdir = .
top_srcdir = .
top_builddir = .
include $(top_builddir)/Makeconf
GIT = `if [ -d "$(top_builddir)/.git" ]; then echo "git"; fi`
distdir = $(PACKAGE)-$(VERSION)
INSTFILES = COPYING
NON_SVN_INSTFILES = SVN-REVISION
DISTFILES = $(INSTFILES) \
ChangeLog INSTALL README VERSION VERSION-NICK \
Makeconf.in Makefile.in Makefile.fw \
config.site configure configure.ac
SUBDIRS = m4 tools doc etc share src tests
SUBDIRS_WITH_NO_BUILD = po
all: Makefile Makeconf R docs recommended vignettes javaconf
recommended: stamp-recommended
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $@
Makeconf: $(srcdir)/Makeconf.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $@
ACLOCAL_M4 = aclocal.m4
## NB: this is duplicated in m4/Makefile.in
ACINCLUDE_DEPENDENCIES = \
m4/R.m4 \
m4/bigendian.m4 \
m4/cairo.m4 \
m4/clibs.m4 \
m4/codeset.m4 \
m4/cxx_11.m4 \
m4/gettext.m4 m4/gettext-lib.m4 \
m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4 m4/ltsugar.m4 m4/lt~obsolete.m4 \
m4/stat-time.m4
CONFIGURE_DEPENDENCIES = $(srcdir)/VERSION
config.status: $(srcdir)/configure
@$(SHELL) ./config.status --recheck
$(srcdir)/configure: # $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
@BD=`pwd`; cd $(srcdir) && $(AUTOCONF) -B $${BD}
$(ACLOCAL_M4): $(srcdir)/configure.ac acinclude.m4
@BD=`pwd`; cd $(srcdir) && $(ACLOCAL) --output=$${BD}/$@ -I $${BD}
acinclude.m4: $(srcdir)/configure.ac $(ACINCLUDE_DEPENDENCIES)
@(cd $(srcdir) && cat $(ACINCLUDE_DEPENDENCIES)) > $@
LIBTOOL_DEPS = tools/ltmain.sh
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
R: Makefile svnonly
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
done; \
fi
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) R) || exit 1; \
done
@test -f src/library/stamp-docs || \
$(ECHO) "you should 'make docs' now ..."
docs: R FORCE
-@(cd doc && $(MAKE) $@)
-@(cd src/library && $(MAKE) $@)
FORCE:
stamp-recommended: R docs
@(cd src/library/Recommended && $(MAKE))
## One of the grid vignettes requires lattice
vignettes: stamp-recommended
@(cd src/library && $(MAKE) $@)
## This needs packages built, hence 'R' dependence on 'javaconf'
## javareconf gets remade often.
stamp-java : etc/javaconf $(srcdir)/src/scripts/javareconf.in
@$(ECHO) "configuring Java ..."
@-bin/R CMD javareconf
@touch stamp-java
javaconf: R
@$(MAKE) stamp-java
install install-strip: installdirs svnonly
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done
@for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rhome)"; \
done
@for f in $(NON_SVN_INSTFILES); do \
$(INSTALL_DATA) $${f} "$(DESTDIR)$(rhome)"; \
done
# $(MAKE) -f $(srcdir)/Makefile.fw top_srcdir=$(top_srcdir) $@
svnonly:
@if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \
(cd doc/manual && $(MAKE) front-matter html-non-svn) ; \
touch non-tarball ; \
(cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \
| sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \
| cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \
if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \
$(ECHO) "ERROR: not an svn checkout"; \
exit 1; \
fi; \
$(SHELL) $(top_srcdir)/tools/move-if-change SVN-REVISION-tmp SVN-REVISION ; \
rm -f SVN-REVISION-tmp ; \
else \
if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(NON_SVN_INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
done \
fi \
fi
libR_la = libR$(R_DYLIB_EXT)
#libR_la = libR.a
install-libR:
@if test -f lib$(R_ARCH)/$(libR_la); then $(MAKE) install-libR-exists; fi
install-libR-exists:
@$(MKINSTALLDIRS) "$(DESTDIR)${libdir}"
@$(INSTALL_DATA) -m755 lib$(R_ARCH)/$(libR_la) "$(DESTDIR)${libdir}"
uninstall-libR:
@rm -f "$(DESTDIR)${libdir}/$(libR_la)"
installdirs:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rhome)"
uninstall:
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@for f in $(INSTFILES) $(NON_SVN_INSTFILES); do \
rm -f "$(DESTDIR)$(rhome)/$${f}"; \
done
@rm -rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
@rmdir "$(DESTDIR)$(rhome)" 2>/dev/null \
|| $(ECHO) " dir $(DESTDIR)$(rhome) not removed"
@rm -f "$(DESTDIR)${libdir}/libR$(R_DYLIB_EXT)"
mostlyclean: clean
clean:
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
distclean: clean
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@rm -f po/Makefile
-@rm -rf bin include lib library modules gnome
@if test -f non-tarball ; then \
rm -f $(NON_SVN_INSTFILES) non-tarball doc/FAQ doc/RESOURCES doc/html/resources.html doc/html/NEWS.html; \
fi
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(NON_SVN_INSTFILES); \
rm -rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
fi
-@rm -rf libconftest.dSYM
-@rm -f Makeconf Makefile Makefile.bak Makefrag.* \
config.cache config.log config.status libtool stamp-java \
$(ACLOCAL_M4) acinclude.m4 $(distdir).tar.gz
maintainer-clean: distclean
@$(ECHO) "This command is intended for maintainers to use; it"
@$(ECHO) "deletes files that may need special rules to rebuild"
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
-@(cd $(srcdir) && rm -rf autom4te.cache)
dist: dist-unix
dist-unix: distdir
-chmod -R a+r $(distdir)
-chmod -R go-w $(distdir)
distname=`$(srcdir)/tools/GETDISTNAME`; \
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
if test $(distdir) != $${dirname} ; then \
mv $(distdir) $${dirname}; \
fi ; \
GZIP=$(GZIP) $(TAR) czf $${distname}.tar.gz $${dirname}; \
rm -rf $${dirname}
dist-win:
distdir: $(DISTFILES) vignettes
@rm -rf $(distdir)
@mkdir $(distdir)
@-chmod 755 $(distdir)
@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 $(NON_SVN_INSTFILES) ; 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
@for d in $(SUBDIRS_WITH_NO_BUILD); do \
((cd $(srcdir); $(TAR) -c -f - $(DISTDIR_TAR_EXCLUDE) $${d}) \
| (cd $(distdir); $(TAR) -x -f -)) \
|| exit 1; \
done
@for d in grid parallel utils; do \
mkdir -p $(distdir)/src/library/$${d}/inst/doc; \
cp library/$${d}/doc/*.pdf $(distdir)/src/library/$${d}/inst/doc; \
done
@(cd $(distdir); tools/link-recommended)
info pdf:
-@(cd doc && $(MAKE) $@)
install-info install-pdf:
-@(cd doc/manual && $(MAKE) $@)
uninstall-info uninstall-pdf:
-@(cd doc/manual && $(MAKE) $@)
install-tests:
-@(cd tests && $(MAKE) $@)
-@(cd src/library && $(MAKE) $@)
uninstall-tests:
-@(cd src/library && $(MAKE) $@)
-@(cd tests && $(MAKE) $@)
check check-devel check-all check-recommended:
@(cd tests && $(MAKE) $@)
reset-recommended:
@(cd src/library/Recommended && $(MAKE) clean)
TAGS:
- このあとすぐmakeするのが普通のインストールだが、githubからの取得はRの公式配布ではないので、少し工夫がいる。こちらにあるように、以下のようにする
./configure
(cd doc/manual && make front-matter html-non-svn)
echo -n 'Revision: ' > SVN-REVISION
git log --format=%B -n 1 \
| grep "^git-svn-id" \
| sed -E 's/^git-svn-id: https:\/\/svn.r-project.org\/R\/[^@]*@([0-9]+).*$/\1/' \
>> SVN-REVISION
echo -n 'Last Changed Date: ' >> SVN-REVISION
git log -1 --pretty=format:"%ad" --date=iso | cut -d' ' -f1 >> SVN-REVISION
make
- これでうまくいくのかと思いきや、svn関係のエラーが出るので、こちらにある別の方法:「githubからとってきたけれど、svnでとったと『騙る』」作戦を次のようにする
# Set it up with svn.
# Prefix should match remote repo name with a trailing slash
git svn init --prefix=origin/ -s https://svn.r-project.org/R/
# Do 'git svn fetch' to fetch changes from the SVN repository.
# This will update the git repo, but not change the current checked-out commit.
# The first time will take a long time because it needs to match
# git commits with svn commits.
git svn fetch
# This does the same as a fetch, but also updates the current checked-out
# files to the latest revision on the branch. Unlike a fetch, it won't add
# new branches from svn to the git repository.
git svn rebase
./configure
make
#
# ${R_HOME}/Makefile
srcdir = .
top_srcdir = .
top_builddir = .
include $(top_builddir)/Makeconf
GIT = `if [ -d "$(top_builddir)/.git" ]; then echo "git"; fi`
distdir = $(PACKAGE)-$(VERSION)
INSTFILES = COPYING
NON_SVN_INSTFILES = SVN-REVISION
DISTFILES = $(INSTFILES) \
ChangeLog INSTALL README VERSION VERSION-NICK \
Makeconf.in Makefile.in Makefile.fw \
config.site configure configure.ac
SUBDIRS = m4 tools doc etc share src tests
SUBDIRS_WITH_NO_BUILD = po
all: Makefile Makeconf R docs recommended vignettes javaconf
recommended: stamp-recommended
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $@
Makeconf: $(srcdir)/Makeconf.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $@
ACLOCAL_M4 = aclocal.m4
## NB: this is duplicated in m4/Makefile.in
ACINCLUDE_DEPENDENCIES = \
m4/R.m4 \
m4/bigendian.m4 \
m4/cairo.m4 \
m4/clibs.m4 \
m4/codeset.m4 \
m4/cxx_11.m4 \
m4/gettext.m4 m4/gettext-lib.m4 \
m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4 m4/ltsugar.m4 m4/lt~obsolete.m4 \
m4/stat-time.m4
CONFIGURE_DEPENDENCIES = $(srcdir)/VERSION
config.status: $(srcdir)/configure
@$(SHELL) ./config.status --recheck
$(srcdir)/configure: # $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
@BD=`pwd`; cd $(srcdir) && $(AUTOCONF) -B $${BD}
$(ACLOCAL_M4): $(srcdir)/configure.ac acinclude.m4
@BD=`pwd`; cd $(srcdir) && $(ACLOCAL) --output=$${BD}/$@ -I $${BD}
acinclude.m4: $(srcdir)/configure.ac $(ACINCLUDE_DEPENDENCIES)
@(cd $(srcdir) && cat $(ACINCLUDE_DEPENDENCIES)) > $@
LIBTOOL_DEPS = tools/ltmain.sh
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
R: Makefile svnonly
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
done; \
fi
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) R) || exit 1; \
done
@test -f src/library/stamp-docs || \
$(ECHO) "you should 'make docs' now ..."
docs: R FORCE
-@(cd doc && $(MAKE) $@)
-@(cd src/library && $(MAKE) $@)
FORCE:
stamp-recommended: R docs
@(cd src/library/Recommended && $(MAKE))
## One of the grid vignettes requires lattice
vignettes: stamp-recommended
@(cd src/library && $(MAKE) $@)
## This needs packages built, hence 'R' dependence on 'javaconf'
## javareconf gets remade often.
stamp-java : etc/javaconf $(srcdir)/src/scripts/javareconf.in
@$(ECHO) "configuring Java ..."
@-bin/R CMD javareconf
@touch stamp-java
javaconf: R
@$(MAKE) stamp-java
install install-strip: installdirs svnonly
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@) || exit 1; \
done
@for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} "$(DESTDIR)$(rhome)"; \
done
@for f in $(NON_SVN_INSTFILES); do \
$(INSTALL_DATA) $${f} "$(DESTDIR)$(rhome)"; \
done
# $(MAKE) -f $(srcdir)/Makefile.fw top_srcdir=$(top_srcdir) $@
svnonly:
@if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \
(cd doc/manual && $(MAKE) front-matter html-non-svn) ; \
touch non-tarball ; \
(cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \
| sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \
| cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \
if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \
$(ECHO) "ERROR: not an svn checkout"; \
exit 1; \
fi; \
$(SHELL) $(top_srcdir)/tools/move-if-change SVN-REVISION-tmp SVN-REVISION ; \
rm -f SVN-REVISION-tmp ; \
else \
if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(NON_SVN_INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
done \
fi \
fi
libR_la = libR$(R_DYLIB_EXT)
#libR_la = libR.a
install-libR:
@if test -f lib$(R_ARCH)/$(libR_la); then $(MAKE) install-libR-exists; fi
install-libR-exists:
@$(MKINSTALLDIRS) "$(DESTDIR)${libdir}"
@$(INSTALL_DATA) -m755 lib$(R_ARCH)/$(libR_la) "$(DESTDIR)${libdir}"
uninstall-libR:
@rm -f "$(DESTDIR)${libdir}/$(libR_la)"
installdirs:
@$(MKINSTALLDIRS) "$(DESTDIR)$(rhome)"
uninstall:
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@for f in $(INSTFILES) $(NON_SVN_INSTFILES); do \
rm -f "$(DESTDIR)$(rhome)/$${f}"; \
done
@rm -rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
@rmdir "$(DESTDIR)$(rhome)" 2>/dev/null \
|| $(ECHO) " dir $(DESTDIR)$(rhome) not removed"
@rm -f "$(DESTDIR)${libdir}/libR$(R_DYLIB_EXT)"
mostlyclean: clean
clean:
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
distclean: clean
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@rm -f po/Makefile
-@rm -rf bin include lib library modules gnome
@if test -f non-tarball ; then \
rm -f $(NON_SVN_INSTFILES) non-tarball doc/FAQ doc/RESOURCES doc/html/resources.html doc/html/NEWS.html; \
fi
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(NON_SVN_INSTFILES); \
rm -rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
fi
-@rm -rf libconftest.dSYM
-@rm -f Makeconf Makefile Makefile.bak Makefrag.* \
config.cache config.log config.status libtool stamp-java \
$(ACLOCAL_M4) acinclude.m4 $(distdir).tar.gz
maintainer-clean: distclean
@$(ECHO) "This command is intended for maintainers to use; it"
@$(ECHO) "deletes files that may need special rules to rebuild"
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
-@(cd $(srcdir) && rm -rf autom4te.cache)
dist: dist-unix
dist-unix: distdir
-chmod -R a+r $(distdir)
-chmod -R go-w $(distdir)
distname=`$(srcdir)/tools/GETDISTNAME`; \
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
if test $(distdir) != $${dirname} ; then \
mv $(distdir) $${dirname}; \
fi ; \
GZIP=$(GZIP) $(TAR) czf $${distname}.tar.gz $${dirname}; \
rm -rf $${dirname}
dist-win:
distdir: $(DISTFILES) vignettes
@rm -rf $(distdir)
@mkdir $(distdir)
@-chmod 755 $(distdir)
@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 $(NON_SVN_INSTFILES) ; 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
@for d in $(SUBDIRS_WITH_NO_BUILD); do \
((cd $(srcdir); $(TAR) -c -f - $(DISTDIR_TAR_EXCLUDE) $${d}) \
| (cd $(distdir); $(TAR) -x -f -)) \
|| exit 1; \
done
@for d in grid parallel utils; do \
mkdir -p $(distdir)/src/library/$${d}/inst/doc; \
cp library/$${d}/doc/*.pdf $(distdir)/src/library/$${d}/inst/doc; \
done
@(cd $(distdir); tools/link-recommended)
info pdf:
-@(cd doc && $(MAKE) $@)
install-info install-pdf:
-@(cd doc/manual && $(MAKE) $@)
uninstall-info uninstall-pdf:
-@(cd doc/manual && $(MAKE) $@)
install-tests:
-@(cd tests && $(MAKE) $@)
-@(cd src/library && $(MAKE) $@)
uninstall-tests:
-@(cd src/library && $(MAKE) $@)
-@(cd tests && $(MAKE) $@)
check check-devel check-all check-recommended:
@(cd tests && $(MAKE) $@)
reset-recommended:
@(cd src/library/Recommended && $(MAKE) clean)
TAGS: