forked from haskell/haskell-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (59 loc) · 1.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
EMACS = emacs
ELFILES = \
haskell-c.el \
haskell-cabal.el \
haskell-decl-scan.el \
haskell-doc.el \
haskell-font-lock.el \
haskell-ghci.el \
haskell-hugs.el \
haskell-indent.el \
haskell-indentation.el \
haskell-checkers.el \
haskell-mode.el \
haskell-simple-indent.el \
haskell-sort-imports.el \
haskell-align-imports.el \
haskell-move-nested.el \
haskell-navigate-imports.el \
haskell-interactive-mode.el \
haskell-package.el \
haskell-process.el \
haskell-session.el \
haskell-string.el \
ghc-core.el \
inf-haskell.el
ELCFILES = $(ELFILES:.el=.elc)
# AUTOLOADS = $(PACKAGE)-startup.el
AUTOLOADS = haskell-site-file.el
%.elc: %.el
$(EMACS) --batch --eval '(setq load-path (cons "." load-path))' \
-f batch-byte-compile $<
all: $(AUTOLOADS)
compile: $(ELCFILES)
info:
# No Texinfo file, sorry.
######################################################################
### don't look below ###
######################################################################
PACKAGE=haskell-mode
$(AUTOLOADS): $(ELFILES)
[ -f $@ ] || echo '' >$@
$(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
##
VERSION = $(shell darcs show tags | head -n 1)
TAG = $(shell echo v$(VERSION) | sed 's/\./\\\./g')
TMP = $(shell echo $(PACKAGE)-$(VERSION))
dist:
darcs get --lazy . $(TMP) &&\
cd $(TMP) &&\
rm -r _darcs &&\
sed -i 's/\$$Name: \$$/$(TAG)/g' * &&\
make $(AUTOLOADS) &&\
rm *~ &&\
darcs changes > ChangeLog &&\
rm Makefile &&\
cd .. &&\
tar czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) &&\
rm -rf $(PACKAGE)-$(VERSION) &&\
mv $(PACKAGE)-$(VERSION).tar.gz ../haskellmode-emacs-web/