Skip to content

Commit

Permalink
chore: should remove the vendor dir on CRAN (#159)
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
eitsupi authored Aug 6, 2023
1 parent 8dbc5df commit afc2c77
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit afc2c77

Please sign in to comment.