small enhancement idea for 'make installworld' et al.

Chris Pressey cpressey at catseye.mine.nu
Wed May 12 11:47:18 PDT 2004


On Wed, 12 May 2004 07:04:31 +0200
Jeroen Ruigrok/asmodai <asmodai at xxxxxx> wrote:

> >...is repeated four times in the patch.  This is exactly the sort of
> >thing that should be abstracted into a procedure - except I'm not
> >sure how to do that with make(1), which doesn't have procedures (that
> >I'm aware of.)  I'm sure there's a way to hack it up - but that
> >raises the question of what's uglier.  At least the cut-and-pasted
> >version would have the advantage of having fairly obvious behaviour.
> 
> Make a macro with the use of .USE.

Thanks for pointing that out, but I can't get it to work here.  All the
common code is wrapped in conditionals like this:

target:
. if <common conditional>
	<common code>
. else
	<target-specific code>
. endif

And .USE appends to the bottom of the target - outside the conditional.

There may be a way to pass the target-specific code to the .USE macro,
but that's the sort of obfuscating hack-up I was referring to.

But more importantly: do you think this sort of change (auto-su'ing) is
worthwhile?  Would it save you time/effort/frustration, even a small
amount?

-Chris





More information about the Submit mailing list