Get rid of "Interrupted service call" messages in syslog
[tomato.git] / release / src / router / www / Makefile
blob668780c82a09ee56e4812c737b008454d73311a8
2 include ../common.mak
4 all:
6 clean:
8 install:
9 rm -rf $(INSTALLDIR)/www
10 mkdir -p $(INSTALLDIR)/www
12 cp *.gif *.png *.ico robots.txt $(INSTALLDIR)/www
14 # squish some of the files by trimming whitespace...
16 for F in *.{js,jsx}; do \
17 sed '/^\/\*\s*$$/,/\*\//! { s/^\s\+//; s/\s\+$$//; /^\/\/ --\+\s*/d; /^$$/d }' < $$F > $(INSTALLDIR)/www/$$F; \
18 done
20 for F in *.css; do \
21 sed '/^\/\*\s*$$/,/\*\//! { s/\s\+/ /g; s/^\s\+//; s/\s\+$$//; /^$$/d }' < $$F > $(INSTALLDIR)/www/$$F; \
22 done
24 # remove "debug.js" references, convert color.css -> nv().css, remove comments
25 # in between REMOVE-BEGIN and REMOVE-END, and compress whitespace
27 for F in *.{asp,svg}; do \
28 sed -e "/REMOVE-BEGIN/,/REMOVE-END/d" \
29 -e "s,<script[^>]\+debug\.js[^>]\+></script>,," \
30 -e "s,color\.css,<% nv('web_css'); %>\.css," \
31 -e "s,<!-- / / / -->,," \
32 -e "/^$$/d" \
33 -e "/^<!--$$/,/^-->$$/! { s,^\s\+, , }" $$F > $(INSTALLDIR)/www/$$F; \
34 done
38 # make sure old and debugging crap is gone
39 @rm -f $(INSTALLDIR)/debug.js
40 @rm -f $(INSTALLDIR)/www/*-x.*
41 @rm -f $(INSTALLDIR)/www/*-old.*
42 @rm -f $(INSTALLDIR)/www/color.css
44 chmod 0644 $(INSTALLDIR)/www/*