1 ## This is a -*- makefile -*-
3 # What the Emacs binary is called on your system
5 EMACSFLAGS = @EMACSFLAGS@
7 # Prefix for constructing installation directory paths
9 exec_prefix = @exec_prefix@
11 # Shared directory for read-only data files
12 datadir = $(prefix)/share
14 # Where to put the .el and .elc files
15 lispdir = $(datadir)/emacs/site-lisp
17 # Where to put the Info files
19 INFOFILES = mailcrypt.info mailcrypt.info-1 mailcrypt.info-2
21 # Where to put the helper scripts
22 bindir = $(prefix)/bin
24 # Installation command
26 INSTALL_DATA = @INSTALL_DATA@
27 INSTALL_INFO = @INSTALL_INFO@
29 # Various auxiliary programs
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
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
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))
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
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) \
66 #.PHONY: all clean dist distclean dvi html info install \
67 # installdirs ps uninstall
72 $(EMACS) -batch $(EMACSFLAGS) -l $(srcdir)/load-path.hack \
73 -f batch-byte-compile $<
78 $(MAKE) -C tests check
80 install: all installdirs install-info $(bindir)
81 for f in $(SOURCES); do \
82 $(INSTALL_DATA) $(srcdir)/$$f $(lispdir); \
84 for f in $(OBJECTS); do \
85 $(INSTALL_DATA) $$f $(lispdir); \
88 # Make sure all installation directories actually exist
89 # by making them if necessary.
90 installdirs: mkinstalldirs
91 $(srcdir)/mkinstalldirs $(lispdir) $(infodir) $(bindir)
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"
99 cd $(srcdir) && for file in $(INFOFILES); do\
100 $(INSTALL_DATA) $$file $(infodir)/$$file; \
102 -$(INSTALL_INFO) --info-dir=$(infodir) mailcrypt.info
105 -cd $(lispdir) && rm -f $(SOURCES) $(OBJECTS)
106 -cd $(infodir) && rm -f $(INFOFILES)
107 $(INSTALL_INFO) --remove --info-dir=$(infodir) mailcrypt.info
111 $(INFOFILES): mailcrypt.texi
112 $(MAKEINFO) $(srcdir)/mailcrypt.texi
114 timer.el: FSF-timer.el
115 cp FSF-timer.el timer.el
119 mailcrypt.dvi: mailcrypt.texi
120 $(TEXI2DVI) $(srcdir)/mailcrypt.texi
124 mailcrypt.ps: mailcrypt.dvi
125 $(DVIPS) -f $(srcdir)/mailcrypt.dvi >$@
127 html: mailcrypt_toc.html
129 mailcrypt_toc.html: mailcrypt.texi
130 $(TEXI2HTML) -split_chapter $(srcdir)/mailcrypt.texi
133 cd $(srcdir) && etags $(SOURCES)
137 -rm -f *.aux *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr
143 -rm -f Makefile config.status config.cache config.log timer.el
146 ${srcdir}/configure: configure.in
147 cd ${srcdir} && autoconf
149 Makefile: Makefile.in config.status
152 config.status: ${srcdir}/configure
153 ./config.status --recheck
156 version=`perl -ne 'print $$1 if /defconst mc-version \"(.*)\"/' \
158 distname=mailcrypt-$$version; \
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; \
167 $(TAR) -chz -f $$distname.tar.gz $$distname; \