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

Re: Buildd & binary-indep



On Mon, Sep 27, 2010 at 06:36:38PM -0400, Joey Hess wrote:
> Adam Borowski wrote:
> > # Hairy, but safe against locales and changed error messages.
> 
> This fails in cases where the makefile emits something to stderr when
> setting a variable, which can happen even for non-existing rules.
> Makefiles with global pattern rules (as used with dh) are also
> misdetected.
> 
> A more robust method would be to populate unique-tmp-1 by running
> debian/rules this-dummy-target-better-not-really-exist

Yeah, screen scraping is just wrong in the principle, at best it can be a
kludge to make up for where there are no proper machine-parsable error
codes.

> Or, make could be patched to have a mode where it generates stable,
> machine-parseable error and status message codes. Then just look for
> the one that corresponds to "*** No rule to make target" or the one that
> indicates a rule has been run.

I wanted to propose an option switch that would query the presence of a
target, but what you suggest is a lot more general.

Merely extending the exit code from present "2 for all errors" would be
probably the best idea for something convenient in most cases -- and
machine-parseable output could help when that's not enough.

-- 
1KB		// Microsoft corollary to Hanlon's razor:
		//	Never attribute to stupidity what can be
		//	adequately explained by malice.


Reply to: