aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier1999-10-20 00:37:35 +0000
committerStefan Monnier1999-10-20 00:37:35 +0000
commitcc953d27936da6fc4900c184af38d6ce977e95da (patch)
tree738011e82689801ae93efbf23681d5107431fafd
parent66f4dd697477d05c20dcb313c6fe6b3dad8043eb (diff)
downloademacs-cc953d27936da6fc4900c184af38d6ce977e95da.tar.gz
emacs-cc953d27936da6fc4900c184af38d6ce977e95da.zip
(dontcompilefiles): Obsoleted.
(DONTCOMPILE): Added emacs-lisp/cl-specs.el. (EL): Unused. (temacs): Removed (unused). (cus-load.el, finder-inf.el, loaddefs.el): New targets to build a dummy version of the file (necessary for the update to work properly). (autoloads): Force the use of `pwd`/loaddefs.el. (updates); Redefined in terms of other targets to reduce redundancy. (.el.elc): New default rule, just in case you want it. (compile): Use a single invocation of Emacs. (bootstrap-compile); Unneeded. (autoloads-with-other-emacs): Unneeded now that autoloads is fixed.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/Makefile142
2 files changed, 55 insertions, 102 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e62a4d64ae4..0d2f6247bdf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
11999-10-19 Stefan Monnier <monnier@cs.yale.edu>
2
3 * Makefile (dontcompilefiles): Obsoleted.
4 (DONTCOMPILE): Added emacs-lisp/cl-specs.el.
5 (EL): Unused.
6 (temacs): Removed (unused).
7 (cus-load.el, finder-inf.el, loaddefs.el): New targets to build a dummy
8 version of the file (necessary for the update to work properly).
9 (autoloads): Force the use of `pwd`/loaddefs.el.
10 (updates); Redefined in terms of other targets to reduce redundancy.
11 (.el.elc): New default rule, just in case you want it.
12 (compile): Use a single invocation of Emacs.
13 (bootstrap-compile); Unneeded.
14 (autoloads-with-other-emacs): Unneeded now that autoloads is fixed.
15
11999-10-19 Dave Love <fx@gnu.org> 161999-10-19 Dave Love <fx@gnu.org>
2 17
3 * emacs-lisp/eval-reg.el: Removed -- not now needed by edebug. 18 * emacs-lisp/eval-reg.el: Removed -- not now needed by edebug.
diff --git a/lisp/Makefile b/lisp/Makefile
index 8c56ff3a509..5ea91f93f0b 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -5,7 +5,7 @@
5# You can specify a different executable on the make command line, 5# You can specify a different executable on the make command line,
6# e.g. "make EMACS=../src/emacs ...". 6# e.g. "make EMACS=../src/emacs ...".
7 7
8EMACS = emacs 8EMACS = emacs
9 9
10# Command line flags for Emacs. This must include --multibyte, 10# Command line flags for Emacs. This must include --multibyte,
11# otherwise some files will not compile. 11# otherwise some files will not compile.
@@ -17,18 +17,10 @@ lisptagsfiles1 = [a-zA-Z]*.el
17lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el 17lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el
18ETAGS = ../lib-src/etags 18ETAGS = ../lib-src/etags
19 19
20# Leave this in. I don't know if some utility depends on it.
21
22dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el
23dontcompilefiles: forms-d2.el forms-pass.el
24dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el
25dontcompilefiles: loaddefs.el loadup.el mule-conf.el patcomp.el
26dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el
27dontcompilefiles: generic-x.el latin-8.el latin-9.el
28
29# Files which should not be compiled. All file names must be relative 20# Files which should not be compiled. All file names must be relative
30# to the `lisp' directory. 21# to the `lisp' directory.
31 22# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
23# no point compiling it, although it doesn't hurt.
32DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \ 24DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \
33 cus-start.el forms-d2.el forms-pass.el \ 25 cus-start.el forms-d2.el forms-pass.el \
34 international/latin-1.el international/latin-2.el \ 26 international/latin-1.el international/latin-2.el \
@@ -36,20 +28,13 @@ DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \
36 international/latin-5.el \ 28 international/latin-5.el \
37 loaddefs.el loadup.el international/mule-conf.el patcomp.el \ 29 loaddefs.el loadup.el international/mule-conf.el patcomp.el \
38 paths.el mail/sc.el subdirs.el term-nasty.el version.el \ 30 paths.el mail/sc.el subdirs.el term-nasty.el version.el \
39 generic-x.el international/latin-8.el international/latin-9.el 31 generic-x.el international/latin-8.el international/latin-9.el \
40 32 emacs-lisp/cl-specs.el finder-inf.el
41# All Lisp source files in the current directory.
42
43EL = $(lisptagsfiles1) $(lisptagsfiles2)
44 33
45# The actual Emacs command run in the targets below. 34# The actual Emacs command run in the targets below.
46 35
47emacs = $(EMACS) $(EMACSOPT) 36emacs = $(EMACS) $(EMACSOPT)
48 37
49# The Emacs used to compile Lisp files from scratch.
50
51temacs=../src/temacs -batch -l ./loadup.el
52
53# Common command to find subdirectories 38# Common command to find subdirectories
54 39
55setwins=subdirs=`find $$wd -type d -print`; \ 40setwins=subdirs=`find $$wd -type d -print`; \
@@ -61,36 +46,44 @@ setwins=subdirs=`find $$wd -type d -print`; \
61 46
62doit: 47doit:
63 48
64custom-deps: doit 49cus-load.el:
50 touch $@
51custom-deps: cus-load.el doit
65 wd=.; $(setwins); \ 52 wd=.; $(setwins); \
66 echo Directories: $$wins; \ 53 echo Directories: $$wins; \
67 $(emacs) -l cus-dep -f custom-make-dependencies $$wins 54 $(emacs) -l cus-dep -f custom-make-dependencies $$wins
68 55
69finder-data: doit 56finder-inf.el:
57 echo "(provide 'finder-inf)" >> $@
58finder-data: finder-inf.el doit
70 wd=.; $(setwins); \ 59 wd=.; $(setwins); \
71 echo Directories: $$wins; \ 60 echo Directories: $$wins; \
72 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins 61 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
73 62
74autoloads: doit 63loaddefs.el:
64 echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
65 echo ";;" >> $@; echo ";;; Code:" >> $@
66 echo " " >> $@
67 echo ";;; Local Variables:" >> $@
68 echo ";;; version-control: never" >> $@
69 echo ";;; no-byte-compile: t" >> $@
70 echo ";;; no-update-autoloads: t" >> $@
71 echo ";;; End:" >> $@
72 echo ";;; loaddefs.el ends here" >> $@
73autoloads: loaddefs.el doit
75 wd=.; $(setwins); \ 74 wd=.; $(setwins); \
76 echo Directories: $$wins; \ 75 echo Directories: $$wins; \
77 $(emacs) -f batch-update-autoloads $$wins 76 $(emacs) --eval '(setq generated-autoload-file "'`pwd`'/loaddefs.el")' -f batch-update-autoloads $$wins
78 77
78subdirs.el:
79 $(MAKE) $(MFLAGS) update-subdirs
79update-subdirs: doit 80update-subdirs: doit
80 wd=.; $(setwins); \ 81 wd=.; $(setwins); \
81 for file in $$wins; do \ 82 for file in $$wins; do \
82 ../update-subdirs $$file; \ 83 ../update-subdirs $$file; \
83 done; 84 done;
84 85
85updates: doit 86updates: update-subdirs autoloads finder-data custom-deps
86 wd=.; $(setwins); \
87 for file in $$wins; do \
88 ../update-subdirs $$file; \
89 done; \
90 echo Directories: $$wins; \
91 $(emacs) -l cus-dep -f custom-make-dependencies $$wins; \
92 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins; \
93 $(emacs) -f batch-update-autoloads $$wins
94 87
95TAGS: $(lisptagsfiles1) $(lisptagsfiles2) 88TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
96 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2) 89 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
@@ -99,6 +92,12 @@ TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
99 ${ETAGS} -o TAGS-LISP \ 92 ${ETAGS} -o TAGS-LISP \
100 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) 93 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
101 94
95.el.elc: subdirs.el
96 -EMACSLOADPATH=`pwd` $(emacs) -f batch-byte-compile $<
97
98$(DONTCOMPILE:.el=.elc):
99 -rm -f $@
100
102# Compile all Lisp files, except those from DONTCOMPILE. This 101# Compile all Lisp files, except those from DONTCOMPILE. This
103# compiles files unconditionally. All .elc files are made writable 102# compiles files unconditionally. All .elc files are made writable
104# before compilation in case we checked out read-only (CVS option -r). 103# before compilation in case we checked out read-only (CVS option -r).
@@ -109,62 +108,14 @@ TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
109# make sure require's and load's in the files being compiled find 108# make sure require's and load's in the files being compiled find
110# the right files. 109# the right files.
111 110
112compile: doit 111compile: subdirs.el doit
113 wd=`pwd`; \ 112 find . -name "*.elc" -print | xargs chmod +w; \
114 find $$wd -name "*.elc" -print | xargs chmod +w; \ 113 wd=.; $(setwins); \
115 subdirs=`find $$wd -type d -print`; \ 114 elpat=`echo $$wins | tr '[ ]' '[\012\012]' | \
116 for dir in $$subdirs; do \ 115 sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
117 case $$dir in \ 116 els=`echo $$elpat $(DONTCOMPILE) | tr '[ ]' '[\012\012]' | sort | uniq -u`; \
118 */Old | */RCS | */CVS | */=* ) ;; \ 117 echo $$els; \
119 *) loadpath="$$loadpath \"$$dir\"" ;; \ 118 EMACSLOADPATH=`pwd` $(emacs) -f batch-byte-compile $$els
120 esac; \
121 done; \
122 loadpath="(setq load-path '($$loadpath))"; \
123 dont_compile=`echo $(DONTCOMPILE)`; \
124 for el in $(EL); do \
125 compile_it=y; \
126 for dont in $$dont_compile; do \
127 if test $$el = $$dont; then \
128 compile_it=n; \
129 fi; \
130 done; \
131 if test $$compile_it = y; then \
132 $(emacs) --eval "$$loadpath" -f batch-byte-compile $$el; \
133 else \
134 echo "Don't compile $$el"; \
135 fi; \
136 done
137
138# Compile Lisp files when all we have is the temacs in ../src. All
139# .elc files under the current directory are deleted first to make
140# sure we start from a clean basis.
141
142bootstrap-compile: doit
143 wd=`pwd`; \
144 find $$wd -name "*.elc" -print | xargs rm -f \
145 subdirs=`find $$wd -type d -print`; \
146 for dir in $$subdirs; do \
147 case $$dir in \
148 */Old | */RCS | */CVS | */=* ) ;; \
149 *) loadpath="$$loadpath \"$$dir\"" ;; \
150 esac; \
151 done; \
152 loadpath="(setq load-path '($$loadpath))"; \
153 dont_compile=`echo $(DONTCOMPILE)`; \
154 for el in $(EL); do \
155 compile_it=y; \
156 for dont in $$dont_compile; do \
157 if test $$el = $$dont; then \
158 compile_it=n; \
159 fi; \
160 done; \
161 if test $$compile_it = y; then \
162 $(temacs) --eval "$$loadpath" -f batch-byte-compile $$el; \
163 else \
164 echo "Don't compile $$el"; \
165 fi; \
166 done
167
168 119
169# Recompile all Lisp files which are newer than their .elc files. 120# Recompile all Lisp files which are newer than their .elc files.
170# Note that this doesn't create .elc files. It only recompiles if an 121# Note that this doesn't create .elc files. It only recompiles if an
@@ -173,17 +124,4 @@ bootstrap-compile: doit
173recompile: doit 124recompile: doit
174 $(emacs) -f batch-byte-recompile-directory . 125 $(emacs) -f batch-byte-recompile-directory .
175 126
176# Build loaddefs.el but with an Emacs executable which was not built
177# in the current directory tree. The problem in this case is that
178# autoload.el reads and writes loaddefs.el in its `source-directory'.
179# If that's different from the current directory tree, we can't build
180# loaddefs.el.
181# Can't this rule be used in place of `autoload'? -sm
182
183autoloads-with-other-emacs: doit
184 wd=.; $(setwins); \
185 echo Directories: $$wins; \
186 $(emacs) --eval '(setq source-directory ".")' \
187 -f batch-update-autoloads $$wins
188
189# Makefile ends here. 127# Makefile ends here.