summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 8ca427620b92d9271b25d5b08bd31b3eedaa61b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
@SET_MAKE@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@

LN_S = @LN_S@
TAR = @TAR@
COMPRESS = @COMPRESS@
COMPEXT = @COMPEXT@

ETAGS = @ETAGS@
EMACS = @EMACS@ -no-site-file -no-init-file

PACKAGEDIR = @PACKAGEDIR@
SYMLINKS = @SYMLINKS@
LINKPATH = @LINKPATH@

# Deployment
TARFILES = ChangeLog INSTALL Makefile README                        \
           aclocal.m4 configure configure.in install-sh Makefile.in \
           bits html lisp misc tex texinfo utils

syntax:
	@echo "" ;\
	echo "*** make one or more of: rmail vm mhe gnus all bbdb" ;\
	echo ""

all: bbdb rmail vm mhe gnus info

bbdb:
	cd lisp; $(MAKE) bbdb

rmail:
	cd lisp; $(MAKE) rmail

vm:
	cd lisp; $(MAKE) vm

mhe:
	cd lisp; $(MAKE) mhe

gnus:
	cd lisp; $(MAKE) gnus

autoloads:
	cd lisp; $(MAKE) autoloads

install-pkg: bbdb autoloads info
	rm -fr $(PACKAGEDIR)/lisp/bbdb $(PACKAGEDIR)/info/bbdb \
               $(PACKAGEDIR)/etc/bbdb; \
        if test "x$(SYMLINKS)" = "xno" ; then \
          mkdir -p -m 0755 $(PACKAGEDIR)/lisp/bbdb; \
          for i in `ls lisp/*.elc` ; do \
            $(INSTALL_DATA) `echo $$i | sed 's/c$$//g'` \
                            $(PACKAGEDIR)/lisp/bbdb ; \
            $(INSTALL_DATA) $$i $(PACKAGEDIR)/lisp/bbdb ; \
          done ; \
          mkdir -p -m 0755 $(PACKAGEDIR)/info/bbdb ; \
          for i in `ls texinfo/*.info* ` ; do \
            $(INSTALL_DATA) $$i $(PACKAGEDIR)/info/bbdb ; \
          done ; \
          mkdir -p -m 0755 $(PACKAGEDIR)/etc/bbdb/tex \
                           $(PACKAGEDIR)/etc/bbdb/utils ; \
          for i in `ls tex/*.tex` ; do \
            $(INSTALL_DATA) $$i $(PACKAGEDIR)/etc/bbdb/tex ; \
          done ; \
          for i in `ls -d utils/* |egrep -v '(RCS|SCCS|CVS)'` ; do \
            $(INSTALL_DATA) $$i $(PACKAGEDIR)/etc/bbdb/utils ; \
          done ; \
        else \
          if test "x$(LINKPATH)" = "x" ; then \
            ln -s `pwd`/lisp $(PACKAGEDIR)/lisp/bbdb ; \
            ln -s `pwd`/texinfo $(PACKAGEDIR)/info/bbdb ; \
          else \
              ln -s $(LINKPATH)/lisp $(PACKAGEDIR)/lisp/bbdb ; \
              ln -s $(LINKPATH)/texinfo $(PACKAGEDIR)/info/bbdb ; \
          fi ; \
        fi

info:
	cd texinfo; $(MAKE) info

clean:
	cd lisp; $(MAKE) clean
	cd texinfo; $(MAKE) clean

reallyclean: clean
	cd texinfo; $(MAKE) reallyclean

# Testing
test: test-setup test-bbdb

test-setup:
	cp $${HOME}/.bbdb $${HOME}/.bbdb-test

test-bbdb:
	$(EMACS) -l $${HOME}/bbdb-test.el

# FSF Emacs 19.34 (w32 emacs is actually 19.36)
EMACS_19_34_DIR=/local/downloads/emacs-19.34

emacs19.34-test: emacs19.34-test-setup emacs19.34-test-bbdb
emacs19.34-test: emacs19.34-test-rmail emacs19.34-test-vm
emacs19.34-test: emacs19.34-test-mhe   emacs19.34-test-gnus
emacs19.34-test: emacs19.34-test-all

