dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

Makefile (1656B)


      1 # Makefile for lua-mode
      2 
      3 VERSION="$(shell sed -nre '/^;; Version:/ { s/^;; Version:[ \t]+//; p }' lua-mode.el)"
      4 DISTFILE = lua-mode-$(VERSION).zip
      5 
      6 # EMACS value may be overridden
      7 EMACS?=emacs
      8 EMACS_MAJOR_VERSION=$(shell $(EMACS) -batch -eval '(princ emacs-major-version)')
      9 LUA_MODE_ELC=lua-mode.$(EMACS_MAJOR_VERSION).elc
     10 
     11 EMACS_BATCH=$(EMACS) --batch -Q
     12 
     13 default:
     14 	@echo version is $(VERSION)
     15 
     16 %.$(EMACS_MAJOR_VERSION).elc: %.elc
     17 	mv $< $@
     18 
     19 %.elc: %.el
     20 	$(EMACS_BATCH) -f batch-byte-compile $<
     21 
     22 compile: $(LUA_MODE_ELC)
     23 
     24 dist:
     25 	rm -f $(DISTFILE) && \
     26 	git archive --format=zip -o $(DISTFILE) --prefix=lua-mode/ HEAD
     27 
     28 .PHONY: test-compiled-nocask test-uncompiled-nocask test-compiled test-uncompiled
     29 # check both regular and compiled versions
     30 test-nocask: test-compiled-nocask test-uncompiled-nocask
     31 
     32 test: test-compiled test-uncompiled
     33 
     34 test-compiled-nocask: $(LUA_MODE_ELC)
     35 	$(EMACS) -batch -l $(LUA_MODE_ELC) -l buttercup -f buttercup-run-discover
     36 
     37 test-uncompiled-nocask:
     38 	$(EMACS) -batch -l lua-mode.el -l buttercup -f buttercup-run-discover
     39 
     40 test-compiled: $(LUA_MODE_ELC)
     41 	EMACS=$(EMACS) cask exec buttercup -l $(LUA_MODE_ELC)
     42 
     43 test-uncompiled:
     44 	EMACS=$(EMACS) cask exec buttercup -l lua-mode.el
     45 
     46 tryout:
     47 	cask exec $(EMACS) -Q -l init-tryout.el test.lua
     48 
     49 tryout-nocask:
     50 	$(EMACS) -Q -l init-tryout.el test.lua
     51 
     52 release:
     53 	git fetch && \
     54 	git diff remotes/origin/master --exit-code && \
     55 	git tag -a -m "Release tag" rel-$(VERSION) && \
     56 	woger lua-l lua-mode lua-mode "release $(VERSION)" "Emacs major mode for editing Lua files" release-notes-$(VERSION) http://github.com/immerrr/lua-mode/ && \
     57 	git push origin master
     58 	@echo 'Send update to ELPA!'