[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment variables, debian/rules and dpkg-buildpackage

On Sun, 2009-05-10 at 23:37 +0300, Peter Eisentraut wrote:
> On Sunday 10 May 2009 13:56:04 Steve Langasek wrote:
> > I thought it was generally recognized that it's a Bad Idea to implement
> > config files using your interpreter's 'include' functionality, but that's
> > basically what we have here.
> Guillem pointed out one problem: Either you do it via a make include (which 
> you have issues with), or you stop supporting calling debian/rules directly 
> (inconvenient, probably prone to break things), or you require every package 
> to handle it itself (unreliable, stupid) -- or you have the current situation, 
> which is somewhere in the middle.  For example, you possibly get something 
> different depending on whether you call debian/rules, dpkg-buildpackage, 
> debuild, or pbuilder.  And the difference is hard to explain or analyze.

What about having a dh_config - e.g.
CFLAGS := dh_config CFLAGS

That can look it up via a config file, environment variable etc, and
returns the decided answer. Should be consistent for all ways of
invoking, and we can put a stock set of calls to this in a makefile

including the code to do config files is different to doing config files
by including :).


Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: