Initial Commit
[packages] / xemacs-packages / mailcrypt / Makefile.in
1 ## This is a -*- makefile -*-
2
3 # What the Emacs binary is called on your system
4 EMACS = @EMACS@
5 EMACSFLAGS = @EMACSFLAGS@
6
7 # Prefix for constructing installation directory paths
8 prefix = @prefix@
9 exec_prefix = @exec_prefix@
10
11 # Shared directory for read-only data files
12 datadir = $(prefix)/share
13
14 # Where to put the .el and .elc files
15 lispdir = $(datadir)/emacs/site-lisp
16
17 # Where to put the Info files
18 infodir = @infodir@
19 INFOFILES = mailcrypt.info mailcrypt.info-1 mailcrypt.info-2
20
21 # Where to put the helper scripts
22 bindir = $(prefix)/bin
23
24 # Installation command
25 INSTALL = @INSTALL@
26 INSTALL_DATA = @INSTALL_DATA@
27 INSTALL_INFO = @INSTALL_INFO@
28
29 # Various auxiliary programs
30 MAKEINFO=makeinfo
31 DVIPS=dvips
32 TEXI2DVI=texi2dvi
33 TEXI2HTML=texi2html
34 TAR=tar
35
36 srcdir = @srcdir@
37 VPATH = @srcdir@
38
39 SOURCES = @EXTRA_SRCS@ \
40         mailcrypt.el mc-toplev.el mc-pgp.el mc-remail.el \
41         mc-pgp5.el mc-gpg.el expect.el mc-setversion.el
42
43 OBJECTS = @EXTRA_OBJS@ \
44         mailcrypt.elc mc-toplev.elc mc-pgp.elc mc-remail.elc \
45         mc-pgp5.elc mc-gpg.elc expect.elc mc-setversion.elc
46
47 GPG_TESTCASES = $(foreach f,CS.s1v CS.s3v E.e1r E.e3 ES.e1r.s1v ES.e1r.s3v \
48                   ES.e3.s1v S.s1v S.s3v CS.s2v CS.s4 E.e2r E.e4 ES.e1r.s2v \
49                   ES.e1r.s4 ES.e4.s1v S.s2v S.s4 SE,tests/gpg-testcases/$(f))
50
51 TESTFILES_GPG = tests/Makefile.in                                             \
52         tests/make_gpg_testcases.py tests/test-gpg.el tests/gpg-keys/Makefile \
53         tests/gpg-keys/fix-trust.py tests/gpg-keys/make-rings.py              \
54         tests/gpg-keys/rings.txt $(GPG_TESTCASES)
55 TESTFILES_REMAILER = tests/remailer/Makefile.in tests/remailer/rings.txt \
56         tests/remailer/rlist.txt tests/remailer/test-remailer.el         \
57         tests/remailer/unwind.py
58
59 DISTFILES = $(SOURCES) ANNOUNCE COPYING ChangeLog ChangeLog.1 INSTALL        \
60         LCD-entry Makefile.in NEWS ONEWS README configure configure.in       \
61         install-sh load-path.hack mailcrypt.texi mkinstalldirs texi2html.ext \
62         FSF-timer.el $(INFOFILES) mailcrypt.dvi README.gpg $(TESTFILES_GPG)  \
63         $(TESTFILES_REMAILER)
64
65 SHELL = /bin/sh
66 #.PHONY: all clean dist distclean dvi html info install \
67 #       installdirs ps uninstall
68 .SUFFIXES:
69 .SUFFIXES: .elc .el
70
71 .el.elc:
72         $(EMACS) -batch $(EMACSFLAGS) -l $(srcdir)/load-path.hack \
73           -f batch-byte-compile $<
74
75 all: $(OBJECTS)
76
77 check: $(OBJECTS)
78         $(MAKE) -C tests check
79
80 install: all installdirs install-info $(bindir)
81         for f in $(SOURCES); do \
82           $(INSTALL_DATA) $(srcdir)/$$f $(lispdir); \
83         done;
84         for f in $(OBJECTS); do \
85           $(INSTALL_DATA) $$f $(lispdir); \
86         done;
87
88 # Make sure all installation directories actually exist
89 # by making them if necessary.
90 installdirs: mkinstalldirs
91         $(srcdir)/mkinstalldirs $(lispdir) $(infodir) $(bindir)
92
93 # If your install-info doesn't know how to look inside the .info file for the
94 # menu entry to add, try adding
95 #   --entry="* Mailcrypt: (mailcrypt).       An Emacs/PGP interface"
96 # to the arguments.
97
98 install-info: info
99         cd $(srcdir) && for file in $(INFOFILES); do\
100           $(INSTALL_DATA) $$file $(infodir)/$$file; \
101         done
102         -$(INSTALL_INFO) --info-dir=$(infodir) mailcrypt.info
103
104 uninstall:
105         -cd $(lispdir) && rm -f $(SOURCES) $(OBJECTS)
106         -cd $(infodir) && rm -f $(INFOFILES)
107         $(INSTALL_INFO) --remove --info-dir=$(infodir) mailcrypt.info
108
109 info: $(INFOFILES)
110
111 $(INFOFILES): mailcrypt.texi
112         $(MAKEINFO) $(srcdir)/mailcrypt.texi
113
114 timer.el: FSF-timer.el
115         cp FSF-timer.el timer.el
116
117 dvi: mailcrypt.dvi
118
119 mailcrypt.dvi: mailcrypt.texi
120         $(TEXI2DVI) $(srcdir)/mailcrypt.texi
121
122 ps: mailcrypt.ps
123
124 mailcrypt.ps: mailcrypt.dvi
125         $(DVIPS) -f $(srcdir)/mailcrypt.dvi >$@
126
127 html: mailcrypt_toc.html
128
129 mailcrypt_toc.html: mailcrypt.texi
130         $(TEXI2HTML) -split_chapter $(srcdir)/mailcrypt.texi
131
132 TAGS: $(SOURCES)
133         cd $(srcdir) && etags $(SOURCES)
134
135 clean:
136         rm -f $(OBJECTS)
137         -rm -f *.aux *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr
138         -rm -f *.html
139         rm -f TAGS
140
141 distclean: clean
142         -rm -f *~ *.tar.gz
143         -rm -f Makefile config.status config.cache config.log timer.el
144         -rm -f *.info* *.dvi
145
146 ${srcdir}/configure: configure.in
147         cd ${srcdir} && autoconf
148
149 Makefile: Makefile.in config.status
150         ./config.status
151
152 config.status: ${srcdir}/configure
153         ./config.status --recheck
154
155 dist: $(DISTFILES)
156         version=`perl -ne 'print $$1 if /defconst mc-version \"(.*)\"/' \
157                  mailcrypt.el`; \
158         distname=mailcrypt-$$version; \
159         rm -rf $$distname; \
160         mkdir $$distname; \
161         mkdir $$distname/tests; mkdir $$distname/tests/gpg-keys; \
162         mkdir $$distname/tests/gpg-testcases; \
163         mkdir $$distname/tests/remailer; \
164         for file in $(DISTFILES); do \
165           ln $$file $$distname/$$file; \
166         done; \
167         $(TAR) -chz -f $$distname.tar.gz $$distname; \
168         rm -rf $$distname