* Makefile (compile-strict): New target.
[elisp/wanderlust.git] / Makefile
1 #
2 # Please specify your Emacs here.
3 #
4 EMACS   = emacs
5 # To install Wanderlust for XEmacs 21 or later,
6 # running 'make install-package' is recommended.
7 # 'make install-package' refers $XEMACS instead of $EMACS.
8 XEMACS  = xemacs
9 #
10 # Target directory to install the Wanderlust package.
11 # (Automatically detected if this line is unchanged.)
12 #
13 LISPDIR = NONE
14 #LISPDIR = /usr/local/lib/mule/site-lisp
15
16 INFODIR = NONE
17 #INFODIR = /usr/local/share/info
18
19 # For XEmacs package.
20 PACKAGEDIR = NONE
21
22 # For XEmacs or Emacs 21: directory where icon files should go.
23 PIXMAPDIR = NONE
24
25
26 ################# No need to modify following lines ####################
27 BATCHFLAG = -batch
28 FLAGS     = $(BATCHFLAG) -q -no-site-file
29
30 elc:
31         $(EMACS) $(FLAGS) -l WL-MK -f compile-wl-package \
32                 $(LISPDIR) $(PIXMAPDIR)
33
34 check:
35         $(EMACS) $(BATCHFLAG) -l WL-MK -f check-wl \
36                 $(LISPDIR) $(PIXMAPDIR)
37
38 test:
39         $(EMACS) $(FLAGS) -l WL-MK -f test-wl \
40                 $(LISPDIR) $(PIXMAPDIR)
41
42 update-version:
43         $(EMACS) $(FLAGS) -l WL-MK -f update-version \
44                 $(LISPDIR) $(PIXMAPDIR)
45
46 compile-strict: clean-elc
47         @args="$(FLAGS)";\
48         args="$$args -L elmo -L wl";\
49         echo "=============================================";\
50         echo "Compiling the 1st stage-----without elc files";\
51         echo "=============================================";\
52         for i in `$(EMACS) $(FLAGS) -l WL-MK -f wl-examine-modules 2>/dev/null`;\
53           do\
54           j=`echo $$i| sed 's/elc$$/el/g'`;\
55           echo "$(EMACS) ARGS -f batch-byte-compile $$j";\
56           $(EMACS) $$args -f batch-byte-compile $$j;\
57           mv $$i $$j"x";\
58         done;\
59         for i in `echo elmo/*.elx wl/*.elx utils/*.elx`; do\
60           j=`echo $$i| sed 's/elx$$/elc/g'`;\
61           mv $$i $$j;\
62         done;\
63         echo "==============================================";\
64         echo "Compiling the 2nd stage-----with all elc files";\
65         echo "==============================================";\
66         for i in `$(EMACS) $(FLAGS) -l WL-MK -f wl-examine-modules 2>/dev/null`;\
67           do\
68           j=`echo $$i| sed 's/elc$$/el/g'`;\
69           echo "$(EMACS) ARGS -f batch-byte-compile $$j";\
70           $(EMACS) $$args -f batch-byte-compile $$j;\
71         done
72
73 install-elc:
74         $(EMACS) $(FLAGS) -l WL-MK -f install-wl-package \
75                 $(LISPDIR) $(PIXMAPDIR)
76
77 uninstall-elc:
78         $(EMACS) $(FLAGS) -l WL-MK -f uninstall-wl-package \
79                 $(LISPDIR) $(PIXMAPDIR)
80
81 clean-elc:
82         rm -f wl/*.elc wl/*~ wl/auto-autoloads.el wl/custom-load.el \
83                 wl/wl-news.el elmo/*.elc utils/*.elc utils/hmac/lisp/*.elc
84
85 package:
86         $(XEMACS) $(FLAGS) -l WL-MK -f compile-wl-package-xmas \
87                 $(PACKAGEDIR) $(PIXMAPDIR)
88
89 install-package:
90         $(XEMACS) $(FLAGS) -l WL-MK -f install-wl-package-xmas \
91                 $(PACKAGEDIR) $(PIXMAPDIR)
92
93 info:
94         $(EMACS) $(FLAGS) -l WL-MK -f wl-texinfo-format $(INFODIR)
95
96 install-info:
97         $(EMACS) $(FLAGS) -l WL-MK -f install-wl-info $(INFODIR)
98
99 mostlyclean-info:
100         rm -f doc/*~ doc/*.cp doc/*.fn doc/*.ky doc/*.pg doc/*.tp doc/*.vr \
101                 doc/*.cps doc/*.fns doc/*.kys doc/*.pgs doc/*.tps doc/*.vrs
102
103 clean-info: mostlyclean-info
104         rm -f doc/*.info doc/*.info-*
105
106 mostlyclean-dvi:
107         rm -f doc/*~ doc/*.aux doc/*.log doc/*.toc
108
109 clean-dvi: mostlyclean-dvi
110         rm -f doc/*.dvi
111
112 all: elc
113
114 install: install-elc
115
116 uninstall: uninstall-elc
117
118 mostlyclean: clean-elc mostlyclean-info mostlyclean-dvi
119
120 clean: mostlyclean clean-dvi
121
122 distclean: maintainer-clean
123
124 maintainer-clean: clean clean-info