emacs19.34-test-setup: clean
	@echo '--- TESTING BBDB WITH FSF EMACS 19.34 ---'
	@echo
	@echo '** Setting up **'
	@-rm -rf $(EMACS_19_34_DIR)/site-lisp
	@mkdir $(EMACS_19_34_DIR)/site-lisp
	@cp lisp/*.el $(EMACS_19_34_DIR)/site-lisp
	@cp ../emacs-19.34/site-lisp $(EMACS_19_34_DIR)/site-lisp

emacs19.34-test-bbdb:
	@echo
	@echo '** Testing build of "bbdb" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs bbdb

emacs19.34-test-rmail:
	@echo
	@echo '** Testing build of "rmail" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs rmail

emacs19.34-test-vm:
	@echo
	@echo '** Testing build of "vm" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs vm

emacs19.34-test-mhe:
	@echo
	@echo '** Testing build of "mhe" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs mhe

emacs19.34-test-gnus:
	@echo
	@echo '** Testing build of "gnus" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs gnus

emacs19.34-test-all: clean
	@echo
	@echo '** Testing build of "all" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs all

# FSF Emacs 20.6
EMACS_19_34_DIR=/local/downloads/emacs-20.6

emacs20.6-test: emacs20.6-test-setup emacs20.6-test-bbdb
emacs20.6-test: emacs20.6-test-rmail emacs20.6-test-vm
emacs20.6-test: emacs20.6-test-mhe   emacs20.6-test-gnus
emacs20.6-test: emacs20.6-test-all

emacs20.6-test-setup: clean
	@echo '--- TESTING BBDB WITH FSF EMACS 20.6 ---'
	@echo
	@echo '** Setting up **'
	@-rm -rf $(EMACS_19_34_DIR)/site-lisp
	@mkdir $(EMACS_19_34_DIR)/site-lisp
	@cp lisp/*.el $(EMACS_19_34_DIR)/site-lisp
	@cp ../emacs-20.6/site-lisp $(EMACS_19_34_DIR)/site-lisp

emacs20.6-test-bbdb:
	@echo
	@echo '** Testing build of "bbdb" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs bbdb

emacs20.6-test-rmail:
	@echo
	@echo '** Testing build of "rmail" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs rmail

emacs20.6-test-vm:
	@echo
	@echo '** Testing build of "vm" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs vm

emacs20.6-test-mhe:
	@echo
	@echo '** Testing build of "mhe" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs mhe

emacs20.6-test-gnus:
	@echo
	@echo '** Testing build of "gnus" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs gnus

emacs20.6-test-all: clean
	@echo
	@echo '** Testing build of "all" **'
	@echo
	$(MAKE) EMACS=$(EMACS_19_34_DIR)/src/emacs all

tar: $(TARFILES)
	@if test "x$(TAR)" = "x" ; then                                    \
          echo "Sorry, no \`tar' program available." ;                     \
        else                                                               \
          name=`sed -n 's/^(defconst bbdb-version "\([0-9]\.[0-9][0-9]*\).*/bbdb-\1/p' lisp/bbdb.el` ;                                                    \
          rm -f $${name} ; $(LN_S) . $${name} ;                            \
          if test "x$(COMPRESS)" = "x" ; then                              \
            echo "Sorry, no compression program available." ;              \
            echo "The tarball will not be compressed." ;                   \
            echo "creating tar file $${name}.tar..." ;                     \
            $(TAR) --exclude=CVS  --exclude=".*" -vchf $${name}.tar        \
            `echo $(TARFILES) | sed "s|^|$${name}/|g; s| | $${name}/|g"` ; \
          else                                                             \
            echo "creating tar file $${name}.tar.$(COMPEXT)..." ;          \
            $(TAR) --exclude=CVS  --exclude=".*" -vchf - `echo $(TARFILES) \
            | sed "s|^|$${name}/|g; s| | $${name}/|g"`                     \
            | $(COMPRESS) > $${name}.tar.$(COMPEXT) ;                      \
          fi ;                                                             \
          rm $${name} ;                                                    \
        fi

dist: clean info tar

TAGS: tags

tags:
	@if test "x$(ETAGS)" = "x" ; then                 \
           echo "Sorry, no \`etags' program available." ; \
         else                                             \
           $(ETAGS) */*.el                              ; \
         fi