Exit from the catalog .....?

When I compile my code with make files (I have 12 make files), the make.exe[1]: Leaving directory Error 2 error message make.exe[1]: Leaving directory Error 2 What is the reason for this? Also what does β€œError 2 or Error 1” mean?

+6
makefile
source share
1 answer

When creating "Error 2" fingerprints in this context, it simply means that an error occurred in the recursive call to make. You should look at the error messages preceding this message to determine what the real problem is in the signatures. For example, given a Makefile like this:

 all: $(MAKE) -f sub.mk 

... and sub.mk:

 all: @exit 1 

When I run GNU make, it prints the following:

 gmake -f sub.mk gmake[1]: Entering directory `/tmp/foo' gmake[1]: *** [all] Error 1 gmake[1]: Leaving directory `/tmp/foo' gmake: *** [all] Error 2 

Error 2 tells me that there was some kind of error in the backbone. I should look above this message for the Error 1 message from the subclass itself. There I see that some command that was called when trying to build all came out of exit code 1. Unfortunately, in fact, there is no standard that defines exit codes for applications, for the trivial "exit code 0 means" OK. " look at a specific command that failed and check its documentation to determine what a specific exit code means.

These error messages have nothing to do with errno Unix values, as others have pointed out. The outermost β€œ2” is just an error code that it assigns itself when a miss has an error; internal "1" is just the exit code for the failed command. It can also be easily β€œ7” or β€œ11” or β€œ42”.

+8
source share

All Articles