diff options
Diffstat (limited to 'css.mk')
-rw-r--r-- | css.mk | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -4,8 +4,13 @@ CLEAN_TARGETS += clean_css REAL_CLEAN_TARGETS += real_clean_css +dest_dir_css ?= $(dest_dir) +destination_dirs += $(dest_dir_css) + scss_files = $(wildcard *.scss) css_targets = $(scss_files:%.scss=%.css) +scss_src_dest_targets = $(scss_files:%=$(dest_dir_css)/%) +css_dest_targets = $(css_targets:%=$(dest_dir_css)/%) css: $(css_targets) @@ -20,16 +25,17 @@ ifneq ($(strip $(css_targets)),) rm -f $(css_targets) endif -dest_dir_css: - $(INSTALL) -d -m 0755 $(dest_dir) +install_css: $(css_dest_targets) -install_css: dest_dir_css +$(css_dest_targets): $(dest_dir_css)/% : % | $(dest_dir_css) ifneq ($(strip $(css_targets)),) - $(INSTALL) -m 0644 $(css_targets) $(dest_dir)/ + $(INSTALL) -m 0644 '$<' '$@' endif -install_css_src: dest_dir_css +install_css_src: $(scss_src_dest_targets) + +$(scss_src_dest_targets): $(dest_dir_css)/% : % | $(dest_dir_css) ifneq ($(strip $(scss_files)),) - $(INSTALL) -m 0644 $(scss_files) $(dest_dir)/ + $(INSTALL) -m 0644 '$<' '$@' endif |