[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make, Implicit Rules, and Better Output
From: |
Michael Aaron Safyan |
Subject: |
Make, Implicit Rules, and Better Output |
Date: |
Sun, 01 Jul 2007 23:33:38 -0500 |
User-agent: |
Thunderbird 1.5.0.12 (Macintosh/20070509) |
For each target xxx, I have a corresponding file $(LOGDIRECTORY)/xxx.log
and I would like to redirect the typical make output to that particular
file, while printing to the console a more "neat" message. For example,
if I run "make xxx" I would like to see output such as the following:
Compiling: x.cpp => x.o
Compiling: y.cpp => y.o
Compiling: z.y => z.c
Compiling: z.c => z.o
Linking: x.o, y.o, z.o => prog
While it outputs the above, it should write out the longer -- somewhat
less appealing -- output "g++ -I... " to the log files. If any of the
steps fail, I would like to see something like the following:
Type "make xxx_log" to view log.
** Make [2] error
My main issue is that I have tried using pattern rules to create such an
output, but make seems to ignore the pattern rules I have defined.
Additionally, I have not seen any examples dealing with the .cpp pattern
rule; only examples for .c.
Can anyone help? Thanks.
- Make, Implicit Rules, and Better Output,
Michael Aaron Safyan <=