mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-10-07 00:53:28 +00:00
Factor out common symlink check build script
This commit is contained in:
parent
362c9f92b0
commit
65b66f2091
@ -1,29 +1 @@
|
|||||||
use std::io::{self, Write};
|
include!("../../tools/cargo/build.rs");
|
||||||
use std::path::Path;
|
|
||||||
use std::process;
|
|
||||||
|
|
||||||
const NOSYMLINK: &str = "
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
When building `cxx` from a git clone, git's symlink support needs
|
|
||||||
to be enabled on platforms that have it off by default (Windows).
|
|
||||||
Either use:
|
|
||||||
|
|
||||||
$ git config --global core.symlinks true
|
|
||||||
|
|
||||||
prior to cloning, or else use:
|
|
||||||
|
|
||||||
$ git clone -c core.symlinks=true ...
|
|
||||||
|
|
||||||
for the clone.
|
|
||||||
|
|
||||||
Symlinks are only required for local development, not for building
|
|
||||||
`cxx` as a (possibly transitive) dependency from crates.io.
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
";
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if !Path::new("src/syntax/mod.rs").exists() {
|
|
||||||
let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,29 +1 @@
|
|||||||
use std::io::{self, Write};
|
include!("../../tools/cargo/build.rs");
|
||||||
use std::path::Path;
|
|
||||||
use std::process;
|
|
||||||
|
|
||||||
const NOSYMLINK: &str = "
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
When building `cxx` from a git clone, git's symlink support needs
|
|
||||||
to be enabled on platforms that have it off by default (Windows).
|
|
||||||
Either use:
|
|
||||||
|
|
||||||
$ git config --global core.symlinks true
|
|
||||||
|
|
||||||
prior to cloning, or else use:
|
|
||||||
|
|
||||||
$ git clone -c core.symlinks=true ...
|
|
||||||
|
|
||||||
for the clone.
|
|
||||||
|
|
||||||
Symlinks are only required for local development, not for building
|
|
||||||
`cxx` as a (possibly transitive) dependency from crates.io.
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
";
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if !Path::new("src/syntax/mod.rs").exists() {
|
|
||||||
let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,29 +1 @@
|
|||||||
use std::io::{self, Write};
|
include!("../../tools/cargo/build.rs");
|
||||||
use std::path::Path;
|
|
||||||
use std::process;
|
|
||||||
|
|
||||||
const NOSYMLINK: &str = "
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
When building `cxx` from a git clone, git's symlink support needs
|
|
||||||
to be enabled on platforms that have it off by default (Windows).
|
|
||||||
Either use:
|
|
||||||
|
|
||||||
$ git config --global core.symlinks true
|
|
||||||
|
|
||||||
prior to cloning, or else use:
|
|
||||||
|
|
||||||
$ git clone -c core.symlinks=true ...
|
|
||||||
|
|
||||||
for the clone.
|
|
||||||
|
|
||||||
Symlinks are only required for local development, not for building
|
|
||||||
`cxx` as a (possibly transitive) dependency from crates.io.
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
";
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if !Path::new("src/syntax/mod.rs").exists() {
|
|
||||||
let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,29 +1 @@
|
|||||||
use std::io::{self, Write};
|
include!("../tools/cargo/build.rs");
|
||||||
use std::path::Path;
|
|
||||||
use std::process;
|
|
||||||
|
|
||||||
const NOSYMLINK: &str = "
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
When building `cxx` from a git clone, git's symlink support needs
|
|
||||||
to be enabled on platforms that have it off by default (Windows).
|
|
||||||
Either use:
|
|
||||||
|
|
||||||
$ git config --global core.symlinks true
|
|
||||||
|
|
||||||
prior to cloning, or else use:
|
|
||||||
|
|
||||||
$ git clone -c core.symlinks=true ...
|
|
||||||
|
|
||||||
for the clone.
|
|
||||||
|
|
||||||
Symlinks are only required for local development, not for building
|
|
||||||
`cxx` as a (possibly transitive) dependency from crates.io.
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
";
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if !Path::new("src/syntax/mod.rs").exists() {
|
|
||||||
let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
29
tools/cargo/build.rs
Normal file
29
tools/cargo/build.rs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
use std::io::{self, Write};
|
||||||
|
use std::path::Path;
|
||||||
|
use std::process;
|
||||||
|
|
||||||
|
const NOSYMLINK: &str = "
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
When building `cxx` from a git clone, git's symlink support needs
|
||||||
|
to be enabled on platforms that have it off by default (Windows).
|
||||||
|
Either use:
|
||||||
|
|
||||||
|
$ git config --global core.symlinks true
|
||||||
|
|
||||||
|
prior to cloning, or else use:
|
||||||
|
|
||||||
|
$ git clone -c core.symlinks=true ...
|
||||||
|
|
||||||
|
for the clone.
|
||||||
|
|
||||||
|
Symlinks are only required for local development, not for building
|
||||||
|
`cxx` as a (possibly transitive) dependency from crates.io.
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
";
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
if !Path::new("src/syntax/mod.rs").exists() {
|
||||||
|
let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user