Re: small enhancement idea for 'make installworld' et al.

看板DFBSD_submit作者時間21年前 (2004/05/13 11:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/13 (看更多)
On Wed, 12 May 2004 07:04:31 +0200 Jeroen Ruigrok/asmodai <asmodai@wxs.nl> 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
文章代碼(AID): #10ekJv00 (DFBSD_submit)
討論串 (同標題文章)
完整討論串 (本文為第 3 之 13 篇):
文章代碼(AID): #10ekJv00 (DFBSD_submit)