]> code.delx.au - gnu-emacs-elpa/blob - Makefile
*** no comment ***
[gnu-emacs-elpa] / Makefile
1 SPECIAL = chess-auto.el
2 SOURCE = $(filter-out $(SPECIAL),$(wildcard *.el))
3 TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
4 EMACS = emacs
5
6 MAKEINFO = makeinfo
7 TEXI2DVI = texi2dvi
8 ENVADD = TEXINPUTS="$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
9
10 all: $(TARGET) chess.info
11
12 chess-auto.el: chess-auto.in $(SOURCE)
13 cp chess-auto.in chess-auto.el
14 -rm chess-auto.elc
15 $(EMACS) --no-init-file --no-site-file -batch \
16 -l $(shell pwd)/chess-auto \
17 -f generate-autoloads \
18 $(shell pwd)/chess-auto.el .
19
20 %.elc: %.el
21 $(EMACS) --no-init-file --no-site-file -batch \
22 -l $(shell pwd)/chess-maint \
23 -f batch-byte-compile $<
24
25 chess-final.texi: chess.texi $(SOURCE)
26 $(EMACS) --no-init-file --no-site-file -batch \
27 -l $(shell pwd)/chess-maint \
28 -f chess-generate-texinfo-file
29
30 chess.info: chess-final.texi
31 $(MAKEINFO) chess-final.texi
32
33 info: chess.info
34
35 chess.dvi: chess-final.texi
36 $(ENVADD) $(TEXI2DVI) chess-final.texi
37
38 clean:
39 rm -f *~ chess.dvi chess-final.* game.* log.*
40 rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
41
42 fullclean: clean
43 -rm $(TARGET) chess.info chess-auto.el
44
45 VERSION=$(shell perl -ne 'print $$1 if /chess-version.*"([^"]+)"/;' chess.el)
46
47 dist: fullclean all clean
48 cp -ar . /var/tmp/chess-$(VERSION)
49 tar cvjfXC /var/tmp/chess-$(VERSION).tar.bz2 \
50 .exclude /var/tmp chess-$(VERSION)
51 rm -fr /var/tmp/chess-$(VERSION)
52 mv /var/tmp/chess-$(VERSION).tar.bz2 \
53 $(HOME)/public_html/Emacs/packages
54
55 TAG=$(shell echo $(VERSION) | sed 's/\./-/g')
56 CAT=$(shell echo $(VERSION) | perl -ne 'print $$1 if /[-0-9]+([ab])[0-9]+/;')
57 SUB=$(shell echo $(VERSION) | perl -ne 'print $$1 if /[-0-9]+[ab]([0-9]+)/;')
58 NEXT=$(shell expr $(SUB) + 1)
59
60 update: dist
61 sitecopy
62 make fullclean
63 cvs tag chess-$(TAG)
64 perl -i -ne 's/(chess-version.*)"([0-9.]+)[ab][0-9]+"/$$1"$$2$(CAT)$(NEXT)"/;' chess.el
65 cvs commit -m "bumped minor rev" chess.el