This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: reduce compilation times?


Hi!

> This is where automated tools come in handy.  In my projects, I have
> scripts that pick up source files and insert them into the
> makefile(s). So with very little fuss I can add new files (either new
> functionality or new split up code).
> 
> It really depends on the size of the class whether factoring makes
> sense or not.  but if you have heaps of 3000+ line long functions, I
> suspect you spend enough time searching through them as is.
> 
> When I was working on DB2 and scouring their often 6000+ line files
> looking for why GCC 4.whatever.beta wasn't working as hot as it could,
> it wasn't exactly a lot of fun.

I agree with such big files beeing no fun at all. I managed to keep a
structure where files don't get longer than say 500 lines.

> 
> 
>> BTW: has gcc a mechanism to determine, wether a change in a header
>> file affects a particular .cpp file? Microsoft has... They skip
>> every file where no affecting changes are detected...
>> 
> Can't a makefile do that?
> 
> file.o: file.H file.C
> 
> Yes that works fine with GNU Make
> 
> -bash-3.1$ make
> make: `ctmp1.o' is up to date.
> -bash-3.1$ touch ctmp.H
> -bash-3.1$ make
> g++    -c -o ctmp1.o ctmp1.C
> -bash-3.1$ cat Makefile
> ctmp1.o: ctmp.H ctmp1.C
> 
> It's almost like, if you engineer your builds correctly, these are
> "non-issues."
> 
> I don't want to make this personal, but honestly, if you're going to
> try and give out advice, at least know what you are talking about. 
> There are actual proper ways to do things that reduce errors, increase
> productivity, etc, etc.

You didn't get the question: i was asking if a *change* in a header is
recognized to affect a *certain* .cpp file, not how make handles
dependencies and updates targets. Micorosft recognizes that a change in
a certain struct inside a header file may not require a recompilation of
a certain .cpp file if it doesn't use that struct. Thats what i asked
for.

Also i have absolutely no problem with managing my builds correctly. One
part of my job is organizing, managing and building about 80 software
packages...

As far as getting personal is concerned: You are free to get personal if
you like, still i really know very well what i'm talking about, since im
make my money with this. You can easily recognize things that i don't
know by those question marks behind my sentences.

Cheers, Markus

> 
> Tom


-- 
5. Dezember 2007
Salomon Automation am  Schweizer Forum fur Logistik, Lausanne, CH




Salomon Automation GmbH - Friesachstrasse 15 - A-8114 Friesach bei Graz
Sitz der Gesellschaft: Friesach bei Graz
UID-NR:ATU28654300 - Firmenbuchnummer: 49324 K
Firmenbuchgericht: Landesgericht fur Zivilrechtssachen Graz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]