Skip to content

Commit

Permalink
Unix fix (#1)
Browse files Browse the repository at this point in the history
* Fixes linux/unix installation and devtools load_all

- Fixes the unix/linux makefile
- Fixes startup code when invoked by devtools load_all

* Fixes comment

It's R and not cpp

Co-authored-by: Dominik Selzer <51476770+onwhenrdy@users.noreply.github.com>
  • Loading branch information
msevestre and onwhenrdy committed Jan 23, 2020
1 parent d2a3591 commit 560ac34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ loadAndInit <- function(chname, pkgname, libname, srcPkgLibPath=NULL) {
# cater for devtools 'load_all'; library.dynam fails otherwise.
if(!is.null(srcPkgLibPath)) {
ext <- .Platform$dynlib.ext
f <- paste(file.path(srcPkgLibPath, chname), ext, sep='')
# srcPkgLibPath ends with platform separator (e.g. '/')
f <- paste0(srcPkgLibPath, chname, ext)
dyn.load(f)
} else {
library.dynam(chname, pkgname, libname)
Expand Down
9 changes: 4 additions & 5 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PKG_LIBS_LOCAL=`pkg-config --libs $(MONO_LIB) glib-2.0`
PKG_CFLAGS = $(PKG_CFLAGS_LOCAL) -g -D MONO_CLR -D MONO_INST
PKG_LIBS=$(PKG_LIBS_LOCAL)
# TODO: can I avoid having this platform dependent? Why did I not use BuildConfiguration folder under Linux?
RCLRBINDIRFACADE= ./$(BUILDTYPE)
RCLRBINDIRFACADE= ./ClrFacade/bin/$(BUILDTYPE)/netstandard2.0
endif ## end if statement testing on "$(R_OSTYPE)" is "windows" or not

CLR_FACADE_BINS=$(RCLRBINDIRFACADE)/*.dll*
Expand All @@ -91,7 +91,7 @@ RM = rm -f
# .PHONY: all clean

#all: printarch rClrMono$(SHLIB_EXT) instdir rClrInstRclrMono rClrLib
all: printarch $(SHLIB) instdir rClrLib
all: printarch $(SHLIB) instdir rClrLib rClrInstRclrMono

clean:
${RM} $(OBJECTS) $(SHLIB) $(RCLR_LIBS)
Expand Down Expand Up @@ -122,9 +122,8 @@ instdir:
-@mkdir -p $(INSTDIR) 2>/dev/null
-@mkdir -p $(INSTDIR)/libs$(R_ARCH) 2>/dev/null

# Note: see explanation for -u -p in Makefile.win. May be unnecessary on Linux?
rClrInstRclrMono:
cp -u -p rClrMono$(SHLIB_EXT) $(INSTDIR)/libs$(R_ARCH)
rClrInstRclrMono: $(SHLIB)
cp -u -p rClr$(SHLIB_EXT) $(INSTDIR)/libs$(R_ARCH)

rClrLib: rClrLibComp
if [ -e symbols.rds ] ; then cp -u -p symbols.rds $(INSTDIR)/libs$(R_ARCH) ; fi
Expand Down

0 comments on commit 560ac34

Please sign in to comment.