Skip to content

Commit 01ec918

Browse files
committed
Cleanup build
1 parent dc9c1b7 commit 01ec918

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

‎.github/workflows/R-CMD-check.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ jobs:
4747
- uses: r-lib/actions/check-r-package@v2
4848
with:
4949
upload-snapshots: true
50+
env:
51+
MAKEFLAGS: -j4

‎DESCRIPTION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ssh
22
Type: Package
33
Title: Secure Shell (SSH) Client for R
4-
Version: 0.9.3
4+
Version: 0.9.4
55
Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"),
66
email = "[email protected]", comment = c(ORCID = "0000-0002-4035-0289"))
77
Description: Connect to a remote server over SSH to transfer files via SCP,

‎src/Makevars.in‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PKG_CPPFLAGS=@cflags@
22
PKG_CFLAGS = $(C_VISIBILITY)
33
PKG_LIBS=@libs@
44

5-
all: clean
5+
all: $(SHLIB) cleanup
66

7-
clean:
8-
rm -Rf $(SHLIB) $(OBJECTS)
7+
cleanup: $(SHLIB)
8+
@rm -Rf ../.deps

‎src/Makevars.win‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RWINLIB = ../windows/libssh
1+
RWINLIB = ../.deps/libssh
22
OLDLIBDIR = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH)
33

44
PKG_CPPFLAGS = -I$(RWINLIB)/include -DLIBSSH_STATIC
@@ -8,12 +8,13 @@ PKG_LIBS = \
88
-L$(RWINLIB)/lib \
99
-lssh -lcrypto -lz -lpthread -lws2_32 -lgdi32 -lcrypt32 -liphlpapi
1010

11-
all: clean winlibs
11+
all: $(SHLIB) cleanup
1212

13-
winlibs:
14-
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
13+
# Needed for parallel make
14+
$(OBJECTS): | $(RWINLIB)
1515

16-
clean:
17-
rm -f $(SHLIB) $(OBJECTS)
16+
$(RWINLIB):
17+
@"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
1818

19-
.PHONY: all winlibs clean
19+
cleanup: $(SHLIB)
20+
@rm -Rf $(RWINLIB)

‎ssh.Rproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 8d846f31-55b7-44ce-abd7-6c2897741001
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

‎tools/winlibs.R‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
if(!file.exists("../windows/protobuf/include/libssh/libssh.h")){
2-
unlink("../windows", recursive = TRUE)
1+
if(!file.exists('session.o') && !file.exists("../.deps/protobuf/include/libssh/libssh.h")){
2+
unlink("../.deps", recursive = TRUE)
33
url <- if(grepl("aarch", R.version$platform)){
44
"https://github.com/r-windows/bundles/releases/download/libssh-0.11.0/libssh-0.11.0-clang-aarch64.tar.xz"
55
} else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){
@@ -10,9 +10,10 @@ if(!file.exists("../windows/protobuf/include/libssh/libssh.h")){
1010
"https://github.com/rwinlib/libssh/archive/v0.10.5.tar.gz"
1111
}
1212
download.file(url, basename(url), quiet = TRUE)
13-
dir.create("../windows", showWarnings = FALSE)
14-
untar(basename(url), exdir = "../windows", tar = 'internal')
13+
dir.create("../.deps", showWarnings = FALSE)
14+
untar(basename(url), exdir = "../.deps", tar = 'internal')
1515
unlink(basename(url))
16-
setwd("../windows")
16+
setwd("../.deps")
1717
file.rename(list.files(), 'libssh')
18+
invisible()
1819
}

0 commit comments

Comments
 (0)