[H-GEN] gnu make command-line target ordering problems?

Raymond Smith raymonds at uq.net.au
Tue Oct 19 01:57:59 EDT 1999


[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]

On Tue, 19 Oct 1999, Anthony Towns wrote:
> I don't get this. How is the template library built: all at once, or by
> adding bits at a time? Is it before/after/concurrent with building the
> .o objects? Do the .o files depend on the template libraries as well as
> the source, or do they just have to be linked together later?

The Sun C++ compiler automagically generates a Templates.DB directory in
each directory. This contains the .o files matching the specialisations in
your source files.

There may be supporting template libraries that you need to link in as
well. But these are seperate from the specialisations of your individual
source files. [Am I actually making sense -- I have had not enough caffine 
today.]

> Actually, I'm doubly confused. I assume the template libraries are
> pseudo object code for templates you define in .c files instead of
> .h files? In that case I'm not sure why you don't have:

There are no template libraries. There is a Templates.DB directory. This
contains .o files with illuminating names of random line noise that cannot
be infered from the source files. The .o files are real object code.

I am not fully at one with these repositories. Often you do _not_ need to
delete them before rebuilding your code. However the Sun C++ compiler does
not always detect new, implicit, specialisations. This can lead to very
strange results (ie, unexpected cores).

I have not come across a good way to solve this. Generally projects i have
been on have supplied the usual clean rule and a clobber rule (that
removes the Templates.DB, and maybe things like generated CORBA stubs).
Developers then use their discretion for development and unit test. For
system builds we have tended to have a "BIGMAKE" script that is custom
writ to execute makes in appropriate orders across the hierarchy and then
do whatever packaging is required for delivery.

This has tended to work better than trying to develop makefile rules for
incremental development and builds, and system-wide builds.

Cheers,

Raymond.

---
raymond at humbug.org.au              The early bird catches the worm, 
                                       but the second mouse eats the cheese


--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list