Source-Changes-D archive

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

Re: CVS commit: src/usr.bin/make



On Thu, 25 Jan 2024 20:02:00 +0100, Roland Illig writes:
>>> Modified Files:
>>> 	src/usr.bin/make: make.1
>>>
>>> Log Message:
>>> Indicate that for :U newval is optional
>>
>> I think this is more confusing than helpful.
>
>I agree. Make doesn't distinguish between an empty string and an absent
>string here, so the wording in the manual page should be kept equally
>simple.

Not a question of what make likes or not, but what users glean from the
man page (those that don't also read the source).

The change was prompted by a user (not a make novice by any means)
complaining that :Unewval and the description provides no clue
that just :U is actually valid.

>If anything, you might mention that newval may be empty, but then you'd

I think I started with that, but then figured someone sufficiently
pedantic might consider that not the same as no value being provided ;-)

>have to add the same wording in many other places, for consistency:

>* the variable name in ${:Uvalue}

This is covered by the above no?

>* the two branches of the ':?' modifier in ${cond:?}

true

>* the pattern matching modifiers after ':S,from,to' (1gW)
>* the variable name in the variable assignment '!=3Dcmd'
>* the argument of a function call in '.if defined()'
>
>Most of these cases don't need this wording, and the '!=3Dcmd' case

Agreed, the :S usage at least is sufficiently familiar to anyone who's
used sed(1) to not need elaboration.

Is there perhaps a general statement somewhere (I may have missed it)
that could cover all these and be cited to pedantic users?
Eg to the effect of perhaps, unless stated otherwise arguments to
modifiers are optional or can be empty.

I don't think its there and is hard to word succinctly.

Thanks
--sjg



Home | Main Index | Thread Index | Old Index