Created
November 10, 2015 21:45
-
-
Save qpfiffer/d9dd07117f9058b153d2 to your computer and use it in GitHub Desktop.
Makefile to compile coffeescript to javascript.
This file contains hidden or 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
COFFEEC=coffee | |
BUILDDIR=lib | |
SOURCEDIR=src | |
SOURCES=$(shell find $(SOURCEDIR) -name '*.coffee') | |
OBJECTS=$(subst $(SOURCEDIR),$(BUILDDIR),$(SOURCES:%.coffee=%.js)) | |
all: $(OBJECTS) | |
clean: | |
rm -rf $(BUILDDIR) | |
$(BUILDDIR)/%.js: $(SOURCEDIR)/%.coffee | |
@mkdir -p $(@D) | |
$(COFFEEC) -bcs < $^ > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment