I thought targets A:$D/$(addsuffix .kmz, $L $N) B:$D/$L.kmz $D/$N.kmz should do the same.
$ 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