summaryrefslogtreecommitdiff
path: root/include.mk
blob: b0d149e6c661a8e56f99fdaa594eed0b12a54be9 (plain)
  1. always-make = $(filter -B,$(MAKEFLAGS))
  2. cssprojectinfiles = $(foreach file,$(if $1,$(shell find $1 -name '*.scss')),$(if $(filter-out _%,$(notdir $(file))),$(file)))
  3. cssprojectoutfiles = $(patsubst %.scss,%.css,$(call cssprojectinfiles,$1))
  4. $(cssprojects):
  5. compass compile $(if $(wildcard $@/config.rb),,--sass-dir= --css-dir= --relative-assets) $(if $(beautify),--output-style expanded) $(if $(finalize)-e production) $(if $(always-make),--force) $@
  6. $(if $(beautify),perl -i -pe 's/ /\t/g' $(call cssprojectoutfiles,$@))
  7. clean::
  8. rm -f $(call cssprojectoutfiles,$(cssprojects))
  9. rm -rf $(cssprojects:=/.sass-cache)
  10. .PHONY: clean $(cssprojects)