From 253061a4fda32d19ecceb3f6359e9a66cd134e49 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Thu, 24 Sep 2020 21:36:47 +0300 Subject: [PATCH] stop ignoring return values of some calls --- mymake.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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