Initial Commit
[packages] / xemacs-packages / bbdb / lisp / Makefile
1 # Makefile for the Insidious Big Brother Database.
2 # Original Author: Jamie Zawinski (jwz@jwz.org)
3 #
4 # Makefile,v 1.7 1998/03/10 07:33:12 simmonmt Exp
5 #
6 # Makefile,v
7 # Revision 1.7  1998/03/10 07:33:12  simmonmt
8 # Finally fixed that damn 19.34 :link problem - needed to put OTHERDIR
9 # stuff first in the load-path before loading bbdb.el.
10 #
11 # Revision 1.6  1998/02/23 07:23:23  simmonmt
12 # Support for OTHERDIR, rearranged flags to Emacs so we can use
13 # bbdb-split-string (19.34 doesn't have split-string)
14 #
15 # Revision 1.5  1998/01/06 06:48:50  simmonmt
16 # Fixed bug
17 #
18 # Revision 1.4  1998/01/06 06:45:39  simmonmt
19 # Added deploy target.  Added migrate.el
20 #
21 # Revision 1.3  1997/11/02 06:32:38  simmonmt
22 # Support for bbdb-sc.el
23 #
24 # Revision 1.2  1997/10/12 00:24:41  simmonmt
25 # Changed VM, GNUS, and MHE definitions.  If the corresponding DIR
26 # variables are set, the (the DIR vars) are added to load-path.  The
27 # relevant el files are then loaded using the load-path.  This allows
28 # VMDIR, et al to be unset if the packages live in load-path by
29 # default.  Added bbdb-snarf and bbdb-w3.  Made the bbdb-srv and
30 # bbdb-reportmail skip messages more informative for the poor souls (FSF
31 # Emacs users) who can't use them.  Added a check for itimer, since
32 # apparently some FSF Emacs users have installed gnuserv - without
33 # itimer, bbdb-srv still won't compile.
34 #
35 # Revision 1.1  1997/10/06 01:16:00  simmonmt
36 # Initial revision
37 #
38 #
39
40 # this is lovely, isn't it?  Surprisingly enough, it seems to work...
41 VM      = -eval '(progn (if (not (string-match "$(VMDIR)" ""))            \
42                             (setq load-path (cons "$(VMDIR)" load-path))) \
43                         (if (load "vm-version" t)                         \
44                             (cond ((> (string-to-number vm-version) 5.31) \
45                                    (load "vm"))                           \
46                                   (t (load "vm-vars") (load "vm")))))'
47
48 GNUS    = -eval '(if (not (string-match "$(GNUSDIR)" ""))             \
49                      (setq load-path (cons "$(GNUSDIR)" load-path)))' 
50
51 MHE     = -eval '(progn (if (not (string-match "$(MHEDIR)" ""))            \
52                             (setq load-path (cons "$(MHEDIR)" load-path))) \
53                         (load "mh-e"))'
54
55 # This is hideous and sick, but FSF 19.34 doesn't ship with split, and we
56 # can't load bbdb.el to get bbdb-split because we have to put OTHERDIR
57 # at the front of the load-path before loading bbdb.el.  This makes my
58 # head hurt.
59 PUSHPATH= -eval "`\
60            dir=\". $(OTHERDIR)\"; \
61            echo \(setq load-path \(append \(list ; \
62            for i in $$dir ; do \
63               echo \\"$$i\\"\ ; \
64            done ;\
65            echo \) load-path\)\) ; \
66            `"
67
68 #foo:
69 #       @echo $(PUSHPATH)
70 #       echo
71 #       $(EMACS) -batch -q $(PUSHPATH) -eval '(message (prin1-to-string load-path))'
72
73 #-eval '(setq load-path                                        \
74 #                     (append (bbdb-split (if (/= 0 (length "$(OTHERDIR)")) \
75 #                                              (concat ". " "$(OTHERDIR)")   \
76 #                                              ".") " ")                     \
77 #                                              load-path))'
78
79         EMACS = xemacs
80      MAKEINFO = makeinfo
81
82 .SUFFIXES: .elc .el .tar .Z .gz .uu
83
84 DEPSRCS=        bbdb-com.el  bbdb-hooks.el  bbdb-gnus.el  bbdb-mhe.el \
85                 bbdb-rmail.el bbdb-vm.el bbdb-ftp.el bbdb-whois.el \
86                 bbdb-xemacs.el bbdb-print.el bbdb-srv.el bbdb-reportmail.el \
87                 bbdb-migrate.el
88
89 DEPBINS=        ${DEPSRCS:.el=.elc}
90 SRCS=           bbdb.el  $(DEPSRCS)
91 BINS=           bbdb.elc $(DEPBINS)
92
93 syntax:
94         @echo "" ;\
95         echo "*** Make should be run from the `cd ..;pwd` directory" ;\
96         echo "" ;\
97
98 all:    rmail gnus vm mhe bbdb info
99
100 auto-autoloads.elc: auto-autoloads.el
101         $(EMACS) -batch -q -f batch-byte-compile ./auto-autoloads.el
102
103 bbdb.elc:            bbdb.el
104 bbdb-com.elc:        bbdb.elc bbdb-com.el
105 bbdb-ftp.elc:        bbdb.elc bbdb-ftp.el
106 bbdb-migrate.elc:    bbdb.elc bbdb-migrate.el
107 bbdb-print.elc:      bbdb.elc bbdb-print.el
108 bbdb-snarf.elc:      bbdb.elc bbdb-snarf.el
109 bbdb-whois.elc:      bbdb.elc bbdb-whois.el
110 bbdb-w3.elc:         bbdb.elc bbdb-w3.el
111 bbdb-xemacs.elc:     bbdb.elc bbdb-xemacs.el
112
113 .el.elc:
114         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc -f batch-byte-compile $<
115
116 bbdb.elc:       bbdb.el
117         $(EMACS) -batch -q -f batch-byte-compile ./bbdb.el
118
119 bbdb-gnus.elc:  bbdb.elc bbdb-gnus.el
120         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc $(GNUS)   \
121                 -f batch-byte-compile $(@:.elc=.el)
122 bbdb-mhe.elc:   bbdb.elc bbdb-mhe.el
123         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc $(MHE)    \
124                 -f batch-byte-compile $(@:.elc=.el)
125 bbdb-rmail.elc: bbdb.elc bbdb-rmail.el
126         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc $(RMAIL)  \
127                 -f batch-byte-compile $(@:.elc=.el)
128 bbdb-vm.elc:    bbdb.elc bbdb-vm.el
129         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc $(VM)     \
130                 -f batch-byte-compile $(@:.elc=.el)
131
132 bbdb-srv.elc:   bbdb.elc bbdb-srv.el
133         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc -eval '(if (and (locate-library "gnuserv") (locate-library "itimer")) (byte-compile-file "bbdb-srv.el") (message "Optional package bbdb-srv skipped - gnuserv not found"))'
134
135 bbdb-reportmail.elc: bbdb.elc bbdb-reportmail.el
136         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc -eval '(if (locate-library "reportmail") (byte-compile-file "bbdb-reportmail.el") (message "Optional package bbdb-reportmail skipped - reportmail not found"))'
137
138 bbdb-sc.elc: bbdb.elc bbdb-sc.el
139         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc -eval '(if (locate-library "supercite") (byte-compile-file "bbdb-sc.el") (message "Optional package bbdb-sc skipped - supercite not found"))'
140
141 # bbdb-hooks uses VM macros if it can find VM.  If you don't have VM,
142 # then the $(VM) makefile variable should be undefined or empty.
143 bbdb-hooks.elc:  bbdb.elc bbdb-hooks.el
144         $(EMACS) -batch -q $(PUSHPATH) -l ./bbdb.elc $(VM) \
145         -f batch-byte-compile $(@:.elc=.el)
146
147 autoloads: auto-autoloads.elc
148
149 extras: bbdb-print.elc bbdb-ftp.elc bbdb-whois.elc bbdb-xemacs.elc  \
150         bbdb-srv.elc bbdb-reportmail.elc bbdb-snarf.elc bbdb-w3.elc \
151         bbdb-sc.elc bbdb-migrate.elc
152 bbdb:   bbdb.elc bbdb-com.elc bbdb-hooks.elc extras
153 rmail:  bbdb bbdb-rmail.elc
154 vm:     bbdb bbdb-vm.elc
155 mhe:    bbdb bbdb-mhe.elc
156 gnus:   bbdb bbdb-gnus.elc
157 # aliases
158 mh:     mhe
159 mh-e:   mhe
160
161 deploy:
162         @for fname in `cd RCS; ls |sed 's/,v$$//g'` ; do \
163           if [ -w "$$fname" ] ; then \
164             echo "File $$fname needs to be checked in" ; \
165             exit 1 ; \
166           fi ; \
167         done ; \
168         if [ -z "$(REVTAG)" ] ; then \
169           echo "REVTAG needs to be set" ; \
170           exit 1 ; \
171         fi ; \
172         rcs "-n$(REVTAG)": RCS/* ; \
173         co -kv RCS/*
174
175
176 clean:
177         $(RM) bbdb.elc bbdb-*.elc bbdb.info auto-autoloads.elc
178