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