diff --git a/mymake.cpp b/mymake.cpp index 183d4b04..e3a72988 100644 --- a/mymake.cpp +++ b/mymake.cpp @@ -91,9 +91,11 @@ int main(int argc, char **argv) { #else set_linux(); #endif + int retval = 0; // for storing return values of some function calls for(string fname: {"Makefile.loc", "Makefile.simple", "Makefile"}) 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; } for(int i=1; i