ca38edb4a7224c41cb0379f04b4a7829acea833d
[elisp/gnus.git-] / lisp / Makefile.in
1 datadir = @datadir@
2 lispdir = @lispdir@
3 prefix = @prefix@
4 srcdir = @srcdir@
5 subdir = lisp
6 top_srcdir = @top_srcdir@
7
8 EMACS = @EMACS@
9 FLAGS = -batch -q -no-site-file -l $(srcdir)/dgnushack.el
10 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 SHELL = /bin/sh
13 VPATH = @srcdir@
14 PACKAGEDIR = @PACKAGEDIR@
15 W3DIR = @W3@
16 URLDIR = @URL@
17 EMACS_COMP = URLDIR=$(URLDIR) W3DIR=$(W3DIR) lispdir=$(lispdir) srcdir=$(srcdir) $(EMACS) $(FLAGS)
18 GNUS_PRODUCT_NAME = @GNUS_PRODUCT_NAME@
19 EXPORTING_FILES = $(EMACS_COMP) -f dgnushack-exporting-files 2>/dev/null
20
21 # We should never use `COMMAND && ...' form, use `if COMMAND then ...'
22 # form instead.  Because, as far as we know, FreeBSD's native make will
23 # be discontinued if COMMAND returns a non-zero exit status.
24
25 all total: clean-some gnus-load.el
26         $(EMACS_COMP) -f dgnushack-compile
27
28 clean-some:
29         rm -f *.elc gnus-load.el
30
31 warn: clean-some gnus-load.el
32         $(EMACS_COMP) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
33
34 # The "clever" rule is unsafe, since redefined macros are loaded from
35 # .elc files, and not the .el file.
36 clever some l: gnus-load.el
37         @if test -f $(srcdir)/gnus.elc; then \
38           echo \
39             "checking whether the all elc files should be recompiled..."; \
40           RM_ELC=nil; \
41           if test `$(EMACS) -batch -q -no-site-file \
42                 -eval '(prin1 (featurep (quote xemacs)))' \
43                 2>/dev/null` = t; then \
44             if test ! -f $(srcdir)/gnus-xmas.elc; then RM_ELC=t; fi; \
45           else \
46             if test -f $(srcdir)/gnus-xmas.elc; then RM_ELC=t; fi; \
47           fi; \
48           if test $$RM_ELC = t; then \
49             echo " => maybe yes;" \
50                 "rm -f *.elc auto-autoloads.el custom-load.el"; \
51             rm -f *.elc auto-autoloads.el custom-load.el; \
52           else \
53             echo " => maybe unnecessary"; \
54           fi; \
55         fi
56         $(EMACS_COMP) -f dgnushack-compile
57
58 install: clever install-without-compiling
59
60 install-without-compiling:
61         $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir)
62         @for p in `$(EXPORTING_FILES)`; do \
63           echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \
64           $(INSTALL_DATA) $$p $(lispdir)/$$p; \
65           if test -f $$p"c"; then \
66             echo " $(INSTALL_DATA) $$p""c"" $(lispdir)/$$p""c"; \
67             $(INSTALL_DATA) $$p"c" $(lispdir)/$$p"c"; \
68           fi; \
69         done
70
71 # Rule for XEmacs package.
72 install-package-manifest:
73         $(EMACS_COMP) -f dgnushack-install-package-manifest \
74                 $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
75
76 compose-package: gnus-load.el
77         $(EMACS_COMP) -f dgnushack-compose-package
78
79 remove-extra-files-in-package:
80         $(EMACS_COMP) -f dgnushack-remove-extra-files-in-package \
81                 $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
82 #
83
84 install-el:
85         $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir)
86         cd $(srcdir) \
87         && for p in *.el; do \
88           echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \
89           $(INSTALL_DATA) $$p $(lispdir)/$$p; \
90         done
91
92 tags:
93         etags *.el
94
95 separately:
96         rm -f *.elc ; for i in *.el; do $(EMACS) $(FLAGS) -f batch-byte-compile $$i; done
97
98 pot:
99         xpot -drgnus -r`cat ./version` *.el > rgnus.pot
100
101 gnus-load.el:
102         $(EMACS_COMP) -f dgnushack-make-cus-load $(srcdir)
103         $(EMACS_COMP) -f dgnushack-make-auto-load $(srcdir)
104         $(EMACS_COMP) -f dgnushack-make-load
105
106 clean:
107         rm -f *.orig *.rej *.elc *~ \
108                 auto-autoloads.el custom-load.el gnus-load.el dgnuskwds.el
109
110 distclean: clean
111         rm -f Makefile dgnuspath.el
112
113 Makefile: $(srcdir)/Makefile.in ../config.status
114         cd .. \
115           && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
116
117 # Tell versions [3.59,3.63) of GNU make to not export all variables.
118 # Otherwise a system limit (for SysV at least) may be exceeded.
119 .NOEXPORT: