Skip to content

Commit

Permalink
Support for aarch64 installer builds on Windows. Declare dependencies in
Browse files Browse the repository at this point in the history
installer build.


git-svn-id: https://svn.r-project.org/R/trunk@85265 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Oct 4, 2023
1 parent f10606a commit 1693e28
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
10 changes: 7 additions & 3 deletions src/gnuwin32/fixed/etc/Makeconf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ ifeq ($(R_INSTALLER_BUILD), yes)
ifneq ($(strip $(R_CUSTOM_TOOLS_SOFT)),)
LOCAL_SOFT = $(R_CUSTOM_TOOLS_SOFT)
else
## The rtools43 installer sets RTOOLS43_HOME
RTOOLS43_HOME ?= c:/rtools43
LOCAL_SOFT = $(subst \,/,$(RTOOLS43_HOME))/x86_64-w64-mingw32.static.posix
## The rtools43 installer sets RTOOLS43_HOME (or RTOOLS43_AARCH64_HOME)

# INSTALLER-BUILD-x86_64: RTOOLS43_HOME ?= c:/rtools43
# INSTALLER-BUILD-x86_64: LOCAL_SOFT = $(subst \,/,$(RTOOLS43_HOME))/x86_64-w64-mingw32.static.posix

# INSTALLER-BUILD-aarch64: RTOOLS43_HOME ?= c:/rtools43-aarch64
# INSTALLER-BUILD-aarch64: LOCAL_SOFT = $(subst \,/,$(RTOOLS43_AARCH64_HOME))/aarch64-w64-mingw32.static.posix
endif
endif
R_TOOLS_SOFT ?= $(LOCAL_SOFT)
Expand Down
3 changes: 2 additions & 1 deletion src/gnuwin32/fixed/etc/Rcmd_environ
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ R_BZIPCMD=${R_BZIPCMD-'bzip2'}
# MAKE=${MAKE-make}
SED=${SED-sed}

# INSTALLER-BUILD:R_RTOOLS43_PATH="${RTOOLS43_HOME:-c:/rtools43}/x86_64-w64-mingw32.static.posix/bin;${RTOOLS43_HOME:-c:/rtools43}/usr/bin"
# INSTALLER-BUILD-x86_64:R_RTOOLS43_PATH="${RTOOLS43_HOME:-c:/rtools43}/x86_64-w64-mingw32.static.posix/bin;${RTOOLS43_HOME:-c:/rtools43}/usr/bin"
# INSTALLER-BUILD-aarch64:R_RTOOLS43_PATH="${RTOOLS43_AARCH64_HOME:-c:/rtools43-aarch64}/aarch64-w64-mingw32.static.posix/bin;${RTOOLS43_AARCH64_HOME:-c:/rtools43-aarch64}/usr/bin"
# trailing slash to protect against trailing backslash in PATH
# INSTALLER-BUILD:PATH="${R_CUSTOM_TOOLS_PATH:-${R_RTOOLS43_PATH}};${PATH}/"

24 changes: 14 additions & 10 deletions src/gnuwin32/installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ SHARE_DIRS = R dictionaries encodings licenses make Rd texmf zoneinfo
all: $(RPREFIX)-win.exe
msi: $(RPREFIX)-$(SUFF).msi

RTARGET := $(if $(findstring Aarch64,$(shell file "$(R_HOME)/bin/R.exe")),aarch64,x86_64)

imagedir:
$(RM) -R $(RPREFIX)
$(MKDIR) $(RPREFIX)
Expand Down Expand Up @@ -94,13 +96,15 @@ imagedir:
# This is odd -- better to clean the copy
(cd ..; $(MAKE) --no-print-directory PKGDIR=. pkgclean-windlgs)
$(CP) -pR ../windlgs $(RPREFIX)/src/library

# Edit Makeconf
$(SED) -i -e 's!# INSTALLER-BUILD:!!' $(RPREFIX)/etc$(R_ARCH)/Makeconf
# Edit Rcmd_environ
$(SED) -i -e 's!# INSTALLER-BUILD:!!' $(RPREFIX)/etc/Rcmd_environ
# Edit base package profile
$(SED) -i -e 's!# INSTALLER-BUILD:!!' $(RPREFIX)/library/base/R/Rprofile
# Edit Makeconf, Rcmd_environ, base package profile
$(foreach F, \
$(RPREFIX)/etc$(R_ARCH)/Makeconf \
$(RPREFIX)/etc/Rcmd_environ \
$(RPREFIX)/library/base/R/Rprofile, \
$(SED) -i -e 's!# INSTALLER-BUILD:!!' \
-e 's!# INSTALLER-BUILD-$(RTARGET):!!' \
$(F); \
)
# test dir
mkdir $(RPREFIX)/tests
$(MAKE) --no-print-directory -C ../../../tests -f Makefile.win \
Expand All @@ -109,15 +113,15 @@ imagedir:
$(FIND) $(RPREFIX) -name .svn -prune -exec rm -Rf \{\} \;
$(FIND) $(RPREFIX) -name \*~ -delete

md5sums:
md5sums: imagedir fixups extras
@echo "adding MD5 checksums"
@(cd $(RPREFIX); echo "tools:::.installMD5sums(\".\")" | \
R_DEFAULT_PACKAGES=NULL LC_COLLATE=C R_OSTYPE=windows \
../../../../$(BINDIR)/Rterm.exe --vanilla --no-echo)

PDF_FILES = $(wildcard $(RPREFIX)/library/*/doc/*.pdf)

fixups:
fixups: extras
echo "make.packages.html(.Library,temp=FALSE,verbose=FALSE)" | $(RPREFIX)/$(BINDIR)/Rterm.exe --vanilla --no-echo LC_COLLATE=C
$(CP) -pRf $(R_HOME)/Tcl $(RPREFIX)
$(RM) $(RPREFIX)/Tcl*/lib/*.lib
Expand All @@ -128,7 +132,7 @@ ifneq ($(strip $(QPDF)),)
done
endif

extras:
extras: imagedir
for f in $(DLLs64); do \
cp "$$f" $(RPREFIX)/bin$(R_ARCH); \
done
Expand Down

0 comments on commit 1693e28

Please sign in to comment.