Skip to content

Commit

Permalink
Only try to install the doc directory if it exists.
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
ktossell committed Dec 18, 2014
1 parent 22a9f25 commit cbf80f3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
$$(Q)[ ! -d doc ] || cp -r doc $$(PREPARE_DEST_DIR)

dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
@$(call E, build: $$@)
Expand Down Expand Up @@ -312,9 +312,17 @@ MAYBE_DIST_TAR_SRC=dist-tar-src
MAYBE_DISTCHECK_TAR_SRC=distcheck-tar-src
endif

dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins dist-docs
ifneq ($(CFG_DISABLE_DOCS),)
MAYBE_DIST_DOCS=
MAYBE_DISTCHECK_DOCS=
else
MAYBE_DIST_DOCS=dist-docs
MAYBE_DISTCHECK_DOCS=distcheck-docs
endif

dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins $(MAYBE_DIST_DOCS)

distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins distcheck-docs
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins $(MAYBE_DISTCHECK_DOCS)
$(Q)rm -Rf tmp/distcheck
@echo
@echo -----------------------------------------------
Expand Down

7 comments on commit cbf80f3

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at ktossell@cbf80f3

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 99d6956

@bors
Copy link
Contributor

@bors bors commented on cbf80f3 Dec 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 99d6956

Please sign in to comment.