rsrsss/Makefile

17 lines
708 B
Makefile
Raw Normal View History

2023-07-22 15:37:49 +00:00
.PHONY: all
all: css/sprites.css opml/feeds.opml
2021-02-13 21:30:45 +00:00
opml/feeds.opml: feed.xml xsl/opml.xsl
2023-09-03 21:23:20 +00:00
xsltproc --stringparam current-date "$(shell date -R)" -o $@ xsl/opml.xsl feed.xml
chmod a+r $@
2023-07-22 15:37:49 +00:00
sprites := $(wildcard img/sprites/*.png)
img/sprites.png: $(sprites)
2023-09-03 21:23:20 +00:00
convert $(sprites) +append $@
chmod a+r $@
2023-07-22 15:37:49 +00:00
css/sprites.css: img/sprites.png
2023-09-03 21:23:20 +00:00
find img/sprites -mindepth 1 -maxdepth 1 -type f -name '*.png' -printf '%f\n' | sort | awk '{ sub(/\.png$$/, ""); print ".icon-" $$0 " {\n\tdisplay: inline-block;\n\tposition: relative;\n\ttop: 4px;\n\tmargin-right: 2px;\n\tbackground-image: url(../img/sprites.png);\n\twidth: 16px;\n\theight: 16px;\n\tbackground-position: " (-(NR-1)*16) "px;\n}" }' > $@
chmod a+r $@