mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 06:50:27 +00:00
mymake:: added an option -v to view the commandline
This commit is contained in:
parent
d8fd187986
commit
6fbccbeda0
@ -31,6 +31,8 @@ string compiler;
|
|||||||
string linker;
|
string linker;
|
||||||
string libs;
|
string libs;
|
||||||
|
|
||||||
|
bool verbose = false;
|
||||||
|
|
||||||
int batch_size = thread::hardware_concurrency() + 1;
|
int batch_size = thread::hardware_concurrency() + 1;
|
||||||
bool mingw64 = false;
|
bool mingw64 = false;
|
||||||
|
|
||||||
@ -115,6 +117,9 @@ string obj_dir = "mymake_files";
|
|||||||
string setdir = "../";
|
string setdir = "../";
|
||||||
|
|
||||||
int system(string cmdline) {
|
int system(string cmdline) {
|
||||||
|
if(verbose) {
|
||||||
|
printf("%s\n", cmdline.c_str());
|
||||||
|
}
|
||||||
if (mingw64)
|
if (mingw64)
|
||||||
cmdline = "sh -c '" + cmdline + "'"; // because system(arg) passes arg to cmd.exe on MinGW
|
cmdline = "sh -c '" + cmdline + "'"; // because system(arg) passes arg to cmd.exe on MinGW
|
||||||
return system(cmdline.c_str());
|
return system(cmdline.c_str());
|
||||||
@ -143,6 +148,9 @@ int main(int argc, char **argv) {
|
|||||||
if(!isalnum(c)) obj_dir += "_";
|
if(!isalnum(c)) obj_dir += "_";
|
||||||
else obj_dir += c;
|
else obj_dir += c;
|
||||||
}
|
}
|
||||||
|
else if(s == "-v") {
|
||||||
|
verbose = true;
|
||||||
|
}
|
||||||
else if(s == "-mingw64") {
|
else if(s == "-mingw64") {
|
||||||
set_os("mingw64");
|
set_os("mingw64");
|
||||||
obj_dir += "/mingw64";
|
obj_dir += "/mingw64";
|
||||||
|
Loading…
Reference in New Issue
Block a user