blob: b8ff9ddad5b5c0bdf86ad7413293de79af213e9a [file] [log] [blame]
David Tolnaycc7ced42020-09-11 10:39:55 -07001use std::io::{self, Write};
2use std::path::Path;
3use std::process;
4
5const NOSYMLINK: &str = "
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7When building `cxx` from a git clone, git's symlink support needs
8to be enabled on platforms that have it off by default (Windows).
9Either use:
10
11 $ git config --global core.symlinks true
12
13prior to cloning, or else use:
14
15 $ git clone -c core.symlinks=true ...
16
17for the clone.
18
19Symlinks are only required for local development, not for building
20`cxx` as a (possibly transitive) dependency from crates.io.
21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22";
23
24fn main() {
25 if !Path::new("src/syntax/mod.rs").exists() {
26 let _ = io::stderr().lock().write_all(NOSYMLINK.as_bytes());
27 process::exit(1);
28 }
29}