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