Skip to content

Commit

Permalink
auto merge of #4799 : graydon/rust/rustpkg, r=graydon
Browse files Browse the repository at this point in the history
Taking over where #4610 left off. Much rebasing and tidying.
  • Loading branch information
bors committed Feb 16, 2013
2 parents 3e97cce + 585d6f7 commit 354da41
Show file tree
Hide file tree
Showing 23 changed files with 2,477 additions and 2,192 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ Wade Mealing <wmealing@gmail.com>
William Ting <william.h.ting@gmail.com>
Yasuhiro Fujii <y-fujii@mimosa-pudica.net>
Youngsoo Son <ysson83@gmail.com>
Zack Corr <zackcorr95@gmail.com>
Zack Corr <zack@z0w0.me>
12 changes: 6 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ CFG_STDLIB :=$(call CFG_LIB_NAME,std)
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
CFG_LIBSYNTAX :=$(call CFG_LIB_NAME,syntax)
CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer)
CFG_LIBCARGO :=$(call CFG_LIB_NAME,cargo)
CFG_LIBRUSTPKG :=$(call CFG_LIB_NAME,rustpkg)
CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc)
CFG_LIBRUSTI :=$(call CFG_LIB_NAME,rusti)

Expand All @@ -140,15 +140,15 @@ CORELIB_GLOB :=$(call CFG_LIB_GLOB,core)
LIBRUSTC_GLOB :=$(call CFG_LIB_GLOB,rustc)
LIBSYNTAX_GLOB :=$(call CFG_LIB_GLOB,syntax)
LIBFUZZER_GLOB :=$(call CFG_LIB_GLOB,fuzzer)
LIBCARGO_GLOB :=$(call CFG_LIB_GLOB,cargo)
LIBRUSTPKG_GLOB :=$(call CFG_LIB_GLOB,rustpkg)
LIBRUSTDOC_GLOB :=$(call CFG_LIB_GLOB,rustdoc)
LIBRUSTI_GLOB :=$(call CFG_LIB_GLOB,rusti)
STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std)
CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core)
LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc)
LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax)
LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer)
LIBCARGO_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,cargo)
LIBRUSTPKG_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustpkg)
LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc)
LIBRUSTI_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rusti)

Expand Down Expand Up @@ -371,19 +371,19 @@ SREQ$(1)_T_$(2)_H_$(3) = \
CSREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
$$(HBIN$(1)_H_$(3))/rustpkg$$(X) \
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTPKG) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTPKG) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for more information on them.

When complete, `make install` will place several programs into
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
API-documentation tool, and `cargo`, the Rust package manager.
API-documentation tool, and `rustpkg`, the Rust package manager and build system.

[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
Expand Down
12 changes: 6 additions & 6 deletions mk/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ define CLEAN_HOST_STAGE_N
clean$(1)_H_$(2):
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustc$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/fuzzer$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/cargo$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustpkg$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/serializer$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X)
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rusti$(X)
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER)
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBCARGO)
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG)
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC)
$(Q)rm -f $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$(2)_H_$(3))/$(CFG_RUNTIME)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB)
Expand All @@ -115,7 +115,7 @@ clean$(1)_T_$(2)_H_$(3):
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBCARGO_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM)
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
Expand Down
2 changes: 1 addition & 1 deletion mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PKG_FILES := \
$(addprefix $(S)src/, \
README.txt \
driver \
libcargo \
librustpkg \
librusti \
librustc \
compiletest \
Expand Down
12 changes: 6 additions & 6 deletions mk/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
$$(Q)$$(call INSTALL_LIB, \
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBSYNTAX_GLOB))
$$(Q)$$(call INSTALL_LIB, \
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBCARGO_GLOB))
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTPKG_GLOB))
$$(Q)$$(call INSTALL_LIB, \
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTDOC_GLOB))
$$(Q)$$(call INSTALL_LIB, \
Expand Down Expand Up @@ -87,11 +87,11 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
$(Q)mkdir -p $(PREFIX_LIB)
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
$(Q)$(call INSTALL,$(HB2),$(PHB),rustc$(X))
$(Q)$(call INSTALL,$(HB2),$(PHB),cargo$(X))
$(Q)$(call INSTALL,$(HB2),$(PHB),rustpkg$(X))
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X))
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTC))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBCARGO))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTPKG))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTDOC))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTI))
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
Expand All @@ -112,11 +112,11 @@ HOST_LIB_FROM_HL_GLOB = \

