Pārlūkot izejas kodu

Add a Makefile and use it in .travis.yml

Ryan C. Thompson 7 gadi atpakaļ
vecāks
revīzija
761df5250f
2 mainītis faili ar 22 papildinājumiem un 2 dzēšanām
  1. 3 2
      .travis.yml
  2. 19 0
      Makefile

+ 3 - 2
.travis.yml

@@ -1,4 +1,6 @@
 language: generic
+dist: trusty
+sudo: false
 
 env:
   matrix:
@@ -30,5 +32,4 @@ before_script:
   - cask install
 
 script:
-  - cask exec buttercup -L .
-  - cask exec emacs -Q -L . -batch -f batch-byte-compile *.el
+  - make test

+ 19 - 0
Makefile

@@ -0,0 +1,19 @@
+ELISP_FILES := $(shell cask files)
+ELC_FILES := $(patsubst %.el,%.elc,$(ELISP_FILES))
+
+.PHONY: test compile clean
+.INTERMEDIATE: .compile.intermediate
+
+all: test
+
+test: compile
+	cask exec buttercup -L .
+
+compile: $(ELC_FILES)
+
+$(ELC_FILES): .compile.intermediate
+.compile.intermediate: $(ELISP_FILES)
+	cask build
+
+clean:
+	cask clean-elc