rsrsss/Makefile

17 lines
786 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
xsltproc --stringparam current-date "$(shell date -R)" -o opml/feeds.opml xsl/opml.xsl feed.xml
2023-07-22 15:37:49 +00:00
chmod a+r opml/feeds.opml
sprites := $(wildcard img/sprites/*.png)
img/sprites.png: $(sprites)
convert $(sprites) +append img/sprites.png
chmod a+r img/sprites.png
css/sprites.css: img/sprites.png
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}" }' > css/sprites.css
chmod a+r css/sprites.css