|
212 | 212 | # CRAN note: Cargo and Rustc versions are reported during |
213 | 213 | # configure via tools/msrv.R. |
214 | 214 | # |
215 | | - # vendor.tar.xz, if present, is unzipped and used for offline compilation. |
| 215 | + # If a vendor directory exists, it is used for offline compilation. Otherwise if |
| 216 | + # vendor.tar.xz exists, it is unzipped and used for offline compilation. |
216 | 217 | $(STATLIB): |
217 | 218 | |
218 | | - if [ -f ./rust/vendor.tar.xz ]; then \ |
| 219 | + if [ -d ./vendor ]; then \ |
| 220 | + echo "=== Using offline vendor directory ==="; \ |
| 221 | + mkdir -p $(CARGOTMP) && \ |
| 222 | + cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
| 223 | + elif [ -f ./rust/vendor.tar.xz ]; then \ |
| 224 | + echo "=== Using offline vendor tarball ==="; \ |
219 | 225 | tar xf rust/vendor.tar.xz && \ |
220 | 226 | mkdir -p $(CARGOTMP) && \ |
221 | 227 | cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
|
273 | 279 | mkdir -p $(TARGET_DIR)/libgcc_mock |
274 | 280 | touch $(TARGET_DIR)/libgcc_mock/libgcc_eh.a |
275 | 281 | |
276 | | - if [ -f ./rust/vendor.tar.xz ]; then \ |
| 282 | + # If a vendor directory exists, it is used for offline compilation. Otherwise if |
| 283 | + # vendor.tar.xz exists, it is unzipped and used for offline compilation. |
| 284 | + if [ -d ./vendor ]; then \ |
| 285 | + echo "=== Using offline vendor directory ==="; \ |
| 286 | + mkdir -p $(CARGOTMP) && \ |
| 287 | + cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
| 288 | + elif [ -f ./rust/vendor.tar.xz ]; then \ |
| 289 | + echo "=== Using offline vendor tarball ==="; \ |
277 | 290 | tar xf rust/vendor.tar.xz && \ |
278 | 291 | mkdir -p $(CARGOTMP) && \ |
279 | 292 | cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
|
442 | 455 | # CRAN note: Cargo and Rustc versions are reported during |
443 | 456 | # configure via tools/msrv.R. |
444 | 457 | # |
445 | | - # vendor.tar.xz, if present, is unzipped and used for offline compilation. |
| 458 | + # If a vendor directory exists, it is used for offline compilation. Otherwise if |
| 459 | + # vendor.tar.xz exists, it is unzipped and used for offline compilation. |
446 | 460 | $(STATLIB): |
447 | 461 | |
448 | | - if [ -f ./rust/vendor.tar.xz ]; then \ |
| 462 | + if [ -d ./vendor ]; then \ |
| 463 | + echo "=== Using offline vendor directory ==="; \ |
| 464 | + mkdir -p $(CARGOTMP) && \ |
| 465 | + cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
| 466 | + elif [ -f ./rust/vendor.tar.xz ]; then \ |
| 467 | + echo "=== Using offline vendor tarball ==="; \ |
449 | 468 | tar xf rust/vendor.tar.xz && \ |
450 | 469 | mkdir -p $(CARGOTMP) && \ |
451 | 470 | cp rust/vendor-config.toml $(CARGOTMP)/config.toml; \ |
|
0 commit comments