LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need Help Urgently (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-urgently-882774/)

maverick9888 05-26-2011 02:02 AM

Need Help Urgently
 
Hi Guys,
I doing some stuff with make command in Linux. And am stuck at some point.
Consider that I am building my application in Linux shell using make command but somehow the build fails.

Is there any way I can find out that the build has failed (of course looking at shell for error messages will do the job for me but I don't want that).

Is there any flag make or shell will set/reset if such failure occurs ?

Thanks in Advance :-)

Nylex 05-26-2011 02:04 AM

Presumably make returns a non-zero value on failure and in Bash, the return value is stored in the variable $?, so you can test that.

Also, please use descriptive thread titles, as you're told to when you post a thread. This isn't urgent for anyone here, either, as LQ is a volunteer site.

paulsm4 05-26-2011 02:10 AM

From "man make":
Code:

...
EXIT STATUS
      GNU make exits with a status of zero if all makefiles were successfully
      parsed and no targets that were built failed.  A status of one will  be
      returned  if  the  -q  flag  was used and make determines that a target
      needs to be rebuilt.  A status of two will be returned  if  any  errors
      were encountered.


John VV 05-26-2011 02:34 AM

without knowing the details and information we can not help

your post is like calling the car mechanic on the telephone and asking him to tell you what is wrong be telling him
" the car dose not work"

some unknown program will not build using make on some unknown OS using some unknown version of the gcc tools using some unknown instructions
without knowing if configure worked
and without knowing if this is a Makefile project

maverick9888 05-26-2011 02:36 AM

Thanx to both of u Nylex and paulsm4 :-)

@Nylex: Sorry for the title. Will be carefull next time.

TobiSGD 05-26-2011 05:08 AM

Quote:

Originally Posted by John VV (Post 4367377)
without knowing the details and information we can not help

your post is like calling the car mechanic on the telephone and asking him to tell you what is wrong be telling him
" the car dose not work"

some unknown program will not build using make on some unknown OS using some unknown version of the gcc tools using some unknown instructions
without knowing if configure worked
and without knowing if this is a Makefile project

This doesn't apply to the question at all:
Quote:

Is there any way I can find out that the build has failed (of course looking at shell for error messages will do the job for me but I don't want that).

Is there any flag make or shell will set/reset if such failure occurs ?
Th OP don't want help with building, he wants to know if make reports a build failure via a variable or flag.


All times are GMT -5. The time now is 10:00 AM.