On Sat, 2014-02-15 at 09:17 -0800, Rakesh Sharma wrote: > This is a template for a make-based "tr" macro which transliterates > from listA to listB in the text. > > Before running "tr" I intend to run some validations on the arguments > to "tr". The macro "-tr-validate" does that task and it is here that > the number of arguments to a function's need was sorely felt.
I'm not sure I see the point in showing different error messages for "missing" vs. "empty" arguments. If you don't need to keep that distinction then you have a much simpler result: just see if any of the values you expect are the empty string. > Also in this macro is it possible to factor in the $0 in the exit-code > macro itself, so that we dont need to specify it in the invocation of > exit-code macro everytime.? I tried various alternatives using > $(eval.... but nothing worked. I don't see any way it's possible. When you invoke call $0 is always set to the current function. Once that's done it's not possible to access the previous $0 from the "calling" function, inside the "called" function. There's no facility in GNU make to access the "outer" value of an overridden variable. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make