Skip to content

Commit 9a3ab01

Browse files
committed
Fix parallel make; more cleanup after build
1 parent 28d6f36 commit 9a3ab01

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: hellorust
22
Type: Package
33
Title: Minimal Examples of Using Rust Code in R
4-
Version: 1.2.2
4+
Version: 1.2.3
55
Authors@R: c(person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroenooms@gmail.com",
66
comment = c(ORCID = "0000-0002-4035-0289")),
77
person("Authors of the dependency Rust crates", role = "aut", comment = "see AUTHORS file"))

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.2.3
2+
- Fix parallel make; more cleanup after build
3+
14
1.2.2
25
- Fix commented out CARGO_HOME in Makevars
36

hellorust.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: 96528bc3-6344-4293-93e2-82a0487b38a2
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

src/Makevars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PKG_CFLAGS = -pthread
44
PKG_CPPFLAGS = -DSTRICT_R_HEADERS -DR_NO_REMAP
55
PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lresolv -pthread
66

7-
#all: clean
7+
all: $(SHLIB) cleanup
88

99
$(SHLIB): $(STATLIB)
1010

@@ -22,5 +22,5 @@ $(STATLIB):
2222
rm -Rf $(CARGOTMP) vendor || true # CRAN wants us to remove "detritus"
2323
rm -Rf $(LIBDIR)/build || true
2424

25-
clean:
26-
rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) myrustlib/target
25+
cleanup: $(SHLIB)
26+
rm -Rf $(STATLIB) myrustlib/target

src/Makevars.win

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ STATLIB = $(LIBDIR)/libmyrustlib.a
44
PKG_CPPFLAGS = -DSTRICT_R_HEADERS -DR_NO_REMAP
55
PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lws2_32 -ladvapi32 -lgdi32 -lbcrypt -lcrypt32 -luserenv -lntdll
66

7-
all: clean rustup
7+
all: $(SHLIB) cleanup
88

99
$(SHLIB): $(STATLIB)
1010

1111
$(STATLIB):
1212
if [ -f myrustlib/vendor.tar.xz ]; then tar xf myrustlib/vendor.tar.xz && mkdir -p .cargo && cp myrustlib/vendor-config.toml .cargo/config.toml; fi
1313
PATH="$(USERPROFILE)\.cargo\bin:$(PATH)" cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
1414

15-
clean:
16-
rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) myrustlib/target
17-
18-
rustup:
19-
rustup target add $(TARGET) || true
15+
cleanup:
16+
rm -Rf $(STATLIB) myrustlib/target

0 commit comments

Comments
 (0)