JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stylus helper for ckeditor sizing
[wfpl-cms.git] / Makefile
1 svgs=
2 generated_images= $(svgs:.svg=.png)
3 images=
4 images += $(generated_images)
5
6 objects= $(generated_images) .sha1sums.styl style.css tags
7
8 all: $(objects)
9
10 clean:
11         rm -f $(objects)
12
13 style.css: styl.styl .sha1sums.styl
14         compile-stylus $<
15
16 .sha1sums.styl: $(images)
17         ( \
18                 echo -n 'sha1 = {'; \
19                 div=' '; \
20                 for x in $^; do \
21                         echo -n "$$div '$$x': \"$$x?m=$$(sha1sum < $$x | head -c 10)\""; \
22                         div=,; \
23                 done; \
24                 echo " }"; \
25         ) > $@ || ( \
26                 rm -f $@; \
27                 exit 1; \
28         )
29 %.png: %.svg
30         ( \
31                 inkscape -f $< -e $@ --export-area-page --without-gui --export-dpi=360 \
32                 && mogrify -alpha off -geometry '25%' $@ \
33                 && pngfix $@ \
34         ) || ( \
35                 rm -f $@ \
36                 ; exit 1 \
37         )
38
39 tags: *.php inc/*.php inc/wfpl/*.php
40         exuberant-ctags *.php inc/*.php inc/wfpl/*.php