(tar): must replace PACKAGE in ftp.
[elisp/semi.git] / Makefile
1 #
2 # Makefile for SEMI kernel.
3 #
4
5 PACKAGE = semi
6 API     = 1.12
7 RELEASE = 1
8
9 TAR     = tar
10 RM      = /bin/rm -f
11 CP      = /bin/cp -p
12
13 EMACS   = emacs
14 XEMACS  = xemacs
15 FLAGS   = -batch -q -no-site-file -l SEMI-MK
16
17 PREFIX  = NONE
18 EXEC_PREFIX = NONE
19 LISPDIR = NONE
20 PACKAGEDIR = NONE
21 VERSION_SPECIFIC_LISPDIR = NONE
22
23 GOMI    = *.elc
24
25 VERSION = $(API).$(RELEASE)
26 ARC_DIR = /pub/GNU/elisp/semi/semi-$(API)-for-flim-1.12
27
28
29 elc:
30         $(EMACS) $(FLAGS) -f compile-semi \
31                 $(PREFIX) $(EXEC_PREFIX) $(LISPDIR) \
32                 $(VERSION_SPECIFIC_LISPDIR)
33
34 install-elc:    elc
35         $(EMACS) $(FLAGS) -f install-semi \
36                 $(PREFIX) $(EXEC_PREFIX) $(LISPDIR) \
37                 $(VERSION_SPECIFIC_LISPDIR)
38
39 install:        install-elc
40
41
42 package:
43         $(XEMACS) $(FLAGS) -f compile-semi-package $(PACKAGEDIR)
44
45 install-package:        package
46         $(XEMACS) $(FLAGS) -f install-semi-package $(PACKAGEDIR)
47
48
49 clean:
50         -$(RM) $(GOMI)
51
52
53 tar:
54         cvs commit
55         sh -c 'cvs tag -RF $(PACKAGE)-`echo $(VERSION) | tr . _`; \
56         cd /tmp; \
57         cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \
58                 export -d $(PACKAGE)-$(VERSION) \
59                 -r $(PACKAGE)-`echo $(VERSION) | tr . _` \
60                 semi'
61         $(RM) /tmp/$(PACKAGE)-$(VERSION)/ftp.in
62         cd /tmp; $(TAR) cvzf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
63         cd /tmp; $(RM) -r $(PACKAGE)-$(VERSION)
64         sed "s/VERSION/$(VERSION)/" < ftp.in | sed "s/API/$(API)/" \
65                 | sed "s/PACKAGE/$(PACKAGE)/" > ftp
66
67 release:
68         -$(RM) $(ARC_DIR)/$(PACKAGE)-$(VERSION).tar.gz
69         mv /tmp/$(PACKAGE)-$(VERSION).tar.gz $(ARC_DIR)