baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
Hi
Recently I have been developing some stuff in c and to compile the code i am using classic makefile approach. But my code kept getting bigger and bigger and more complicated. So i realized that i need to make a shell script to orchestrate the entire make procedure. Since all linux platforms (and unix) support basic perl I decided to build my sources using a simple perl script (How smart is that ?? - not a rhetorical question). and every time i need to execute make i use regular system command
UPDATE: cd ... are used to move through directories since each build directory contains different make file and is build according to different make rulessystem("cd ... ; make this; cd ...");
END UPDATE
now if i run into errors i would like to know when they happened at make runtime, that is why system is a good option for me. But on the other hand, if any errors do occur, then my perl script since it has no info about that err, just continues further on s, which is bad.
My question is how to bypass this problem and capture the error or just the status that the error occurred? (Limits: if i use qx then i do not get the runtime compilation reports which is bad) I tried redirecting the error to a file and the reading it after each make but then my errors are clustered together in one place, which, againi is bad.
any suggestions ?
Thank you
baxy
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Capture the make status
by RichardK (Parson) on Aug 26, 2013 at 12:39 UTC | |
Re: Capture the make status
by Corion (Patriarch) on Aug 26, 2013 at 11:56 UTC | |
by baxy77bax (Deacon) on Aug 26, 2013 at 12:00 UTC | |
by Corion (Patriarch) on Aug 26, 2013 at 13:24 UTC | |
Re: Capture the make status
by daxim (Curate) on Aug 26, 2013 at 12:02 UTC | |
Re: Capture the make status
by choroba (Cardinal) on Aug 26, 2013 at 11:59 UTC | |
Re: [SOLVED] Capture the make status
by Laurent_R (Canon) on Aug 26, 2013 at 17:50 UTC | |
by Anonymous Monk on Aug 26, 2013 at 21:07 UTC |