Skip to content
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

Rustup 2015 01 31 #133

Merged
merged 2 commits into from Feb 11, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Use a new-style Cargo build script.

  • Loading branch information
SimonSapin committed Feb 2, 2015
commit 8f39e40226ec9a9c020665b94d545051c3d16e18
@@ -4,7 +4,7 @@ name = "js"
version = "0.1.0"
authors = ["The Servo Project Developers"]

build = "make -f makefile.cargo"
build = "build.rs"

[features]
debugmozjs = ['mozjs-sys/debugmozjs']
@@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#![feature(io)]

use std::old_io::process::{Command, ProcessExit, StdioContainer};


fn main() {
let result = Command::new("make")
.args(&["-f", "makefile.cargo"])
.stdout(StdioContainer::InheritFd(1))
.stderr(StdioContainer::InheritFd(2))
.status()
.unwrap();
assert_eq!(result, ProcessExit::ExitStatus(0));
}
@@ -20,7 +20,7 @@ ifneq (,$(CARGO_FEATURE_DEBUGMOZJS))
CFLAGS += -g -O0 -DDEBUG -D_DEBUG
endif

MOZJS_OUTDIR = $(shell find $(OUT_DIR)/.. -name 'mozjs-sys-*' -type d)
MOZJS_OUTDIR = $(shell find $(OUT_DIR)/../.. -name 'mozjs-sys-*' -type d)/out
CFLAGS += -I$(MOZJS_OUTDIR)/dist/include

.PHONY: all
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.