Created
May 3, 2012 15:40
-
-
Save am/2586611 to your computer and use it in GitHub Desktop.
Makefile to compile web project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# less compiler | |
less_c=/usr/local/bin/lessc | |
# this is the source folder | |
src_dir=client | |
# this is the deploy folder | |
deploy_dir=webspace | |
# template files to copy | |
template_dir=html_template | |
# less files to compile | |
LESS_FILES=style | |
# haml files to compile | |
HAML_FILES=index | |
compile: init coffee haml less copy | |
init: | |
mkdir -p $(deploy_dir) | |
haml: | |
for f in $(HAML_FILES); do \ | |
(haml -f html5 $(src_dir)/$$f.haml ${deploy_dir}/$$f.html) || exit; \ | |
done | |
less: | |
mkdir -p $(deploy_dir)/css/ | |
for f in $(LESS_FILES); do \ | |
($(less_c) $(src_dir)/less/$$f.less > $(deploy_dir)/css/$$f.css) || exit; \ | |
done | |
coffee: | |
$(deploy_dir)/js/ | |
coffee -co $(deploy_dir)/js $(src_dir)/coffee | |
copy: | |
rsync -avC $(src_dir)/$(template_dir)/ $(deploy_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment