Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Perl-free installation

git-svn-id: https://svn.r-project.org/R/branches/djm-parl@41524 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
commit 7cc7b9aff006787d03d55567deee28571b650728 1 parent 7dfa8b0
murdoch authored
View
25 doc/manual/Makefile.win
@@ -38,7 +38,7 @@ TEX = tex $(R_TEXOPTS)
MAKEINDEX = LC_ALL=C makeindex
TEXINDEX = LC_ALL=C texindex
ifneq ($(strip $(BUILD)),CROSS)
-RHOME=$(shell ../../src/gnuwin32/Rpwd.exe ../..)
+RHOME?=$(shell ../../src/gnuwin32/Rpwd.exe ../..)
else
RHOME=$(shell $(PERL) ../../src/gnuwin32/pwd.pl ../..)
endif
@@ -287,20 +287,26 @@ version.tex: $(top_srcdir)/VERSION $(top_srcdir)/SVN-REVISION
v="$${v} (`sed -e 1d -e 's/^Last Changed Date: //' $(top_srcdir)/SVN-REVISION`)"; \
echo "$${v}") > $@
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_TOOLS=
+else
+PERL_TOOLS=../../tools/
+endif
+
# bundles such as VR are not unpacked in src/library directly
%-pkg.tex: FORCE
@echo "collecting LaTeX docs for package \`$*' ..."
@if test -f "$(top_srcdir)/library/$*/latex/Rhelp.zip" ; then \
- PERL5LIB=$(RHOME)/share/perl $(PERL) ../../tools/pkg2tex.pl $*; \
+ PERL5LIB=$(RHOME)/share/perl $(PERL) $(PERL_TOOLS)pkg2tex.pl $*; \
else \
if test -d "$(top_srcdir)/src/library/$*" ; then \
- if $(PERL) ../../tools/Rdnewer.pl \
+ if $(PERL) $(PERL_TOOLS)Rdnewer.pl \
"$(top_srcdir)/src/library/$*" "$@"; then \
(cd ../../src/gnuwin32/help && $(MAKE) --no-print-directory RHOME=$(RHOME) latex-$*); \
- PERL5LIB=$(RHOME)/share/perl $(PERL) ../../tools/pkg2tex.pl $*; \
+ PERL5LIB=$(RHOME)/share/perl $(PERL) $(PERL_TOOLS)pkg2tex.pl $*; \
fi \
else \
- PERL5LIB=$(RHOME)/share/perl $(PERL) ../../tools/pkg2tex.pl $*; \
+ PERL5LIB=$(RHOME)/share/perl $(PERL) $(PERL_TOOLS)pkg2tex.pl $*; \
fi \
fi
FORCE:
@@ -341,13 +347,20 @@ R-intro.pdf: R-intro.texi $(texiincludes)
$(PDFTEX) R-intro.texi
$(PDFTEX) R-intro.texi
+
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_FIXED=
+else
+PERL_FIXED=$(top_srcdir)/src/gnuwin32/fixed/
+endif
+
version.texi: Makefile.win $(top_srcdir)/VERSION $(top_srcdir)/SVN-REVISION
@echo "creating $(subdir)/$@"
@(v=`sed 's/\([^ ]*\).*/\1/' $(top_srcdir)/VERSION`; \
echo "@set VERSIONno $${v}" > $@; \
v="$${v} (`sed -e 1d -e 's/^Last Changed Date: //' $(top_srcdir)/SVN-REVISION`)"; \
echo "@set VERSION $${v}" >> $@; \
- rwv=$(shell $(PERL) $(top_srcdir)/src/gnuwin32/fixed/rwver.pl $(top_srcdir)/VERSION); \
+ rwv=$(shell $(PERL) $(PERL_FIXED)rwver.pl $(top_srcdir)/VERSION); \
echo "@set RWVERSION $${rwv}" >> $@ )
@if test "$(R_PAPERSIZE)" = "a4"; then \
echo "@afourpaper" >> $@ ; \
View
8 src/gnuwin32/MakeDll
@@ -69,8 +69,14 @@ else
-include Makevars
endif
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_GNUWIN32=
+else
+PERL_GNUWIN32=$(RHOME)/src/gnuwin32/
+endif
+
$(DLLNAME)_res.rc:
- @PERL5LIB=$(RHOME)/share/perl $(PERL) $(RHOME)/src/gnuwin32/makeDllRes.pl $(DLLNAME) > $@
+ @PERL5LIB=$(RHOME)/share/perl $(PERL) $(PERL_GNUWIN32)makeDllRes.pl $(DLLNAME) > $@
$(DLLNAME)_res.o: $(DLLNAME)_res.rc $(RHOME)/include/Rversion.h
View
21 src/gnuwin32/Makefile
@@ -13,7 +13,7 @@ all:
## must be absolute and space-free paths
ifneq ($(strip $(BUILD)),CROSS)
-RHOME = $(shell ./Rpwd.exe ../..)
+RHOME ?= $(shell ./Rpwd.exe ../..)
PKGD = $(shell ./Rpwd.exe "$(PKGDIR)")
R_EXE = $(RHOME)/bin/rterm.exe
else
@@ -23,7 +23,13 @@ endif
REXE = $(R_EXE) --vanilla --slave
-RPREFIX = $(shell $(PERL) fixed/rwver.pl ../../VERSION)
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_FIXED=
+else
+PERL_FIXED=fixed/
+endif
+
+RPREFIX = $(shell $(PERL) $(PERL_FIXED)rwver.pl ../../VERSION)
FULLVERSION=`cat ../../VERSION`
@@ -90,14 +96,18 @@ front-ends/Rpwd.exe:
## watch out: R.dll and Rblas.dll depend on each other.
## so build import library R.dll then Rblas.dll
-rbuild:
+rbuild: ../../bin
+ @$(MAKE) --no-print-directory -C ../scripts -f Makefile.win
@$(MAKE) --no-print-directory fixfiles
@$(MAKE) --no-print-directory -C ../include -f Makefile.win
- @$(MAKE) --no-print-directory -C ../scripts -f Makefile.win
@$(MAKE) --no-print-directory libRblas.dll.a
@$(MAKE) --no-print-directory ../../bin/R.dll
@$(MAKE) --no-print-directory Rblas CHTML
@$(MAKE) --no-print-directory front-ends COPYRIGHTS rmodules Rcode
+
+../../bin:
+ @$(MKDIR) -p ../../bin
+ @$(CP) bin/* ../../bin
## used to build skeletal versions of packages, enough to run
## package tools to install them properly
@@ -406,7 +416,7 @@ distclean: clean clean-recommended
@for d in $(EXTRA_DIRS); do \
$(MAKE) -C ../extra/$${d} -f Makefile.win distclean; \
done
- $(RM) -r ../../bin ../../include ../../lib ../../library ../../modules
+ $(RM) -r ../../include ../../lib ../../library ../../modules
$(RM) ../include/config.h ../include/iconv.h ../include/psignal.h \
../include/Rconfig.h ../include/Rversion.h ../include/Rmath.h \
../include/libintl.h
@@ -438,6 +448,7 @@ distclean: clean clean-recommended
$(RM) -r .vignettes # it gets left behind sometimes
$(RM) -r ../../share/locale
$(RM) XINSTALL # from cross-building
+ $(RM) -r ../../bin
$(RM) Rpwd.exe # do this last of all
veryclean: distclean
View
2  src/gnuwin32/Makefile.packages
@@ -7,7 +7,7 @@ RVER = @RVER@
## must be absolute and space-free paths
ifneq ($(strip $(BUILD)),CROSS)
-RHOME = $(shell ./Rpwd.exe ../..)
+RHOME ?= $(shell ./Rpwd.exe ../..)
PKGD = $(shell ./Rpwd.exe "$(PKGDIR)")
R_EXE = $(RHOME)/bin/rterm.exe
else
View
10 src/gnuwin32/MkRules
@@ -17,6 +17,10 @@ endif
# an alternative is to use -g here, if the debugger supports only stabs.
G_FLAG=-gdwarf-2
+# Define this if you want to use parl.exe from Rtools rather than
+# a full Perl installation
+#USE_PARL = YES
+
## ============== configuration macros for building R ===================
# Comment out if the msvcrt.dll malloc/free is required.
@@ -147,7 +151,13 @@ LINKER=$(BINPREF)gcc $(MINGW32LDFLAG)
MKDIR=mkdir
NM=$(BINPREF)nm
OBJC=$(BINPREF)gcc $(MINGW32CFLAG)
+
+# Note that due to a bug in parl, a full path to it must be given.
+ifeq ($(strip $(USE_PARL)),YES)
+PERL=$(RHOME)/bin/parl $(RHOME)/share/perl/scripts.par
+else
PERL=perl
+endif
RANLIB=$(BINPREF)ranlib
RESCOMP=$(BINPREF)windres
RM=rm -f
View
41 src/gnuwin32/fixed/Makefile
@@ -1,6 +1,12 @@
+
include ../MkRules
R_HOME = ../../..
+ifneq ($(strip $(BUILD)),CROSS)
+RHOME?=$(shell ../Rpwd.exe $(R_HOME))
+else
+RHOME=$(shell $(PERL) ../pwd.pl $(R_HOME))
+endif
all: profiles fixhtml fixbin fixetc fixshare ../XINSTALL svnonly
@@ -37,6 +43,9 @@ fixshare: share/tests.mk
$(MKDIR) -p $(R_HOME)/share/make
$(CP) -p $^ $(R_HOME)/share/make/wintests.mk
@$(ECHO) done > fixshare
+
+fixparl: ../../../share/perl/scripts.par
+ @$(ECHO) done > fixparl
svnonly:
@$(MAKE) -C ../../../doc/manual -f Makefile.win svnonly
@@ -46,12 +55,40 @@ clean:
distclean:
-$(R_HOME)/doc/html/search/SearchEngine.html: $(R_HOME)/doc/html/search/SearchEngine-head.html $(R_HOME)/doc/html/search/SearchEngine-foot.html $(R_HOME)/doc/KEYWORDS.db
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_TOOLS=
+else
+PERL_TOOLS=../tools/
+endif
+
+$(R_HOME)/doc/html/search/SearchEngine.html: fixparl $(R_HOME)/doc/html/search/SearchEngine-head.html $(R_HOME)/doc/html/search/SearchEngine-foot.html $(R_HOME)/doc/KEYWORDS.db
(cd $(R_HOME)/doc; \
cat html/search/SearchEngine-head.html > html/search/SearchEngine.html; \
- $(PERL) ../tools/keywords2html.pl KEYWORDS.db >> html/search/SearchEngine.html; \
+ $(PERL) $(PERL_TOOLS)keywords2html.pl KEYWORDS.db >> html/search/SearchEngine.html; \
cat html/search/SearchEngine-foot.html >> html/search/SearchEngine.html)
../XINSTALL: bin/INSTALL
ifeq ($(strip $(BUILD)),CROSS)
@$(SED) -e 's/"MINGW"/"CROSS"/' $< > $@
endif
+
+FIXED_SCRIPTS=bin/INSTALL bin/REMOVE bin/Rd2txt bin/SHLIB
+
+OTHER_SCRIPTS=rwver.pl ../../../share/perl/build-help.pl \
+ ../../../share/perl/build-help-windows.pl \
+ ../../../share/perl/massage-Examples.pl \
+ ../../../tools/pkg2tex.pl ../../../tools/Rdnewer.pl \
+ ../../../tools/keywords2html.pl \
+ ../installer/JRins.pl ../installer/WIXins.pl \
+ ../makeDllRes.pl ../pwd.pl \
+ ../../../bin/Rdconv ../../../bin/Rprof ../../../bin/Sd2Rd \
+ ../../../bin/build ../../../bin/check ../../../bin/massage-Examples
+
+# This target updates an existing scripts.par. To create a new one, install
+# the PAR::packer package in Perl, and then run the last line instead of the others
+
+../../../share/perl/scripts.par: fixbin $(OTHER_SCRIPTS)
+ @$(MKDIR) -p script
+ cp $(FIXED_SCRIPTS) $(OTHER_SCRIPTS) script
+ zip -q -r $@ script
+ @$(RM) -rf script
+# PERL5LIB="../../../share/perl" pp.bat -p -o $@ $(FIXED_SCRIPTS) $(OTHER_SCRIPTS)
View
17 src/gnuwin32/front-ends/rcmdfn.c
@@ -68,6 +68,8 @@ void rcmdusage (char *RCMD)
"for usage information for each command.\n\n");
}
+static char * perlScripts[] = { "INSTALL", "REMOVE", "SHLIB", "build", "check",
+ "Rprof", "Rdconv", "Rd2txt", "Sd2Rd", NULL };
#define CMD_LEN 10000
int rcmdfn (int cmdarg, int argc, char **argv)
{
@@ -300,10 +302,21 @@ int rcmdfn (int cmdarg, int argc, char **argv)
} else if (!strcmp(".bat", p + strlen(p) - 4)) strcpy(cmd, "");
else if (!strcmp(".exe", p + strlen(p) - 4)) strcpy(cmd, "");
else {
- strcpy(cmd, "perl ");
- strcat(cmd, RHome); strcat(cmd, "/bin/");
+ for (i=0; perlScripts[i] && stricmp(p, perlScripts[i]); i++);
+ if (perlScripts[i]) {
+ strcpy(cmd, RHome);
+ strcat(cmd, "/bin/parl ");
+ strcat(cmd, RHome);
+ strcat(cmd, "/share/perl/scripts.par ");
+ strcat(cmd, perlScripts[i]);
+ p[0] = '\0';
+ } else {
+ strcpy(cmd, "perl ");
+ strcat(cmd, RHome); strcat(cmd, "/bin/");
+ }
}
strcat(cmd, p);
+ fprintf(stderr, cmd);
}
} else
snprintf(cmd, CMD_LEN, "%s/bin/Rterm.exe", getRHOME());
View
36 src/gnuwin32/help/Makefile
@@ -1,43 +1,54 @@
+R_HOME = ../../..
+ifneq ($(strip $(BUILD)),CROSS)
+RHOME?=$(shell ../Rpwd.exe $(R_HOME))
+JUNK="R_HOME=$(R_HOME) RHOME=$(RHOME)"
+else
+RHOME=$(shell $(PERL) ../pwd.pl $(R_HOME))
+endif
+
+include $(RHOME)/src/gnuwin32/MkRules
+
# default target builds indices
DOS=# -dosnames # for file-name mapping
-PERL=R_OSTYPE=windows perl
+
+ifeq ($(strip $(USE_PARL)),YES)
+BUILDHELP=R_OSTYPE=windows $(PERL) build-help-windows.pl
+else
+BUILDHELP=PERL5LIB=$(RHOME)/share/perl R_OSTYPE=windows $(PERL) $(R_HOME)/share/perl/build-help-windows.pl
+endif
+
CAT=cat
CP=cp
RM=rm
MKDIR=mkdir
-R_HOME = ../../..
-RHOME=$(shell perl ../pwd.pl ../../..)
+
PKGDIR=../../library
RLIB=$(RHOME)/library
CHM=
index-%:
@if test -d $(PKGDIR)/$*/man ; then \
- PERL5LIB=$(RHOME)/share/perl $(PERL) \
- $(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
+ $(BUILDHELP) ${DOS} \
-index $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi
pkg-% help-%:
@if test -d $(PKGDIR)/$*/man ; then \
- PERL5LIB=$(RHOME)/share/perl $(PERL) \
- $(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
+ $(BUILDHELP) ${DOS} \
$(HELPTYPES) $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi
pkgfake-%:
@if test -d $(PKGDIR)/$*/man ; then \
- PERL5LIB=$(RHOME)/share/perl $(PERL) \
- $(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
+ $(BUILDHELP) ${DOS} \
-txt -latex $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi
chm-%:
@if test -d $(PKGDIR)/$*/man ; then \
if ! test -d $(PKGDIR)/$*/chm ; then \
- PERL5LIB=$(RHOME)/share/perl $(PERL) \
- $(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
+ $(BUILDHELP) ${DOS} \
-chm $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi; \
$(MAKE) --no-print-directory -C $(PKGDIR)/$*/chm \
@@ -58,8 +69,7 @@ ziponlyhelp-%:
latex-%:
@$(MAKE) --no-print-directory -C $(RLIB)/$* \
-f $(RHOME)/src/gnuwin32/help/Makefile PKG=$* unzipit
- PERL5LIB=$(RHOME)/share/perl $(PERL) \
- $(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
+ $(BUILDHELP) ${DOS} \
-latex $(PKGDIR)/$* $(RLIB)
clean:
View
14 src/gnuwin32/installer/Makefile
@@ -2,6 +2,12 @@
include ../MkRules
R_HOME = ../../..
+ifneq ($(strip $(BUILD)),CROSS)
+RHOME?=$(shell ../Rpwd.exe $(R_HOME))
+else
+RHOME=$(shell $(PERL) ../pwd.pl $(R_HOME))
+endif
+
include $(R_HOME)/share/make/vars.mk
## use next to install other packages from main library
@@ -16,8 +22,14 @@ HelpStyle = 1
## Default internet connection, 0=Standard, 1=Internet2
Internet = 0
+ifeq ($(strip $(USE_PARL)),YES)
+PERL_FIXED=
+else
+PERL_FIXED=../fixed/
+endif
+
FULLVERSION=`cat ../../../VERSION`
-RPREFIX = $(shell $(PERL) ../fixed/rwver.pl $(R_HOME)/VERSION)
+RPREFIX = $(shell $(PERL) $(PERL_FIXED)rwver.pl $(R_HOME)/VERSION)
LIBFILES = $(foreach i, $(R_PKGS_BASE) $(R_PKGS_RECOMMENDED) $(EXTRA_PKGS), $(R_HOME)/library/$i) $(R_HOME)/library/R.css
INFO_FILES = COPYING NEWS README
View
6 src/scripts/Makefile.win
@@ -2,11 +2,13 @@
include ../gnuwin32/MkRules
R_HOME = ../..
-all: $(R_HOME)/bin/massage-Examples \
+all: $(R_HOME)/bin $(R_HOME)/bin/massage-Examples \
$(R_HOME)/bin/build $(R_HOME)/bin/check $(R_HOME)/bin/Rdconv \
$(R_HOME)/bin/Sd2Rd $(R_HOME)/bin/Rdiff.sh $(R_HOME)/bin/Rprof
-
+$(R_HOME)/bin:
+ @$(MKDIR) -p $(R_HOME)/bin
+
$(R_HOME)/bin/massage-Examples: $(R_HOME)/share/perl/massage-Examples.pl
@$(SED) -e 's/"contr.poly")/"contr.poly"), pager="console"/' $< > $@
Please sign in to comment.
Something went wrong with that request. Please try again.