Skip to content

Instantly share code, notes, and snippets.

@torgeir
Created June 23, 2011 18:40
Show Gist options
  • Save torgeir/1043240 to your computer and use it in GitHub Desktop.
Save torgeir/1043240 to your computer and use it in GitHub Desktop.
A Scala Makefile
SRC = scala
SOURCES = $(shell ls $(SRC)/*.scala)
S = scala
SC = scalac
TARGET = target
CP = $(TARGET):scalatest.jar
SPEC = scala.RomanSpec
compile: $(SOURCES:.scala=.class)
%.class: %.scala
@echo "Compiling $*.scala.."
@$(SC) -cp $(CP) -d . $*.scala
test: compile
@$(S) -cp $(CP) org.scalatest.tools.Runner -p . -o -s $(SPEC)
clean:
@$(RM) $(SRC)/*.class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment