mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-18 14:24:07 +00:00
stop ignoring return values of some calls
This commit is contained in:
parent
f1dab56bab
commit
253061a4fd
15
mymake.cpp
15
mymake.cpp
@ -91,9 +91,11 @@ int main(int argc, char **argv) {
|
|||||||
#else
|
#else
|
||||||
set_linux();
|
set_linux();
|
||||||
#endif
|
#endif
|
||||||
|
int retval = 0; // for storing return values of some function calls
|
||||||
for(string fname: {"Makefile.loc", "Makefile.simple", "Makefile"})
|
for(string fname: {"Makefile.loc", "Makefile.simple", "Makefile"})
|
||||||
if(file_exists(fname)) {
|
if(file_exists(fname)) {
|
||||||
system("make -f " + fname + " language-data.cpp autohdr.h savepng.o");
|
retval = system("make -f " + fname + " language-data.cpp autohdr.h savepng.o");
|
||||||
|
if (retval) { printf("error during preparation!\n"); exit(retval); }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int i=1; i<argc; i++) {
|
for(int i=1; i<argc; i++) {
|
||||||
@ -173,7 +175,8 @@ int main(int argc, char **argv) {
|
|||||||
compiler += " " + standard;
|
compiler += " " + standard;
|
||||||
ifstream fs("hyper.cpp");
|
ifstream fs("hyper.cpp");
|
||||||
|
|
||||||
system("mkdir -p " + obj_dir);
|
retval = system("mkdir -p " + obj_dir);
|
||||||
|
if (retval) { printf("unable to create output directory!\n"); exit(retval); }
|
||||||
|
|
||||||
ofstream fsm(obj_dir + "/hyper.cpp");
|
ofstream fsm(obj_dir + "/hyper.cpp");
|
||||||
fsm << "#if REM\n#define INCLUDE(x)\n#endif\n";
|
fsm << "#if REM\n#define INCLUDE(x)\n#endif\n";
|
||||||
@ -271,9 +274,13 @@ int main(int argc, char **argv) {
|
|||||||
else if (tasks_done == tasks_amt) { finished = true; break; }
|
else if (tasks_done == tasks_amt) { finished = true; break; }
|
||||||
} this_thread::sleep_for(quantum); }
|
} this_thread::sleep_for(quantum); }
|
||||||
|
|
||||||
if (mingw64) (void)system("windres hyper.rc -O coff -o hyper.res");
|
if (mingw64) {
|
||||||
|
retval = system("windres hyper.rc -O coff -o hyper.res");
|
||||||
|
if (retval) { printf("windres error!\n"); exit(retval); }
|
||||||
|
}
|
||||||
|
|
||||||
printf("linking...\n");
|
printf("linking...\n");
|
||||||
system(linker + allobj + libs);
|
retval = system(linker + allobj + libs);
|
||||||
|
if (retval) { printf("linking error!\n"); exit(retval); }
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user