2014-03-25 05:29:18 +00:00
|
|
|
SRCS = ghc.el ghc-func.el ghc-doc.el ghc-comp.el ghc-check.el ghc-process.el \
|
2014-06-17 16:15:36 +00:00
|
|
|
ghc-command.el ghc-info.el ghc-ins-mod.el ghc-indent.el ghc-rewrite.el
|
2010-01-07 01:50:54 +00:00
|
|
|
EMACS = emacs
|
|
|
|
|
2010-01-06 05:38:06 +00:00
|
|
|
TEMPFILE = temp.el
|
2015-08-19 06:27:27 +00:00
|
|
|
TEMPFILE2 = temp2.el
|
2010-01-06 05:38:06 +00:00
|
|
|
|
|
|
|
all: $(TEMPFILE) ghc.el
|
2010-01-07 01:50:54 +00:00
|
|
|
$(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f ghc-compile
|
2010-05-12 00:56:09 +00:00
|
|
|
rm -f $(TEMPFILE)
|
2010-01-06 05:38:06 +00:00
|
|
|
|
2015-08-19 06:27:27 +00:00
|
|
|
lint: $(TEMPFILE2) ghc.el
|
|
|
|
$(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE2) -f ghc-compile
|
|
|
|
rm -f $(TEMPFILE2)
|
2012-02-13 01:49:23 +00:00
|
|
|
|
2010-01-06 05:38:06 +00:00
|
|
|
$(TEMPFILE):
|
|
|
|
@echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE)
|
|
|
|
@echo '(defun ghc-compile () (mapcar (lambda (x) (byte-compile-file x)) (list ' >> $(TEMPFILE)
|
|
|
|
@echo $(SRCS)| sed -e 's/\(ghc[^ ]*\.el\)/"\1"/g' >> $(TEMPFILE)
|
|
|
|
@echo ')))' >> $(TEMPFILE)
|
|
|
|
|
2015-08-19 06:27:27 +00:00
|
|
|
$(TEMPFILE2):
|
|
|
|
@echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE2)
|
|
|
|
@echo '(setq hack-local-variables-hook (lambda () (setq lexical-binding t)))' >> $(TEMPFILE2)
|
|
|
|
@echo '(defun ghc-compile () (mapcar (lambda (x) (byte-compile-file x)) (list ' >> $(TEMPFILE2)
|
|
|
|
@echo $(SRCS)| sed -e 's/\(ghc[^ ]*\.el\)/"\1"/g' >> $(TEMPFILE2)
|
|
|
|
@echo ')))' >> $(TEMPFILE2)
|
|
|
|
|
2010-01-06 05:38:06 +00:00
|
|
|
clean:
|
2015-08-19 06:27:27 +00:00
|
|
|
rm -f *.elc $(TEMPFILE) $(TEMPFILE2)
|
2013-05-20 07:17:16 +00:00
|
|
|
|
|
|
|
VERSION = `grep version ghc.el | sed -e 's/[^0-9\.]//g'`
|
|
|
|
|
|
|
|
bump:
|
|
|
|
echo "(define-package\n \"ghc-mod\"\n $(VERSION)\n \"Sub mode for Haskell mode\"\n nil)" > ghc-pkg.el
|
|
|
|
|
|
|
|
archive:
|
|
|
|
git archive master -o ~/ghc-$(VERSION).tar --prefix=ghc-$(VERSION)/
|