uninstall:
$(Q)rm -f $(PHB)/rustc$(X)
$(Q)rm -f $(PHB)/cargo$(X)
$(Q)rm -f $(PHB)/rustpkg$(X)
$(Q)rm -f $(PHB)/rusti$(X)
$(Q)rm -f $(PHB)/rustdoc$(X)
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM)
$(Q)rm -f $(PHL)/$(CFG_LIBCARGO)
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTPKG)
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTC)
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTDOC)
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTI)
Expand All @@ -126,7 +126,7 @@ uninstall:
$(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTC_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBSYNTAX_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBCARGO_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTPKG_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTDOC_GLOB)) \
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTI_GLOB)) \
; \
Expand Down
2 changes: 1 addition & 1 deletion mk/pp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
$(wildcard $(S)src/test/*/*.rs \
$(S)src/test/*/*/*.rs) \
$(wildcard $(S)src/fuzzer/*.rs) \
$(wildcard $(S)src/cargo/*.rs) \
$(wildcard $(S)src/rustpkg/*.rs) \
$(wildcard $(S)src/rusti/*.rs)

PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L \
Expand Down
6 changes: 3 additions & 3 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
######################################################################

# The names of crates that must be tested
TEST_CRATES = core std syntax rustc rustdoc rusti cargo
TEST_CRATES = core std syntax rustc rustdoc rusti rustpkg

# Markdown files under doc/ that should have their code extracted and run
DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr tutorial-tasks rust
Expand Down Expand Up @@ -229,8 +229,8 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test

$(3)/test/cargotest.stage$(1)-$(2)$$(X): \
$$(CARGO_LIB) $$(CARGO_INPUTS) \
$(3)/test/rustpkgtest.stage$(1)-$(2)$$(X): \
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
Expand Down
32 changes: 16 additions & 16 deletions mk/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
FUZZER_LIB := $(S)src/libfuzzer/fuzzer.rc
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/libfuzzer/, *.rs))

# The test runner that runs the cfail/rfail/rpass and bench tests
# The test runner that runs the cfail/rfail/rpass and bxench tests
COMPILETEST_CRATE := $(S)src/compiletest/compiletest.rc
COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs)

# Cargo, the package manager
CARGO_LIB := $(S)src/libcargo/cargo.rc
CARGO_INPUTS := $(wildcard $(S)src/libcargo/*rs)
# Rustpkg, the package manager and build system
RUSTPKG_LIB := $(S)src/librustpkg/rustpkg.rc
RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*rs)

# Rustdoc, the documentation tool
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rc
Expand Down Expand Up @@ -57,20 +57,20 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X): \
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<

$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO): \
$$(CARGO_LIB) $$(CARGO_INPUTS) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG): \
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@

$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X): \
$$(DRIVER_CRATE) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO)
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg cargo -o $$@ $$<
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustpkg -o $$@ $$<

$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC): \
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
Expand Down Expand Up @@ -134,19 +134,19 @@ $$(HBIN$(2)_H_$(4))/compiletest$$(X): \
$$(Q)cp $$< $$@


$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO) \
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG) \
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
$$(HSREQ$(2)_H_$(4))
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCARGO_GLOB) \
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCARGO_DSYM_GLOB)) \
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_GLOB) \
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_DSYM_GLOB)) \
$$(HLIB$(2)_H_$(4))

$$(HBIN$(2)_H_$(4))/cargo$$(X): \
$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X) \
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO) \
$$(HBIN$(2)_H_$(4))/rustpkg$$(X): \
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X) \
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG) \
$$(HSREQ$(2)_H_$(4))
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
Expand Down
2 changes: 1 addition & 1 deletion src/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test/auxiliary - Dependencies of tests

compiletest/ The test runner

libcargo/ The package manager
librustpkg/ The package manager and build system

librusti/ The JIT REPL

Expand Down
4 changes: 2 additions & 2 deletions src/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#[no_core];
extern mod core(vers = "0.6");

#[cfg(cargo)]
extern mod this(name = "cargo", vers = "0.6");
#[cfg(rustpkg)]
extern mod this(name = "rustpkg", vers = "0.6");

#[cfg(fuzzer)]
extern mod this(name = "fuzzer", vers = "0.6");
Expand Down
Loading

0 comments on commit 354da41

Please sign in to comment.