bug-make
[Top][All Lists]
Advanced

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

Re: addsuffix influence...


From: Sam Kendall
Subject: Re: addsuffix influence...
Date: Fri, 29 Mar 2019 00:30:24 -0400

On Thu, Mar 28, 2019 at 9:24 PM 積丹尼 Dan Jacobson <address@hidden> 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
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make

reply via email to

[Prev in Thread] Current Thread [Next in Thread]