dotemacs

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

Makefile (871B)


      1 EMACS=emacs
      2 
      3 PACKAGE=markdown-mode
      4 
      5 SOURCE=markdown-mode.el
      6 COMPILED=markdown-mode.elc
      7 
      8 VERSION=$(shell cat $(SOURCE) | sed -n 's/^;; Version: \(.*\)/\1/p')
      9 
     10 TEST_FILES=tests/Makefile tests/*.el tests/*.text tests/*.md
     11 
     12 .el.elc:
     13 	$(EMACS) -q -no-site-file -no-init-file -batch -f batch-byte-compile $<
     14 
     15 all: $(COMPILED)
     16 
     17 .PHONY: dist test
     18 
     19 test:
     20 	SELECTOR=$(SELECTOR)
     21 	export SELECTOR
     22 	make -C tests test
     23 
     24 clean:
     25 	rm -f $(COMPILED)
     26 	make -C tests clean
     27 
     28 dist:
     29 	DIR=$$(mktemp -d -t "$(PACKAGE)"); \
     30 	DESTDIR="$$DIR/$(PACKAGE)-$(VERSION)"; \
     31 	mkdir -p $$DESTDIR; \
     32 	cp -a $(SOURCE) $$DESTDIR; \
     33 	mkdir -p $$DESTDIR/tests; \
     34 	cp -a $(TEST_FILES) $$DESTDIR/tests; \
     35 	tar zcf $(CURDIR)/$(PACKAGE)-$(VERSION).tar.gz -C $$DIR .; \
     36 	rm -r $$DIR; \
     37 	echo "$(PACKAGE)-$(VERSION).tar.gz has been created"
     38 
     39 update: $(COMPILED)
     40 	cp -a $(SOURCE) $(COMPILED) $(HOME)/.emacs.d/site-lisp