Re: Can gcc show status of a compilation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/18/2010 6:33 AM, Greatwolf wrote:
Thank you for the suggestion though unfortunately not every build system
can accomodate easily what you propose. Sometimes I do infact pass all
the source files in at once when I want a full rebuild.

You can easily write a rule for make to perform a rebuild. For example, most makefiles I've used include a "clean" target, which deletes all generated files (.o, .exe, etc), as well as an "all" target that builds everything that needs to be built. Combining those two to implement "rebuild" is as easy as:

  rebuild: clean all

At least, I think that's the proper syntax. It's been a while since I created a makefile from scratch.

I'd imagine this is a rather easy feature to add to gcc, if I were to
implement this and submit a patch for it, would it be accepted? (assuming
coding style and etiquette are followed)

I can't answer whether it would be accepted or not, since I don't work on gcc. However, I still think your time would be much better spent learning how to use make (or some similar tool) instead.

Another big benefit of using make is that it can perform multiple tasks (compiles) in parallel, to speed up builds. Naturally, this can be especially helpful on multiprocessor/core machines.

Here are a few links to tutorials about make (and GNU make):

  http://www.cs.umd.edu/class/fall2002/cmsc214/Tutorial/makefile.html
  http://frank.mtsu.edu/~csdept/FacilitiesAndResources/make.htm
  http://developers.sun.com/solaris/articles/make_utility.html
  http://developers.sun.com/solaris/articles/parallel_make.html

Good luck!

-Tony


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux