Mercurial > emacs
annotate lisp/Makefile.in @ 35269:ec15c68b25ba
Fix last change.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 12 Jan 2001 14:10:17 +0000 |
parents | 646b893652e6 |
children | 0689ddc1751c |
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 | |
30084
bafd38c61694
(DONTCOMPILE): Add comment that the name may
Gerd Moellmann <gerd@gnu.org>
parents:
29935
diff
changeset
|
26 # Files which should not be compiled. If you change the name `DONTCOMPILE' |
bafd38c61694
(DONTCOMPILE): Add comment that the name may
Gerd Moellmann <gerd@gnu.org>
parents:
29935
diff
changeset
|
27 # to something different, you'll have to change make-dist as well. |
bafd38c61694
(DONTCOMPILE): Add comment that the name may
Gerd Moellmann <gerd@gnu.org>
parents:
29935
diff
changeset
|
28 # |
29657 | 29 # - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's |
30 # no point compiling it, although it doesn't hurt. | |
31 | |
32 DONTCOMPILE = \ | |
33 $(lisp)/cus-load.el \ | |
34 $(lisp)/cus-start.el \ | |
35 $(lisp)/emacs-lisp/cl-specs.el \ | |
29874
faee0fe8fa05
(DONTCOMPILE): Add eshell/esh-maint.el.
Gerd Moellmann <gerd@gnu.org>
parents:
29704
diff
changeset
|
36 $(lisp)/eshell/esh-maint.el \ |
31379
58ff79ca361e
(DONTCOMPILE): Fix typo in file name.
Gerd Moellmann <gerd@gnu.org>
parents:
30095
diff
changeset
|
37 $(lisp)/eshell/esh-groups.el \ |
29657 | 38 $(lisp)/finder-inf.el \ |
39 $(lisp)/forms-d2.el \ | |
40 $(lisp)/forms-pass.el \ | |
41 $(lisp)/generic-x.el \ | |
42 $(lisp)/international/latin-1.el \ | |
43 $(lisp)/international/latin-2.el \ | |
44 $(lisp)/international/latin-3.el \ | |
45 $(lisp)/international/latin-4.el \ | |
46 $(lisp)/international/latin-5.el \ | |
47 $(lisp)/international/latin-8.el \ | |
48 $(lisp)/international/latin-9.el \ | |
49 $(lisp)/international/mule-conf.el \ | |
50 $(lisp)/loaddefs.el \ | |
51 $(lisp)/loadup.el \ | |
52 $(lisp)/mail/blessmail.el \ | |
53 $(lisp)/mail/sc.el \ | |
54 $(lisp)/patcomp.el \ | |
55 $(lisp)/paths.el \ | |
56 $(lisp)/play/bruce.el \ | |
57 $(lisp)/subdirs.el \ | |
58 $(lisp)/term/internal.el \ | |
59 $(lisp)/version.el | |
60 | |
61 # Files to compile before others during a bootstrap. This is done | |
62 # to speed up the bootstrap process. | |
63 | |
64 COMPILE_FIRST = \ | |
65 $(lisp)/emacs-lisp/byte-opt.el \ | |
66 $(lisp)/emacs-lisp/bytecomp.el \ | |
67 $(lisp)/subr.el | |
68 | |
69 # The actual Emacs command run in the targets below. | |
70 | |
33158
075e5f998739
* Makefile.in (emacs): Set EMACSLOADPATH always.
Ken Raeburn <raeburn@raeburn.org>
parents:
32884
diff
changeset
|
71 emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT) |
29657 | 72 |
73 # Common command to find subdirectories | |
74 | |
75 setwins=subdirs=`find $$wd -type d -print`; \ | |
76 for file in $$subdirs; do \ | |
77 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \ | |
78 *) wins="$$wins $$file" ;; \ | |
79 esac; \ | |
80 done | |
81 | |
82 doit: | |
83 | |
84 cus-load.el: | |
85 touch $@ | |
86 custom-deps: cus-load.el doit | |
87 wd=$(lisp); $(setwins); \ | |
88 echo Directories: $$wins; \ | |
33505
2b0399706883
(custom-deps, finder-data, autoloads, recompile): Don't set EMACSLOADPATH.
Eli Zaretskii <eliz@gnu.org>
parents:
33158
diff
changeset
|
89 $(EMACS) $(EMACSOPT) -l cus-dep -f custom-make-dependencies $$wins |
29657 | 90 |
91 finder-inf.el: | |
92 echo "(provide 'finder-inf)" >> $@ | |
93 finder-data: finder-inf.el doit | |
94 wd=$(lisp); $(setwins); \ | |
95 echo Directories: $$wins; \ | |
33505
2b0399706883
(custom-deps, finder-data, autoloads, recompile): Don't set EMACSLOADPATH.
Eli Zaretskii <eliz@gnu.org>
parents:
33158
diff
changeset
|
96 $(EMACS) $(EMACSOPT) -l finder -f finder-compile-keywords-make-dist $$wins |
29657 | 97 |
98 loaddefs.el: | |
99 echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@ | |
100 echo ";;" >> $@; echo ";;; Code:" >> $@ | |
101 echo "" >> $@ | |
102 echo ";;; Local Variables:" >> $@ | |
103 echo ";;; version-control: never" >> $@ | |
104 echo ";;; no-byte-compile: t" >> $@ | |
105 echo ";;; no-update-autoloads: t" >> $@ | |
106 echo ";;; End:" >> $@ | |
107 echo ";;; loaddefs.el ends here" >> $@ | |
108 autoloads: loaddefs.el doit | |
109 wd=$(lisp); $(setwins); \ | |
110 echo Directories: $$wins; \ | |
33505
2b0399706883
(custom-deps, finder-data, autoloads, recompile): Don't set EMACSLOADPATH.
Eli Zaretskii <eliz@gnu.org>
parents:
33158
diff
changeset
|
111 $(EMACS) $(EMACSOPT) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins |
29657 | 112 |
113 subdirs.el: | |
114 $(MAKE) $(MFLAGS) update-subdirs | |
115 update-subdirs: doit | |
116 wd=$(lisp); $(setwins); \ | |
117 for file in $$wins; do \ | |
118 $(srcdir)/update-subdirs $$file; \ | |
119 done; | |
120 | |
121 updates: update-subdirs autoloads finder-data custom-deps | |
122 | |
32884
f677903fb663
(update-authors): New target for maintenance
Gerd Moellmann <gerd@gnu.org>
parents:
31379
diff
changeset
|
123 # Update the AUTHORS file. |
f677903fb663
(update-authors): New target for maintenance
Gerd Moellmann <gerd@gnu.org>
parents:
31379
diff
changeset
|
124 |
f677903fb663
(update-authors): New target for maintenance
Gerd Moellmann <gerd@gnu.org>
parents:
31379
diff
changeset
|
125 update-authors: |
33158
075e5f998739
* Makefile.in (emacs): Set EMACSLOADPATH always.
Ken Raeburn <raeburn@raeburn.org>
parents:
32884
diff
changeset
|
126 $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) |
32884
f677903fb663
(update-authors): New target for maintenance
Gerd Moellmann <gerd@gnu.org>
parents:
31379
diff
changeset
|
127 |
29657 | 128 TAGS: $(lisptagsfiles1) $(lisptagsfiles2) |
129 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2) | |
130 | |
30095
96039cc24acf
(TAGS-LISP): Don't use `$(lispsource)'.
Gerd Moellmann <gerd@gnu.org>
parents:
30084
diff
changeset
|
131 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) |
96039cc24acf
(TAGS-LISP): Don't use `$(lispsource)'.
Gerd Moellmann <gerd@gnu.org>
parents:
30084
diff
changeset
|
132 ${ETAGS} -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2) |
29657 | 133 |
33667
646b893652e6
(.SUFFIXES): Add .SUFFIXES.
Gerd Moellmann <gerd@gnu.org>
parents:
33626
diff
changeset
|
134 .SUFFIXES: .elc .el |
646b893652e6
(.SUFFIXES): Add .SUFFIXES.
Gerd Moellmann <gerd@gnu.org>
parents:
33626
diff
changeset
|
135 |
29657 | 136 .el.elc: subdirs.el |
33158
075e5f998739
* Makefile.in (emacs): Set EMACSLOADPATH always.
Ken Raeburn <raeburn@raeburn.org>
parents:
32884
diff
changeset
|
137 -$(emacs) -f batch-byte-compile $< |
29657 | 138 |
139 $(DONTCOMPILE:.el=.elc): | |
140 -rm -f $@ | |
141 | |
142 # Compile all Lisp files, except those from DONTCOMPILE. This | |
143 # compiles files unconditionally. All .elc files are made writable | |
144 # before compilation in case we checked out read-only (CVS option -r). | |
145 # Files MUST be compiled one by one. If we compile several files in a | |
146 # row we can't make sure that the compilation environment is clean. | |
147 # We also set the load-path of the Emacs used for compilation to the | |
148 # current directory and its subdirectories, to make sure require's and | |
149 # load's in the files being compiled find the right files. | |
150 | |
151 compile-files: subdirs.el doit | |
152 find $(lisp) -name "*.elc" -print | xargs chmod +w; \ | |
153 wd=$(lisp); $(setwins); \ | |
154 elpat=`echo $$wins | tr ' ' '\012\012' | \ | |
155 sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \ | |
156 els=`echo $$elpat $(DONTCOMPILE) $(COMPILE_FIRST) | \ | |
157 tr ' ' '\012\012' | sort | uniq -u`; \ | |
158 for el in $(COMPILE_FIRST) $$els; do \ | |
159 echo Compiling $$el; \ | |
33158
075e5f998739
* Makefile.in (emacs): Set EMACSLOADPATH always.
Ken Raeburn <raeburn@raeburn.org>
parents:
32884
diff
changeset
|
160 $(emacs) -f batch-byte-compile $$el || exit 1; \ |
29657 | 161 done |
162 | |
163 # Backup compiled Lisp files in elc.tar.gz. If that file already | |
164 # exists, make a backup of it. | |
165 | |
166 backup-compiled-files: | |
167 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~ | |
168 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc | |
169 | |
170 # Compile Lisp files, but save old compiled files first. | |
171 | |
172 compile: backup-compiled-files compile-files | |
173 | |
174 # Recompile all Lisp files which are newer than their .elc files. | |
175 # Note that this doesn't create .elc files. It only recompiles if an | |
176 # .elc is present. | |
177 | |
178 recompile: doit | |
33505
2b0399706883
(custom-deps, finder-data, autoloads, recompile): Don't set EMACSLOADPATH.
Eli Zaretskii <eliz@gnu.org>
parents:
33158
diff
changeset
|
179 $(EMACS) $(EMACSOPT) -f batch-byte-recompile-directory $(lisp) |
29657 | 180 |
181 # Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el, | |
182 # because it's not sure it's up-to-date, and if it's not, that might | |
183 # lead to errors during the bootstrap because something fails to | |
184 # autoload as expected. Remove compiled Lisp files so that | |
185 # bootstrap-emacs will be built from sources only. | |
186 | |
187 bootstrap-clean: | |
188 if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi | |
189 -rm -f $(lisp)/*.elc $(lisp)/*/*.elc | |
190 | |
191 # Generate/update files for the bootstrap process. | |
192 | |
193 bootstrap: autoloads compile-files custom-deps | |
194 | |
29703 | 195 distclean: |
196 -rm -f $(lisp)/Makefile | |
197 | |
29657 | 198 # Makefile ends here. |