6e7da4c912e7d67a03eb2cb8012fbb6c216282af
[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 all total: clean-some gnus-load.elc
22         $(EMACS_COMP) -f dgnushack-compile
23
24 clean-some:
25         rm -f *.elc gnus-load.el
26
27 warn: clean-some gnus-load.elc
28         $(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"
29
30 # The "clever" rule is unsafe, since redefined macros are loaded from
31 # .elc files, and not the .el file.
32 clever some: gnus-load.elc
33         @if test -f $(srcdir)/gnus.elc; then \
34           echo \
35             "checking for whether the all elc files should be recompiled..."; \
36           RM_ELC=nil; \
37           if test `$(EMACS) -batch -q -no-site-file \
38                 -eval "(princ (format \"%s\" (featurep (quote xemacs))))" \
39                 2>/dev/null` = t; then \
40             test ! -f $(srcdir)/gnus-xmas.elc && RM_ELC=t; \
41           else \
42             test -f $(srcdir)/gnus-xmas.elc && RM_ELC=t; \
43           fi; \
44           if test $$RM_ELC = t; then \
45             echo " => maybe yes;" \
46                 "rm -f *.elc auto-autoloads.el custom-load.el"; \
47             rm -f *.elc auto-autoloads.el custom-load.el; \
48           else \
49             echo " => maybe unnecessary"; \
50           fi; \
51         fi
52         $(EMACS_COMP) -f dgnushack-compile
53
54 install: clever install-without-compiling
55
56 install-without-compiling:
57         $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir)
58         @for p in `$(EXPORTING_FILES)`; do \
59           echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \
60           $(INSTALL_DATA) $$p $(lispdir)/$$p; \
61           if test -f $$p"c"; then \
62             echo " $(INSTALL_DATA) $$p""c"" $(lispdir)/$$p""c"; \
63             $(INSTALL_DATA) $$p"c" $(lispdir)/$$p"c"; \
64           fi; \
65         done
66
67 # Rule for XEmacs package.
68 install-package-manifest:
69         $(EMACS_COMP) -f dgnushack-install-package-manifest \
70                 $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
71
72 compose-package: gnus-load.elc
73         $(EMACS_COMP) -f dgnushack-compose-package
74
75 remove-extra-files-in-package:
76         $(EMACS_COMP) -f dgnushack-remove-extra-files-in-package \
77                 $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
78 #
79
80 install-el:
81         $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir)
82         cd $(srcdir) \
83         && for p in *.el; do \
84           echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \
85           $(INSTALL_DATA) $$p $(lispdir)/$$p; \
86         done
87
88 tags:
89         etags *.el
90
91 separately:
92         rm -f *.elc ; for i in *.el; do $(EMACS) $(FLAGS) -f batch-byte-compile $$i; done
93
94 pot:
95         xpot -drgnus -r`cat ./version` *.el > rgnus.pot
96
97 gnus-load.elc:
98         $(EMACS_COMP) -f dgnushack-make-cus-load $(srcdir)
99         $(EMACS_COMP) -f dgnushack-make-auto-load $(srcdir)
100         $(EMACS_COMP) -f dgnushack-make-load
101
102 clean:
103         rm -f *.orig *.rej *.elc *~ \
104                 auto-autoloads.el custom-load.el gnus-load.el dgnuskwds.el
105
106 distclean: clean
107         rm -f Makefile dgnuspath.el
108
109 Makefile: $(srcdir)/Makefile.in ../config.status
110         cd .. \
111           && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
112
113 # Tell versions [3.59,3.63) of GNU make to not export all variables.
114 # Otherwise a system limit (for SysV at least) may be exceeded.
115 .NOEXPORT: