Aegisub/scripts/genxpm.awk
Amar Takhar 9f8c45bf65 Set convert to BIN_CONVERT in Makefile.bitmaps.
Originally committed to SVN as r2531.
2008-12-27 08:06:29 +00:00

24 lines
501 B
Awk

/BITMAP/ {
gsub(/\"bitmaps\//, "", $3)
gsub(/\"/, "", $3)
image[$1] = $3
}
END {
printf(" \
all: bmp2xpm wxicon_xpm.xpm \n \
.PHONY: all bmp2xpm \n \
CONVERT ?= %s \n \
", BIN_CONVERT)
printf("wxicon_xpm.xpm: icon.ico\n $(CONVERT) 'icon.ico[2]' wxicon_xpm.xpm\n");
for (v in image) {
printf("%s_xpm.xpm: %s\n", v, image[v])
printf(" $(CONVERT) -transparent \"#c0c0c0\" %s %s_xpm.xpm\n\n", image[v], v)
}
printf("bmp2xpm:")
for (v in image)
printf(" %s_xpm.xpm", v)
}