Forcing Makefile to Ignore Errors


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Forcing Makefile to Ignore Errors
# 1  
Old 08-13-2008
Forcing Makefile to Ignore Errors

Is there A way I can Force a makefile to ignore errors? i believe it is using gcc.

i have a set of commands in the makefile that i want to run and each time the makefile gets to the point of this commands, it aborts because of the commands.

how can i get the makefile to keep running despite the errors it comes across as a result of my newly inputted commands?

thanks
# 2  
Old 08-13-2008
Unfortunately you did not tell us which particular make you are using - gmake, make, nmake, etc.
# 3  
Old 08-13-2008
The concept of a make is that it is error free, warning free or it is no good.
Remove your offending commands if the syntax is causing an error.

make -i ignores all errors
You can add a - (hyphen) as a prefix to a given command, this causes make to ignore the fact that it failed.
I think -i and the - are pretty standard.

But. If you have errors you did not have a good compile. IF the code runs correctly it is by accident.
# 4  
Old 08-13-2008
thanks everybody.

this makefile is a shell script.

i understand your point about removing the offending commands but i have looked at the offending commands and their results and i have determined their results aren't harmful.

in the makefile, i have a set of "make installs" that runs in specific directories. the "make installs" works OK in most of the directories but doesn't in 1 or 2.

my questino is, how do i get the makefile to keep going regardless of if the make installs complete successfully or not.

and by the way, the makefile is using /usr/local/bin/ginstall (not sure if that helps) gcc

this is the command i'm running in the source directory:

fakeroot gmake clean all install buildpkg
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Forcing a write to a file without newline?

Hello, I am writing a program which runs with root privileges, and it creates a child with lowered privileges and has to redirect it's stdout and stderr to a file and then run bash. The problem is, whenever I read this file, I want to see all of the current output, even when the program is still... (10 Replies)
Discussion started by: madd-games
10 Replies

2. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

3. UNIX for Dummies Questions & Answers

How to ignore errors in script

I have a simple script that processes files. Here's a simplified example of what I'm doing: foreach t (web.*) mv $t dnw$t:e.log end foreach t (card.*) mv $t card$t:e.log end The problem is that sometimes there is no web.* file. In that case, I get an error "foreach: No match" and... (4 Replies)
Discussion started by: software5723
4 Replies

4. Shell Programming and Scripting

Capture makefile errors in shell script

Hi, I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script? Thanks, S (2 Replies)
Discussion started by: suryaemlinux
2 Replies

5. UNIX for Dummies Questions & Answers

cp/ditto and ignore I/O errors?

Hi I am copying some old CDs to HD and while copying a lot of them have I/O errors. What I'm doing right now is sudoing the cp command to force the cp to finish but when I do this it takes about an hour to copy 500mb, which without errors would normally take 2-3 minutes. I assume it takes so... (0 Replies)
Discussion started by: dloruss1
0 Replies

6. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

7. Programming

makefile errors

We are trying to compile an interface from our ERP to vertex tax package. We need to do this in C. We are on solaris 9 going to oracle 9i on aix. When we run our makefile we are getting this error Fatal error -- Assertion failed: file "../src/ild-args.c" line 1613 Exiting Any help... (3 Replies)
Discussion started by: MizzGail
3 Replies

8. Solaris

forcing users to su

Is there a way in solaris 9 to prevent a user to login via ssh, telnet, rlogin, and only be able to su as that user, for example have DBA joe blow login as jblow, and then su to oracle BUT not vice versa have DBA joe blow login as oralce (6 Replies)
Discussion started by: csaunders
6 Replies

9. UNIX for Advanced & Expert Users

forcing su on a user

This is for 3 os's, AIX, Solaris, and AIX, didnt want to post three seperate times on the same subject, anyways, I want to force the user MQM to su, i.e. not be able to rlogin/telnet to the box as user MQM, only login as there ID(chris for example) and su to MQM, does anyone know how to do this,... (4 Replies)
Discussion started by: csaunders
4 Replies
Login or Register to Ask a Question