2 # Maintenance productions for the Lisp directory
5 # You can specify a different executable on the make command line,
6 # e.g. "make EMACS=../src/emacs ...".
10 # Command line flags for Emacs. This must include --multibyte,
11 # otherwise some files will not compile.
13 EMACSOPT
= --no-init-file
--no-site-file
--multibyte
-batch
15 SOURCES
= *.el COPYING Makefile
16 lisptagsfiles1
= [a-zA-Z
]*.el
17 lisptagsfiles2
= [a-zA-Z
]*/[a-zA-Z
]*.el
18 ETAGS
= ..
/lib-src
/etags
20 # Files which should not be compiled. All file names must be relative
21 # to the `lisp' directory.
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.
25 DONTCOMPILE
= bindings.el mail
/blessmail.el play
/bruce.el cus-load.el \
26 cus-start.el forms-d2.el forms-pass.el \
27 international
/latin-1.el international
/latin-2.el \
28 international
/latin-3.el international
/latin-4.el \
29 international
/latin-5.el \
30 loaddefs.el loadup.el international
/mule-conf.el patcomp.el \
31 paths.el mail
/sc.el subdirs.el version.el \
32 generic-x.el international
/latin-8.el international
/latin-9.el \
33 emacs-lisp
/cl-specs.el finder-inf.el term
/internal.el
35 # The actual Emacs command run in the targets below.
37 emacs
= $(EMACS
) $(EMACSOPT
)
39 # Common command to find subdirectories
41 setwins
=subdirs
=`find $$wd -type d -print`; \
42 for file in
$$subdirs; do \
43 case
$$file in
*/Old |
*/RCS |
*/CVS |
*/CVS
/* |
*/=* ) ;; \
44 *) wins
="$$wins $$file" ;; \
52 custom-deps
: cus-load.el doit
54 echo Directories
: $$wins; \
55 $(emacs
) -l cus-dep
-f custom-make-dependencies
$$wins
58 echo
"(provide 'finder-inf)" >> $@
59 finder-data
: finder-inf.el doit
61 echo Directories
: $$wins; \
62 $(emacs
) -l finder
-f finder-compile-keywords-make-dist
$$wins
65 echo
";;; loaddefs.el --- automatically extracted autoloads" >> $@
66 echo
";;" >> $@
; echo
";;; Code:" >> $@
68 echo
";;; Local Variables:" >> $@
69 echo
";;; version-control: never" >> $@
70 echo
";;; no-byte-compile: t" >> $@
71 echo
";;; no-update-autoloads: t" >> $@
73 echo
";;; loaddefs.el ends here" >> $@
74 autoloads
: loaddefs.el doit
76 echo Directories
: $$wins; \
77 $(emacs
) --eval
'(setq generated-autoload-file "'`pwd`'/loaddefs.el")' -f batch-update-autoloads
$$wins
80 $(MAKE
) $(MFLAGS
) update-subdirs
83 for file in
$$wins; do \
84 ..
/update-subdirs
$$file; \
87 updates
: update-subdirs autoloads finder-data custom-deps
89 TAGS
: $(lisptagsfiles1
) $(lisptagsfiles2
)
90 ${ETAGS} $(lisptagsfiles1
) $(lisptagsfiles2
)
92 TAGS-LISP
: $(lispsource
)$(lisptagsfiles1
) $(lispsource
)$(lisptagsfiles2
)
93 ${ETAGS} -o TAGS-LISP \
94 $(lispsource
)$(lisptagsfiles1
) $(lispsource
)$(lisptagsfiles2
)
97 -EMACSLOADPATH
=`pwd` $(emacs
) -f batch-byte-compile
$<
99 $(DONTCOMPILE
:.el
=.elc
):
102 # Compile all Lisp files, except those from DONTCOMPILE. This
103 # compiles files unconditionally. All .elc files are made writable
104 # before compilation in case we checked out read-only (CVS option -r).
105 # Files must be compiled one by one, otherwise apparently
106 # eval-when-compile's in some Lisp files make problems in files being
107 # compiled later. We also set the load-path of the Emacs used for
108 # compilation to the current directory and its subdirectories, to
109 # make sure require's and load's in the files being compiled find
112 compile-files
: subdirs.el doit
113 find .
-name
"*.elc" -print | xargs chmod
+w
; \
115 elpat
=`echo $$wins | tr ' ' '\012\012' | \
116 sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
117 els
=`echo $$elpat $(DONTCOMPILE) | tr ' ' '\012\012' | sort | uniq -u`; \
119 EMACSLOADPATH
=`pwd` $(emacs
) -f batch-byte-compile
$$els
121 # Backup compiled Lisp files in elc.tar.gz. If that file already
122 # exists, make a backup of it.
124 backup-compiled-files
:
125 -mv elc.
tar.gz elc.
tar.gz~
126 tar czf elc.
tar.gz
*.elc
*/*.elc
128 # Compile Lisp files, but save old compiled files first.
130 compile
: backup-compiled-files compile-files
132 # Recompile all Lisp files which are newer than their .elc files.
133 # Note that this doesn't create .elc files. It only recompiles if an
137 $(emacs
) -f batch-byte-recompile-directory .
139 # Remove files for a bootstrap. Compiled Lisp files must be removed
140 # because otherwise `bootstrap-emacs' would not be built from sources.
145 # Generate/update files for the bootstrap process.
147 bootstrap
: compile-files autoloads custom-deps
149 # Makefile ends here.