From afc2c77b7b4d300ac91ccf70a6eb156a9d5d234a Mon Sep 17 00:00:00 2001 From: eitsupi <50911393+eitsupi@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:56:08 +0900 Subject: [PATCH] chore: should remove the vendor dir on CRAN (#159) Part of #148 This is needed to avoid source code checking like: ``` * checking line endings in C/C++/Fortran sources/headers ... NOTE Found the following sources/headers with CR or CRLF line endings: src/rust/vendor/stacker/src/arch/windows.c Some Unix compilers require LF line endings. ``` --- NEWS.md | 2 +- src/Makevars | 5 ++--- src/Makevars.win | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 717c1297..e77b5748 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,7 +15,7 @@ - Set `SystemRequirements: Cargo (Rust's package manager), rustc` in the DESCRIPTION file. (#153) - This package now includes the `configure` and `configure.win` scripts to check the cargo command. (#149) - Set `CARGO_BUILD_JOBS=2` if not `NOT_CRAN=true` during installation. (#151) - - Supports dependent Rust crates vendoring. (#152) + - Supports dependent Rust crates vendoring. (#152, #159) - Update the `LICENSE.note` file for Rust crates vendoring. (#156) # prqlr 0.4.0 diff --git a/src/Makevars b/src/Makevars index ab99311c..b2b4c0a3 100644 --- a/src/Makevars +++ b/src/Makevars @@ -28,12 +28,11 @@ $(STATLIB): export PATH="$(PATH):$(HOME)/.cargo/bin" && \ cargo build --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) if [ "$(NOT_CRAN)" != "true" ]; then \ - rm -Rf $(CARGOTMP) && \ - rm -Rf $(LIBDIR)/build; \ + rm -Rf $(CARGOTMP) $(VENDOR_DIR) $(LIBDIR)/build; \ fi C_clean: rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) clean: - rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) $(VENDOR_DIR) ./rust/target + rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) ./rust/target diff --git a/src/Makevars.win b/src/Makevars.win index 1de5ce08..0888a24f 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -38,8 +38,7 @@ $(STATLIB): export LIBRARY_PATH="$${LIBRARY_PATH};$(CURDIR)/$(TARGET_DIR)/libgcc_mock" && \ cargo build --target=$(TARGET) --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) if [ "$(NOT_CRAN)" != "true" ]; then \ - rm -Rf $(CARGOTMP) && \ - rm -Rf $(LIBDIR)/build; \ + rm -Rf $(CARGOTMP) $(VENDOR_DIR) $(LIBDIR)/build; \ fi C_clean: