Silent compilation

2004-06-17 Thread Steffen Boerm

Hi.

Is it possible to reduce the amount of information printed by
the Makefiles when compiling or linking?

Simply using the .SILENT: ... pseudo-target goes a little too
far, I would prefer something similar to the behaviour of the
Linux kernel Makefiles, e.g., printing only the line

  Compiling foo.c

when foo.c is compiled.

Is there a portable way of doing this?

Best regards,
Steffen 8-)




Re: Silent compilation

2004-06-17 Thread Simon Richter
Hi,

 Simply using the .SILENT: ... pseudo-target goes a little too
 far, I would prefer something similar to the behaviour of the
 Linux kernel Makefiles, e.g., printing only the line

   Compiling foo.c

 when foo.c is compiled.

 Is there a portable way of doing this?

Modifying the rules that are output to silently compile and echo stuff,
sure.

But: Who wants that? When I compile something, I'm always happy to see
the full command line, as it allows me to see missing or wrong flags
instantly, rather than in some misbehaviour later. Even the Linux kernel
has an option to view the full command lines, for exactly that reason.

People that are scared by a compiler command line should not be
compiling stuff themselves, especially since these are usually the
people that compile stuff just because their distribution is not
P4-optimized.

   Simon

-- 
GPG Fingerprint: 040E B5F7 84F1 4FBC CEAD  ADC6 18A0 CC8D 5706 A4B4


signature.asc
Description: Digital signature


Re: Silent compilation

2004-06-17 Thread Thomas Dickey
On Thu, 17 Jun 2004, Simon Richter wrote:

 Hi,

  Simply using the .SILENT: ... pseudo-target goes a little too
  far, I would prefer something similar to the behaviour of the
  Linux kernel Makefiles, e.g., printing only the line

Compiling foo.c

  when foo.c is compiled.

  Is there a portable way of doing this?

 Modifying the rules that are output to silently compile and echo stuff,
 sure.

 But: Who wants that? When I compile something, I'm always happy to see
 the full command line, as it allows me to see missing or wrong flags
 instantly, rather than in some misbehaviour later. Even the Linux kernel
 has an option to view the full command lines, for exactly that reason.

hmm - instantly.

Of course you're accustomed to reading 1000-character lines, which differ
only by the last few.  Kind of a waste of mental energy.  Learn to use
tools (someday ;-)

 People that are scared by a compiler command line should not be
 compiling stuff themselves, especially since these are usually the
 people that compile stuff just because their distribution is not
 P4-optimized.

people who have that sort of attitude probably are not producing much
more than large logfiles.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




Re: Silent compilation

2004-06-17 Thread Steffen Boerm

Hi,

  Simply using the .SILENT: ... pseudo-target goes a little too
  far, I would prefer something similar to the behaviour of the
  Linux kernel Makefiles, e.g., printing only the line
 
Compiling foo.c
 
  when foo.c is compiled.
 
  Is there a portable way of doing this?
 
 Modifying the rules that are output to silently compile and echo stuff,
 sure.

What is the best way of doing this?

 But: Who wants that? When I compile something, I'm always happy to see
 the full command line, as it allows me to see missing or wrong flags
 instantly, rather than in some misbehaviour later. Even the Linux kernel
 has an option to view the full command lines, for exactly that reason.

Of course I would like to have an _option_ to view the full command line
when porting my library to a new operating environment, but when I'm
working on the C sources, it is much easier to find compiler warnings if
they don't hide among lots of long (more than 500 characters for some
strange libraries on strange systems) compiler command lines.

Best regards,
Steffen 8-)






Re: Silent compilation

2004-06-17 Thread Paul F. Kunz
 On Fri, 18 Jun 2004 01:02:54 +0200, Steffen Boerm [EMAIL PROTECTED] said:


 Of course I would like to have an _option_ to view the full command
 line when porting my library to a new operating environment, but
 when I'm working on the C sources, it is much easier to find
 compiler warnings if they don't hide among lots of long (more than
 500 characters for some strange libraries on strange systems)
 compiler command lines.

   Try compiling under emacs.  Do ESC-x, then type compile in a
buffer that has a file in the same directory as your Makefile.  After
compilation, you can find the warnings and errors with Ctrl-x `.
This not only shows you the warning, but opens the file at the line of
the warning or error.  Even before doing the latter, the warnings and
errors appear in red while the compiler command lines are in black.

   Emacs the ideal IDE :-).





Re: Silent compilation

2004-06-17 Thread Thomas Dickey
On Thu, 17 Jun 2004, Paul F. Kunz wrote:

Try compiling under emacs.  Do ESC-x, then type compile in a
 buffer that has a file in the same directory as your Makefile.  After
 compilation, you can find the warnings and errors with Ctrl-x `.
 This not only shows you the warning, but opens the file at the line of
 the warning or error.  Even before doing the latter, the warnings and
 errors appear in red while the compiler command lines are in black.

most programmer's editors written after 1990 implement a similar feature.
(editors that don't are of course directed to a different set of users).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net