Well, stated more positively, my concern is about not replacing a bunch
of (granted) complicated old code with a bunch of complicated new code,
i.e., creating new-and-different maintainer and portability hassles, for
the sake of (what nowadays feels to me like) a micro-optimization. Let's
not
On 05 Jan 2023 16:47, Karl Berry wrote:
> Please excuse my curmudgeonness, but it's not clear to me that avoiding
> sed is worth these hassles in working around the implementation-specific
> bugs in the automatic variables. Especially if we have to invoke a shell
> and various commands anyway, how
On Thu, Jan 5, 2023, at 6:47 PM, Karl Berry wrote:
> Please excuse my curmudgeonness, but it's not clear to me that avoiding
> sed is worth these hassles in working around the implementation-specific
> bugs in the automatic variables.
It seems to me that this would be worth doing *if* we could
Please excuse my curmudgeonness, but it's not clear to me that avoiding
sed is worth these hassles in working around the implementation-specific
bugs in the automatic variables. Especially if we have to invoke a shell
and various commands anyway, how about keeping things as they are? -k
On 2023-01-04, Mike Frysinger wrote:
[...]
> dmake is one implementation that fails, and your suggestion doesn't work
> :/.
> $ dmake foo/bar.o
> dmake: Error: -- Incomplete macro expression [)' b='$(at_f:.o=)'; test
> x"$$a.o" = x"$(@F)" || a=$$b;\
> echo $$a]
It might also be
On 2023-01-04, Mike Frysinger wrote:
> On 04 Jan 2023 21:10, Nick Bowler wrote:
[...]
>> maybe something like:
>>
>> % cat >Makefile <<'EOF'
>> at_f = $(@F)
>> foo/bar.o:
>> a='$(@F:.o=)' b='$(at_f:.o=)'; test x"$$a.o" = x"$(@F)" || a=$$b;\
>>echo $$a
>> EOF
>
> this is
On 04 Jan 2023 21:10, Nick Bowler wrote:
> Except for one minor detail, $(@F) and $(@D) are highly portable. I
> expect they were in the very first POSIX.2 specs as they predate the
> earliest standards; I believe they first appeared in UNIX System V (ca.
> 1983) and were later added to BSD in
On 2023-01-03, Mike Frysinger wrote:
> The echo|sed is used to split the dirname & filename so it can insert
> $(DEPDIR) in the middle, and then chop the trailing object suffix. In
> the generic case, %OBJ% is $@, so we can leverage the POSIX vars $(@D)
> and $(@F) to do the pathname splitting
The echo|sed is used to split the dirname & filename so it can insert
$(DEPDIR) in the middle, and then chop the trailing object suffix. In
the generic case, %OBJ% is $@, so we can leverage the POSIX vars $(@D)
and $(@F) to do the pathname splitting and insert $(DEPDIR) in between.
For chopping