config.site

Alexander E. Patrakov patrakov at ums.usu.ru
Sun Oct 30 04:44:13 PST 2005


Hello,

it has been proposed to utilize the config.site file in order to 
minimize the number of "ifdef cross" constructions in the LiveCD 
makefiles. The cruft I am talking about usually has this form:

compile-stage2:
ifndef CROSS
         ./configure --prefix=/usr --libdir=/usr/lib64
else
         CC="gcc $(64FLAGS)" ./configure --prefix=/usr
endif
         make $(PM)
         make install

It is possible to avoid passing repeatedly such CC="gcc -m64", 
--prefix=/usr, and --libdir=/usr/lib{,64} flags by using the config.site 
file, as DIY Linux currently does.

If ths technique is implemented in both books, I will be able to 
simplify this to:

compile-stage2:
         ./configure
         make
         make install

(the whole difference is hidden in one config.site file instead of 
popping up in all Makefiles)

But now, when I try to implement config.site, this hits some 
inconsistencies in the book (e.g. sometimes --build is passed to 
packages configured with --prefix=/tools, sometimes not). So my attempt 
to implement it tends to end up with something that is different from 
both books, which is probably not acceptable. The difference is, 
supposedly, only in flags that are ignored by the ./configure scripts, 
but that needs to be validated. I have no 64-bit machine, so I can't do 
this validation.

Thus, I have reverted my attempt to utilize config.site. Sorry.

-- 
Alexander E. Patrakov



More information about the lfs-dev mailing list