Sponsored Content
Top Forums Shell Programming and Scripting Capture makefile errors in shell script Post 302491895 by DC Slick on Friday 28th of January 2011 03:06:46 PM
Old 01-28-2011
Quote:
Originally Posted by citaylor
Code:
make > log 2>&1
if [ "$?" -ne 0 ]; then
   echo "Build failed"
   cat log
fi

The above explained if you're new, "Run make and redirect both the errors and the standard output to 'log'. If the exit status of make '$?' is not equal to 0 ( -ne 0 where exit status 0 means it ran successfully) then say "Build failed" and show log file. Not that you needed it but someone else reading it may. :-)

Last edited by DC Slick; 01-28-2011 at 04:07 PM.. Reason: clarification
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to capture compilation errors with Makfile

Hello I have big compilation project when I run the top make file I have problem to find the errors that acres in the sub directories because the make file keeps Running the compilation. is there any way to perform summry of the errors when the Top makefile done running ? thanks (2 Replies)
Discussion started by: umen
2 Replies

2. 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

3. Shell Programming and Scripting

shell script in makefile

Hi, Can we execute a shell script by makefile. I mean we will write a shell script in a make file and it will be executed when we compile the C++ program using make file. (2 Replies)
Discussion started by: surjyap
2 Replies

4. UNIX for Dummies Questions & Answers

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... (3 Replies)
Discussion started by: SkySmart
3 Replies

5. Shell Programming and Scripting

Shell script makefile

Is there a way to write a makefile for all the source files in a directory with a shell script? (2 Replies)
Discussion started by: zzhan
2 Replies

6. Shell Programming and Scripting

Script to capture errors

Hello; I'm trying to write a script to capture any hardware error from logs/syslog on my SUSE 10 servers so i can be notified if we have any hardware issues such a bad fan or battery, etc.. Thanks in advance for any help (2 Replies)
Discussion started by: Katkota
2 Replies

7. Shell Programming and Scripting

Script to capture date/time in seconds in PERL... Cant understand errors

I'm Using this script to find the time of a file. I'm very much new to PERL and found this script posted by some one on this forum. It runs perfectly fine, just that it gives me following errors with the accurate output as well. I jus want the output to be stored in another file so that i can... (0 Replies)
Discussion started by: bankimmehta
0 Replies

8. Shell Programming and Scripting

Shell script to capture ORA errors from Alert Log

Hi, as the title says, I am after a simple script, which will open the Alert log from an 11.2.0.1 Linux environment and mail the error message and description to a recipient email address. I can then schedule this job via cron and let it run every 15 minutes. I have searched online... (16 Replies)
Discussion started by: jnrpeardba
16 Replies

9. Shell Programming and Scripting

using a Shell Script in a Makefile

Hello, I have a Makefile that converts wrl (vrml) files to html files... how can I use a shell script in that makefile which works on all html files after converting? The Shell Script have to find and replace a String in every createt html file. sorry I'm a Newbie, so I hope someone can... (0 Replies)
Discussion started by: Dan_78
0 Replies

10. Shell Programming and Scripting

Shell script to capture Current day ORA errors from Alert Log

Please provide Shell script to capture ORA errors from Alert Log for a given date or Current date. -Veera (1 Reply)
Discussion started by: Veera_V
1 Replies
jfs_fsck(8)						  JFS utility - file system check					       jfs_fsck(8)

NAME
jfs_fsck - initiate replay of the JFS transaction log, and check and repair a JFS formatted device SYNOPSIS
jfs_fsck [ -afnpvV ] [ -j journal_device ] [ --omit_journal_replay ] [ --replay_journal_only ] device DESCRIPTION
jfs_fsck is used to replay the JFS transaction log, check a JFS formatted device for errors, and fix any errors found. device is the special file name corresponding to the actual device to be checked (e.g. /dev/hdb1). jfs_fsck must be run as root. WARNING
jfs_fsck should only be used to check an unmounted file system or a file system that is mounted READ ONLY. Using jfs_fsck to check a file system mounted other than READ ONLY could seriously damage the file system! OPTIONS
If no options are selected, the default is -p. -a Autocheck mode - Replay the transaction log. Do not continue fsck processing unless the aggregate state is dirty or the log replay failed. Functionally equivalent to -p. Autocheck mode is typically the default mode used when jfs_fsck is called at boot time. -f Replay the transaction log and force checking even if the file system appears clean. Repair all problems automatically. -j journal_device Specify the journal device. -n Open the file system read only. Do not replay the transaction log. Report errors, but do not repair them. --omit_journal_replay Omit the replay of the transaction log. This option should not be used unless as a last resort (i.e. the log has been severely corrupted and replaying it causes further problems). -p Automatically repair ("preen") the file system. Replay the transaction log. Do not continue fsck processing unless the aggregate state is dirty or the log replay failed. Functionally equivalent to -a. --replay_journal_only Only replay the transaction log. Do not continue with a full file system check if the replay fails or if the file system is still dirty even after a journal replay. In general, this option should only be used for debugging purposes as it could leave the file system in an unmountable state. This option cannot be used with -f, -n, or --omit_journal_replay. -v Verbose messaging - print details and debug statements to stdout. -V Print version information and exit (regardless of any other chosen options). EXAMPLES
Check the 3rd partition on the 2nd hard disk, print extended information to stdout, replay the transaction log, force complete jfs_fsck checking, and give permission to repair all errors: jfs_fsck -v -f /dev/hdb3 Check the 5th partition on the 1st hard disk, and report, but do not repair, any errors: jfs_fsck -n /dev/hda5 EXIT CODE
The exit code returned by jfs_fsck represents one of the following conditions: 0 No errors 1 File system errors corrected and/or transaction log replayed successfully 2 File system errors corrected, system should be rebooted if file system was mounted 4 File system errors left uncorrected 8 Operational error 16 Usage or syntax error 128 Shared library error REPORTING BUGS
If you find a bug in JFS or jfs_fsck, please report it via the bug tracking system ("Report Bugs" section) of the JFS project web site: http://jfs.sourceforge.net/ Please send as much pertinent information as possible, including the complete output of running jfs_fsck with the -v option on the JFS device. SEE ALSO
fsck(8), jfs_mkfs(8), jfs_fscklog(8), jfs_tune(8), jfs_logdump(8), jfs_debugfs(8) AUTHORS
Barry Arndt (barndt@us.ibm.com) William Braswell, Jr. jfs_fsck is maintained by IBM. See the JFS project web site for more details: http://jfs.sourceforge.net/ October 29, 2002 jfs_fsck(8)
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy