Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbf80f3

Browse files
committedDec 18, 2014
Only try to install the doc directory if it exists.
If you configure with `--disable-docs`, the `doc` directory does not get generated, so `cp -r doc dist/` fails when you `make dist{,-tar-bins,-doc}` or `make install`
1 parent 22a9f25 commit cbf80f3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
 

‎mk/dist.mk

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
229229
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
230230
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
231231
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
232-
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
232+
$$(Q)[ ! -d doc ] || cp -r doc $$(PREPARE_DEST_DIR)
233233

234234
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
235235
@$(call E, build: $$@)
@@ -312,9 +312,17 @@ MAYBE_DIST_TAR_SRC=dist-tar-src
312312
MAYBE_DISTCHECK_TAR_SRC=distcheck-tar-src
313313
endif
314314

315-
dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins dist-docs
315+
ifneq ($(CFG_DISABLE_DOCS),)
316+
MAYBE_DIST_DOCS=
317+
MAYBE_DISTCHECK_DOCS=
318+
else
319+
MAYBE_DIST_DOCS=dist-docs
320+
MAYBE_DISTCHECK_DOCS=distcheck-docs
321+
endif
322+
323+
dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins $(MAYBE_DIST_DOCS)
316324

317-
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins distcheck-docs
325+
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins $(MAYBE_DISTCHECK_DOCS)
318326
$(Q)rm -Rf tmp/distcheck
319327
@echo
320328
@echo -----------------------------------------------

7 commit comments

Comments
 (7)

bors commented on Dec 18, 2014

@bors
Collaborator

saw approval from alexcrichton
at ktossell@cbf80f3

bors commented on Dec 18, 2014

@bors
Collaborator

merging ktossell/rust/allow-nodoc-install = cbf80f3 into auto

bors commented on Dec 18, 2014

@bors
Collaborator

ktossell/rust/allow-nodoc-install = cbf80f3 merged ok, testing candidate = 99d6956

bors commented on Dec 18, 2014

@bors
Collaborator

status: {"merge_sha": "99d6956c3bdb290b9fd539c5dc15a2b502da5e7a"}

bors commented on Dec 18, 2014

@bors
Collaborator

fast-forwarding master to auto = 99d6956

bors commented on Dec 18, 2014

@bors
Collaborator

fast-forwarding master to auto = 99d6956

Please sign in to comment.