File: Makefile

package info (click to toggle)
goby 1.1%2B0.20180214-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,392 kB
  • sloc: lisp: 2,139; makefile: 80; sh: 67
file content (57 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (5)
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
PREFIX = /usr/local

EMACS  = emacs
ELCDIR = $(PREFIX)/share/emacs/site-lisp/goby
SRC = goby-emacs.el  goby-vars.el  goby.el  goby-view.el  goby-ps.el
ELC = goby-emacs.elc goby-vars.elc goby.elc goby-view.elc goby-ps.elc

ALSRC = goby-emacs.el  goby-vars.el goby.el goby-view.el goby-ps.el
CHECK = xemacs # to check unused variables only

MKDIR   = mkdir
RM      = rm -f
INSTALL = install -c -m 644

PTH = path.el
OTH = diff $(PTH)

all: compile

compile: $(SRC)
	echo '(setq load-path (cons "." load-path))' > $(PTH)
	for el in $(SRC); do \
	  $(EMACS) -q -no-site-file -batch -l $(PTH) -f batch-byte-compile $$el; \
	done
	$(RM) $(PTH)

check: $(ALSRC)
	echo '(setq load-path (cons "." load-path))' > $(PTH)
	for el in $(ALSRC); do \
	  $(CHECK) -q -no-site-file -batch -l $(PTH) -f batch-byte-compile $$el; \
	done

install:
	if [ ! -d $(ELCDIR) ]; then \
	  $(MKDIR) $(ELCDIR); \
	fi
	for el in $(SRC); do \
	  $(INSTALL) $$el $(ELCDIR); \
	done
	for elc in $(ELC); do \
	  $(INSTALL) $$elc $(ELCDIR); \
	done

clean:
	$(RM) *.elc $(OTH)

distclean:
	$(RM) *.elc $(OTH)

diff::
	-cvs diff -c -F "^(" > $@

VERSION = `git tag | tail -1 | sed -e 's/v//'`

archive:
	git archive master -o ~/goby-$(VERSION).tar --prefix=goby-$(VERSION)/
	gzip ~/goby-$(VERSION).tar