Skip to content

mk: Build crates with relative paths to rustc #26252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ fi
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"

CFG_SRC_DIR="$(abs_path $(dirname $0))/"
CFG_SRC_DIR_RELATIVE="$(dirname $0)/"
CFG_BUILD_DIR="$(pwd)/"
CFG_SELF="$0"
CFG_CONFIGURE_ARGS="$@"
Expand Down Expand Up @@ -1558,6 +1559,7 @@ done
step_msg "writing configuration"

putvar CFG_SRC_DIR
putvar CFG_SRC_DIR_RELATIVE
putvar CFG_BUILD_DIR
putvar CFG_OSTYPE
putvar CFG_CPUTYPE
Expand Down
2 changes: 1 addition & 1 deletion mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ DOC_CRATES := std alloc collections core libc rustc_unicode
#
# $(1) is the crate to generate variables for
define RUST_CRATE
CRATEFILE_$(1) := $$(S)src/lib$(1)/lib.rs
CRATEFILE_$(1) := $$(SREL)src/lib$(1)/lib.rs
RSINPUTS_$(1) := $$(call rwildcard,$(S)src/lib$(1)/,*.rs)
RUST_DEPS_$(1) := $$(filter-out native:%,$$(DEPS_$(1)))
NATIVE_DEPS_$(1) := $$(patsubst native:%,%,$$(filter native:%,$$(DEPS_$(1))))
Expand Down
1 change: 1 addition & 0 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ $(foreach host,$(CFG_HOST), \
# exported

export CFG_SRC_DIR
export CFG_SRC_DIR_RELATIVE
export CFG_BUILD_DIR
ifdef CFG_VER_DATE
export CFG_VER_DATE
Expand Down
2 changes: 1 addition & 1 deletion mk/reconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Makefile config.mk: config.stamp

config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
@$(call E, cfg: reconfiguring)
$(S)configure $(CFG_CONFIGURE_ARGS)
$(SREL)configure $(CFG_CONFIGURE_ARGS)
1 change: 1 addition & 0 deletions mk/util.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ print-%:
@echo $*=$($*)

S := $(CFG_SRC_DIR)
SREL := $(CFG_SRC_DIR_RELATIVE)