On Thu, Mar 28, 2019 at 9:24 PM 積丹尼 Dan Jacobson <jida...@jidanni.org>
wrote:

> I thought targets
> A:$D/$(addsuffix .kmz, $L $N)
> B:$D/$L.kmz $D/$N.kmz
> should do the same.


 No. If   D=X_X_X_X,  L=light, and N=noise, then

A:$D/$(addsuffix .kmz, $L $N)
B:$D/$L.kmz $D/$N.kmz

expands to

A: X_X_X_X/light.kmz noise.kmz
B: X_X_X_X/light.kmz X_X_X_X/noise.kmz

You're already off the rails, so I haven't tried to understand the rest of
your email. If you're going to post to many people what you think is a bug,
please cut your example down to the smallest, simplest thing that
demonstrates the bug.

--
Sam Kendall


>
$ cat makefile
> D=X_X_X_X
> N=noise
> L=light
> A:$D/$(addsuffix .kmz, $L $N)
> B:$D/$L.kmz $D/$N.kmz
> %.kmz:%.kml; minizip -o $@ $?
> %.kml:%.kml0; fgrep -v '?xml' $? > $@
> %.kml0: n input.txt; mode=$* ./n input.txt > $@
> $D/%:%; cp -a $? $@
> $ touch n input.txt; for i in A B; do make -n $i > $i; done
> $ diff A B
> 7a8
> > cp -a noise.kmz X_X_X_X/noise.kmz
>
> And here we see even the presence of addsuffix on a non-relevant line
> influences other lines.
>
> $ cat makefile |sed /A/s/add/xxx/| make -f - -n B|sed $\!d
> rm noise.kml noise.kmz noise.kml0 light.kml light.kmz light.kml0
> $ cat makefile |                   make -f - -n B|sed $\!d
> rm noise.kml noise.kml0 light.kml light.kmz light.kml0
>
> GNU Make 4.2.1
>
> _______________________________________________
> Bug-make mailing list
> Bug-make@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-make
>
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to