summaryrefslogtreecommitdiff
path: root/css.mk
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-10-22 13:18:55 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2013-10-22 13:18:55 -0400
commite4a96cee395549dccb18f81b03724fe2d517c88f (patch)
treeab5d11e939f21c51683f00374bac6de61100a525 /css.mk
downloadmakefile_templates-e4a96cee395549dccb18f81b03724fe2d517c88f.tar.gz
makefile_templates-e4a96cee395549dccb18f81b03724fe2d517c88f.zip
init
Diffstat (limited to 'css.mk')
-rw-r--r--css.mk35
1 files changed, 35 insertions, 0 deletions
diff --git a/css.mk b/css.mk
new file mode 100644
index 0000000..f4decfa
--- /dev/null
+++ b/css.mk
@@ -0,0 +1,35 @@
+# -*- make -*-
+# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com>
+
+CLEAN_TARGETS += clean_css
+REAL_CLEAN_TARGETS += real_clean_css
+
+scss_files = $(wildcard *.scss)
+css_targets = $(scss_files:%.scss=%.css)
+
+css: $(css_targets)
+
+$(css_targets): %.css : %.scss
+ sass $< > $@
+
+clean_css:
+ rm -rf .sass-cache
+
+real_clean_css:
+ifneq ($(strip $(css_targets)),)
+ rm -f $(css_targets)
+endif
+
+dest_dir_css:
+ $(INSTALL) -d -m 0755 $(dest_dir)
+
+install_css: dest_dir_css
+ifneq ($(strip $(css_targets)),)
+ $(INSTALL) -m 0644 $(css_targets) $(dest_dir)/
+endif
+
+install_css_src: dest_dir_css
+ifneq ($(strip $(scss_files)),)
+ $(INSTALL) -m 0644 $(scss_files) $(dest_dir)/
+endif
+