1 SPECIAL
= chess-auto.el
2 SOURCE
= $(filter-out $(SPECIAL
),$(wildcard *.el
))
3 TARGET
= $(patsubst %.el
,%.elc
,$(SPECIAL
) $(SOURCE
))
8 ENVADD
= TEXINPUTS
="$(TEXINPUTS)" MAKEINFO
="$(MAKEINFO) -I$(srcdir)"
10 all: $(TARGET
) chess.
info
12 chess-auto.el
: chess-auto.in
$(SOURCE
)
13 cp chess-auto.in chess-auto.el
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 .
21 $(EMACS
) --no-init-file
--no-site-file
-batch \
22 -l
$(shell pwd
)/chess-maint \
23 -f batch-byte-compile
$<
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
30 chess.
info: chess-final.texi
31 $(MAKEINFO
) chess-final.texi
35 chess.
dvi: chess-final.texi
36 $(ENVADD
) $(TEXI2DVI
) chess-final.texi
39 rm -f
*~ chess.
dvi chess-final.
* game.
* log.
*
40 rm -f
*.aux
*.cp
*.cps
*.fn
*.fns
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
43 -rm $(TARGET
) chess.
info chess-auto.el
45 VERSION
=$(shell perl
-ne
'print $$1 if /chess-version.*"([^"]+)"/;' chess.el
)
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
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)
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