comparison lisp/Makefile.in @ 29657:cdef08609770

*** empty log message ***
author Gerd Moellmann <gerd@gnu.org>
date Wed, 14 Jun 2000 20:26:14 +0000
parents
children 97ed659aea4e
comparison
equal deleted inserted replaced
29656:54fbbb8d8578 29657:cdef08609770
1 #
2 # Maintenance productions for the Lisp directory
3 #
4
5 lisp=@srcdir@
6 VPATH=@srcdir@
7
8 # You can specify a different executable on the make command line,
9 # e.g. "make EMACS=../src/emacs ...".
10
11 EMACS = ../src/emacs
12
13 # Command line flags for Emacs. This must include --multibyte,
14 # otherwise some files will not compile.
15
16 EMACSOPT = -batch --no-site-file --multibyte
17
18 SOURCES = *.el COPYING Makefile
19 lisptagsfiles1 = $(lisp)/[a-zA-Z]*.el
20 lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el
21 ETAGS = ../lib-src/etags
22
23 # Files which should not be compiled.
24 # - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
25 # no point compiling it, although it doesn't hurt.
26
27 DONTCOMPILE = \
28 $(lisp)/bindings.el \
29 $(lisp)/cus-load.el \
30 $(lisp)/cus-start.el \
31 $(lisp)/emacs-lisp/cl-specs.el \
32 $(lisp)/finder-inf.el \
33 $(lisp)/forms-d2.el \
34 $(lisp)/forms-pass.el \
35 $(lisp)/generic-x.el \
36 $(lisp)/international/latin-1.el \
37 $(lisp)/international/latin-2.el \
38 $(lisp)/international/latin-3.el \
39 $(lisp)/international/latin-4.el \
40 $(lisp)/international/latin-5.el \
41 $(lisp)/international/latin-8.el \
42 $(lisp)/international/latin-9.el \
43 $(lisp)/international/mule-conf.el \
44 $(lisp)/loaddefs.el \
45 $(lisp)/loadup.el \
46 $(lisp)/mail/blessmail.el \
47 $(lisp)/mail/sc.el \
48 $(lisp)/patcomp.el \
49 $(lisp)/paths.el \
50 $(lisp)/play/bruce.el \
51 $(lisp)/subdirs.el \
52 $(lisp)/term/internal.el \
53 $(lisp)/version.el
54
55 # Files to compile before others during a bootstrap. This is done
56 # to speed up the bootstrap process.
57
58 COMPILE_FIRST = \
59 $(lisp)/emacs-lisp/byte-opt.el \
60 $(lisp)/emacs-lisp/bytecomp.el \
61 $(lisp)/subr.el
62
63 # The actual Emacs command run in the targets below.
64
65 emacs = $(EMACS) $(EMACSOPT)
66
67 # Common command to find subdirectories
68
69 setwins=subdirs=`find $$wd -type d -print`; \
70 for file in $$subdirs; do \
71 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
72 *) wins="$$wins $$file" ;; \
73 esac; \
74 done
75
76 doit:
77
78 cus-load.el:
79 touch $@
80 custom-deps: cus-load.el doit
81 wd=$(lisp); $(setwins); \
82 echo Directories: $$wins; \
83 $(emacs) -l cus-dep -f custom-make-dependencies $$wins
84
85 finder-inf.el:
86 echo "(provide 'finder-inf)" >> $@
87 finder-data: finder-inf.el doit
88 wd=$(lisp); $(setwins); \
89 echo Directories: $$wins; \
90 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
91
92 loaddefs.el:
93 echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
94 echo ";;" >> $@; echo ";;; Code:" >> $@
95 echo " " >> $@
96 echo ";;; Local Variables:" >> $@
97 echo ";;; version-control: never" >> $@
98 echo ";;; no-byte-compile: t" >> $@
99 echo ";;; no-update-autoloads: t" >> $@
100 echo ";;; End:" >> $@
101 echo ";;; loaddefs.el ends here" >> $@
102 autoloads: loaddefs.el doit
103 wd=$(lisp); $(setwins); \
104 echo Directories: $$wins; \
105 $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
106
107 subdirs.el:
108 $(MAKE) $(MFLAGS) update-subdirs
109 update-subdirs: doit
110 wd=$(lisp); $(setwins); \
111 for file in $$wins; do \
112 $(srcdir)/update-subdirs $$file; \
113 done;
114
115 updates: update-subdirs autoloads finder-data custom-deps
116
117 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
118 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
119
120 TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
121 ${ETAGS} -o TAGS-LISP \
122 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
123
124 .el.elc: subdirs.el
125 -EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $<
126
127 $(DONTCOMPILE:.el=.elc):
128 -rm -f $@
129
130 # Compile all Lisp files, except those from DONTCOMPILE. This
131 # compiles files unconditionally. All .elc files are made writable
132 # before compilation in case we checked out read-only (CVS option -r).
133 # Files MUST be compiled one by one. If we compile several files in a
134 # row we can't make sure that the compilation environment is clean.
135 # We also set the load-path of the Emacs used for compilation to the
136 # current directory and its subdirectories, to make sure require's and
137 # load's in the files being compiled find the right files.
138
139 compile-files: subdirs.el doit
140 find $(lisp) -name "*.elc" -print | xargs chmod +w; \
141 wd=$(lisp); $(setwins); \
142 elpat=`echo $$wins | tr ' ' '\012\012' | \
143 sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
144 els=`echo $$elpat $(DONTCOMPILE) $(COMPILE_FIRST) | \
145 tr ' ' '\012\012' | sort | uniq -u`; \
146 for el in $(COMPILE_FIRST) $$els; do \
147 echo Compiling $$el; \
148 EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
149 done
150
151 # Backup compiled Lisp files in elc.tar.gz. If that file already
152 # exists, make a backup of it.
153
154 backup-compiled-files:
155 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
156 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
157
158 # Compile Lisp files, but save old compiled files first.
159
160 compile: backup-compiled-files compile-files
161
162 # Recompile all Lisp files which are newer than their .elc files.
163 # Note that this doesn't create .elc files. It only recompiles if an
164 # .elc is present.
165
166 recompile: doit
167 $(emacs) -f batch-byte-recompile-directory $(lisp)
168
169 # Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el,
170 # because it's not sure it's up-to-date, and if it's not, that might
171 # lead to errors during the bootstrap because something fails to
172 # autoload as expected. Remove compiled Lisp files so that
173 # bootstrap-emacs will be built from sources only.
174
175 bootstrap-clean:
176 if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
177 -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
178
179 # Generate/update files for the bootstrap process.
180
181 bootstrap: autoloads compile-files custom-deps
182
183 # Makefile ends here.