LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2011, 02:02 AM   #1
maverick9888
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: Disabled
Red face 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 :-)
 
Old 05-26-2011, 02:04 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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.

Last edited by Nylex; 05-26-2011 at 02:06 AM.
 
Old 05-26-2011, 02:10 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
Old 05-26-2011, 02:34 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
0 members found this post helpful.
Old 05-26-2011, 02:36 AM   #5
maverick9888
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanx to both of u Nylex and paulsm4 :-)

@Nylex: Sorry for the title. Will be carefull next time.
 
Old 05-26-2011, 05:08 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by John VV View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Me urgently rajendrasingh1234 ROCK 4 01-15-2009 01:26 PM
Need Help Urgently!!! chinmays Linux - Software 5 01-23-2006 09:36 AM
Help me Urgently cherukumilli Linux - General 3 12-29-2004 12:17 PM
Somebody urgently help me !!! apache *BSD 2 07-21-2004 07:01 AM
Need help urgently Thomas.P Linux - Newbie 2 05-30-2001 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration