[Coin-discuss] interpret this please

Laszlo Ladanyi ladanyi at us.ibm.com
Fri Jul 29 15:33:56 EDT 2005


Hi Mike,

It is function for make. In make you can define functions. In this case, later
the construct '$(call ifprefix,$(SHLINKPREFIX),$(LIBDIRS))' is used. This will
call ifprefix, which checks whether SHLINKPREFIX is empty or not. If it is,
then nothing needs to be added to the libdirs, otherwise the value of
SHLINKPREFIX will be prepended to each libdir. (E.g., when static libs are
used then SHLINKPREFIX is set to empty.) Granted, the value of SHLINKPREFIX
could be tested everywhere where ifprefix is used, but this seemed a better
solution.

In general the makefiles in any project first include Makefile.location to
know where everything is; then inlude Makefile.coin, which in turn includes
Makefile.<platform>. This latter two specify platform dependent compiler
names, flags, etc. The remaining two makefiles: Makefile.lib does the final
munging of dependency and object file names as well as defines targets when
libs are created; Makefile.rules specify how various source types need to be
compiled.
BTW, I have found a cleaner and more foolproof way of automatically creating
dependencies which has the added benefit of likely to get rid of at least one
of the last two Makefiles.

QUESTION: Right now the name of targetdir includes the platform and
optimization level. What do people think? Is this necessary? Should the target
dir simply be 'obj'?

--Laci

On Fri, 29 Jul 2005, Michael Hennebry wrote:

> 
> export ifprefix = $(if ${1},$(addprefix ${1},${2}),)
> 
> It's in Makefiles/Makefile.coin .
> How is it used?
> When are ${1} and ${2} expanded?
> Why is it?
> 
> Between the includes, the recursive calls,
> and the complex individual constructions,
> the build system is pretty much impossible
> for me to follow.
> 
> I forgot to mention the rather hairy mechanisms
> for getting arguments to the compiler.
> The latter, especially the -D's,
> are the primary reason I even use COIN
> build system instead of replacing it
> with something I can understand.
> 
> -- 
> Mike   hennebry at web.cs.ndsu.NoDak.edu
> "There are three kinds of people,
> those who can count and those who can't."
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 




More information about the Coin-discuss mailing list