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