X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=blobdiff_plain;f=rules%2Ficons.mk;fp=rules%2Ficons.mk;h=0000000000000000000000000000000000000000;hp=eba5e89a17c29275519ad22978841e4c7752aa5b;hb=ac47d3137a6a3dc618afe9bf1a6ca860e117942a;hpb=2854030a3f699188676f19ba16a5400c4976f23c diff --git a/rules/icons.mk b/rules/icons.mk deleted file mode 100644 index eba5e89..0000000 --- a/rules/icons.mk +++ /dev/null @@ -1,39 +0,0 @@ -# This is free and unencumbered software released into the public -# domain. To the extent possible under law, the author of this file -# waives all copyright and related or neighboring rights to it. - -.DELETE_ON_ERROR: - -XCF2PNG ?= xcf2png - -%.png: %.xcf - $(XCF2PNG) $< > $@ - -# First: xcf2png by default calls zcat rather than gzcat. This is -# totally always broken; zcat forces a .Z extension on its input -# filename. So we can't rely on xcf2png's default behavior. But it -# offers -Z for a custom decompression program. -# -# BUT: Gimp produces gz files with some padding zeros because, I don't -# know, someone might want to save their compressed xcfs to DECtape. -# gzip has a -q option to not *print* the warning associated with this -# harmless thing, but then goes ahead and exits non-zero anyway, which -# makes xcf2png barf and die before writing anything even though it -# got perfectly good data. -# -# So: 1) use gunzip, 2) manually feed it to xcf2png, 3) hope nothing is -# set to die based on pipe status, 4) hope that if the xcf data is -# actually busted xcf2png will do something helpful. -%.png: %.xcf.gz - gunzip -c $< | $(XCF2PNG) - > $@ - -.SECONDEXPANSION: - -ICONUTIL ?= $(firstword $(shell command -v iconutil icnsutil) iconutil) - -%.icns: %.iconset $$(wildcard $$(@D)/$$*.iconset/icon_*.png) - $(ICONUTIL) -c icns -o $@ $< - -%.ico: %.iconset $$(wildcard $$(@D)/$$*.iconset/icon_*[0-9].png) - convert -background transparent -colors 256 $(filter-out $<,$^) $@ -