RE: Proposal for toolset modifications for LSB-Desktoprelease

Stew Benedict <[email protected]> Thu, 5 Jan 2006 06:30:17 -0500 (EST)
Newsgroups gmane.linux.lsb.test-suite
Message-ID <[email protected]>
On Wed, 4 Jan 2006, Wichmann, Mats D wrote:

> 
> >>special case: I'm reluctant to use a command-line option for
> >>lsbcc as we don't know for sure what the back-end compiler will
> >>be.  In the case of gcc it doesn't currently appear to use
> >>the -T option, which is unusually lucky, but you could call
> >>a different compiler.  So we may want to handle lsbcc differently.
> >>
> >
> >We can create a shell variable to specify the product, if it 
> >is not declared then have default behavior, else specify 
> >product string to shell variable. 
> 
> thinking out loud here...
> 
> Most other lsbcc behavior is controlled through environment
> variables, so there's a consistent feel to that.
> 
> A goal for lsbcc has been that the way the compiler is invoked
> in existing makefiles not need to be changed when possible...
> i.e., I still have this feeling that it's good if we can say 
> "CC=lsbcc make", or maybe "CC=lsbcc ./configure ; make".  A
> new environment variable could work for the former:
> 
> CC=lsbcc LSBCC_TYPE=desktop make
> 
> but I'm not sure we can automatically make that work through
> other tools like autoconf, so it might need a command-line
> option after all so we do:
> 
> CC="lsbcc --target=desktop" ./configure ; make
> 

What about something like the method gtk-config uses?

Usage: gtk-config [OPTIONS] [LIBRARIES]
Options:
        [--prefix[=DIR]]
        [--exec-prefix[=DIR]]
        [--version]
        [--libs]
        [--cflags]
Libraries:
        gtk
        gthread

And I believe it picks up more devel libraries as they're installed.
LSB would use modules in place of Libraries.

So you'd have something like CC=lsbcc CFLAGS=`lsb-config --cflags 
<module>`...

-- 
Stew Benedict
Mandriva