When I compile a larger list of files, i.e. a library, MS VC shows something like "compiling source.c" while GCC doesn't show anything, only warnings/errors. Can I make GCC show the filenames? Thanks
??? As gcc is a command line tool only, you control which files are compiled, by typing their names in the command. If you use make with a makefile, gcc should be called individually for each source file, and you cann see the command line for each source file. Oliver
I use the makefile, yes, with -s option (silent, probably). Otherwise the screen is full of garbage (well, lots of unimportant information). MS VC, on the other hand, simply shows "compiling source.c", and not the complete path and each and every single command line option. Thats what I want, just a simple "compiling source.c". It can't be done? (w/o changing the makefile, and adding echo)
You can try something like this:
make -s CC="@echo \"compiling $@\"; gcc" CXX="@echo \"compiling $@\"; g++"
But better you change the makefile.
gcc is blank compiler but as mentioned already make is used to process the files. It displays already which file is being compiled like here.. make all-am make: Entering directory `/home/blah/src/banner-1.3.2' gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -c banner.c gcc -g -O2 -o banner banner.o ..but I think there is a misconception what make is intended for. The approach is totally different compared to the MS stuff. For instance make is also used for building sendmail config files or NIS maps. These have nothing to do with compiling. make provides a macro language to process files this includes compiling but it is not limited to that. You can edit the Makefile to add "compiling <blah"> but nobody else would do so because the information is already provided by a regular make run.
MS VC is the one that shows "compiling source.c", not the makefile. GCC should be able to do the same, AFAIC. But, I'll have to change the makefile, its not that hard after all.
A. S. wrote: > MS VC is the one that shows "compiling source.c", not the makefile. > GCC should be able to do the same, AFAIC. No. There is no reason for a diagnostic message for a file that compiles fine. http://gcc.gnu.org/onlinedocs/gcc/Translation-implementation.html#Translation-implementation GCC does not print garbage, it's your Makefile setup. Write a proper Makefile to fit your needs.
And also for MS, most messages came from MSBuild (slightly M$ equivalent to make), not from the compiler.
> There is no reason for a diagnostic message for a file that compiles fine. For big projects it is sometimes nice to see the compiling progress to estimate the time you have for your coffee and/or cigarette :) But as you already said: "Write a proper makefile to fit your needs."
Or use cmake to generate a Makefile. It does exactly that.