@@ -6,13 +6,23 @@ LIBNAME = libprqlr.a
6
6
TARGET_DIR = $(CURDIR)/rust/target
7
7
LIBDIR = $(TARGET_DIR)/$(TARGET)/$(subst dev,debug,$(PROFILE))
8
8
STATLIB = $(LIBDIR)/$(LIBNAME)
9
- PKG_LIBS = -L$(LIBDIR) -lprqlr -lws2_32 -ladvapi32 -luserenv -lbcrypt -lntdll
9
+
10
+ PKG_LIBS = -L$(LIBDIR) -lprqlr \
11
+ -lws2_32 \
12
+ -ladvapi32 \
13
+ -luserenv \
14
+ -lbcrypt \
15
+ -lntdll
10
16
11
17
CARGO_BUILD_ARGS = --lib \
12
- --profile "$(PROFILE)" \
18
+ --profile= "$(PROFILE)" \
13
19
--manifest-path="$(CURDIR)/rust/Cargo.toml" \
14
- --target-dir "$(TARGET_DIR)" \
15
- --target $(TARGET)
20
+ --target-dir="$(TARGET_DIR)" \
21
+ --target=$(TARGET)
22
+
23
+ CARGOTMP = $(CURDIR)/.cargo
24
+ VENDOR_DIR = $(CURDIR)/rust/vendor
25
+ LIBGCC_MOCK_DIR = $(CURDIR)/libgcc_mock
16
26
17
27
# Rtools doesn't have the linker in the location that cargo expects, so we need
18
28
# to overwrite it via configuration.
@@ -23,10 +33,6 @@ all: cleanup
23
33
24
34
$(SHLIB): $(STATLIB)
25
35
26
- CARGOTMP = $(CURDIR)/.cargo
27
- VENDOR_DIR = $(CURDIR)/rust/vendor
28
- LIBGCC_MOCK_DIR = $(CURDIR)/libgcc_mock
29
-
30
36
$(STATLIB): remove-prev
31
37
# When the GNU toolchain is used (i.e. on CRAN), -lgcc_eh is specified for
32
38
# building proc-macro2, but Rtools doesn't contain libgcc_eh. This isn't used
@@ -60,8 +66,9 @@ remove-prev:
60
66
.PHONY: cleanup
61
67
# Clean up files that may cause warnings in R CMD check on CRAN just after the build
62
68
cleanup: $(SHLIB)
69
+ rm -Rf "$(CARGOTMP)" "$(VENDOR_DIR)"
63
70
if [ "$(NOT_CRAN)" != "true" ]; then \
64
- rm -Rf "$(STATLIB)" "$(CARGOTMP)" "$(VENDOR_DIR)" "$( LIBDIR)/build"; \
71
+ rm -Rf "$(STATLIB)" "$(LIBDIR)/build"; \
65
72
fi
66
73
67
74
.PHONY: clean
0 commit comments