1997-04-11 11:56:09 +00:00
|
|
|
|
#
|
|
|
|
|
# Maintenance productions for the Lisp directory
|
|
|
|
|
#
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
|
|
|
|
# You can specify a different executable on the make command line,
|
|
|
|
|
# e.g. "make EMACS=../src/emacs ...".
|
|
|
|
|
|
1999-10-25 16:29:44 +00:00
|
|
|
|
EMACS = ../src/emacs
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
|
|
|
|
# Command line flags for Emacs. This must include --multibyte,
|
|
|
|
|
# otherwise some files will not compile.
|
|
|
|
|
|
|
|
|
|
EMACSOPT = --no-init-file --no-site-file --multibyte -batch
|
|
|
|
|
|
1997-04-11 11:56:09 +00:00
|
|
|
|
SOURCES = *.el COPYING Makefile
|
1998-05-03 08:24:36 +00:00
|
|
|
|
lisptagsfiles1 = [a-zA-Z]*.el
|
|
|
|
|
lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el
|
1997-07-25 03:10:59 +00:00
|
|
|
|
ETAGS = ../lib-src/etags
|
1997-04-11 11:56:09 +00:00
|
|
|
|
|
1999-10-07 23:29:39 +00:00
|
|
|
|
# Files which should not be compiled. All file names must be relative
|
|
|
|
|
# to the `lisp' directory.
|
1999-10-20 00:37:35 +00:00
|
|
|
|
# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
|
|
|
|
|
# no point compiling it, although it doesn't hurt.
|
1999-10-23 13:22:02 +00:00
|
|
|
|
|
1999-10-07 23:29:39 +00:00
|
|
|
|
DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \
|
|
|
|
|
cus-start.el forms-d2.el forms-pass.el \
|
|
|
|
|
international/latin-1.el international/latin-2.el \
|
|
|
|
|
international/latin-3.el international/latin-4.el \
|
|
|
|
|
international/latin-5.el \
|
|
|
|
|
loaddefs.el loadup.el international/mule-conf.el patcomp.el \
|
|
|
|
|
paths.el mail/sc.el subdirs.el term-nasty.el version.el \
|
1999-10-20 00:37:35 +00:00
|
|
|
|
generic-x.el international/latin-8.el international/latin-9.el \
|
|
|
|
|
emacs-lisp/cl-specs.el finder-inf.el
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
|
|
|
|
# The actual Emacs command run in the targets below.
|
|
|
|
|
|
|
|
|
|
emacs = $(EMACS) $(EMACSOPT)
|
|
|
|
|
|
1999-10-10 00:41:59 +00:00
|
|
|
|
# Common command to find subdirectories
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
1999-10-10 01:32:09 +00:00
|
|
|
|
setwins=subdirs=`find $$wd -type d -print`; \
|
1997-05-12 00:51:53 +00:00
|
|
|
|
for file in $$subdirs; do \
|
1999-10-10 00:41:59 +00:00
|
|
|
|
case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
|
1997-05-12 00:51:53 +00:00
|
|
|
|
*) wins="$$wins $$file" ;; \
|
|
|
|
|
esac; \
|
1999-10-10 00:41:59 +00:00
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
doit:
|
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
cus-load.el:
|
|
|
|
|
touch $@
|
|
|
|
|
custom-deps: cus-load.el doit
|
1999-10-10 01:32:09 +00:00
|
|
|
|
wd=.; $(setwins); \
|
1998-04-24 21:17:17 +00:00
|
|
|
|
echo Directories: $$wins; \
|
1999-10-07 23:29:39 +00:00
|
|
|
|
$(emacs) -l cus-dep -f custom-make-dependencies $$wins
|
1997-04-11 19:40:29 +00:00
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
finder-inf.el:
|
|
|
|
|
echo "(provide 'finder-inf)" >> $@
|
|
|
|
|
finder-data: finder-inf.el doit
|
1999-10-10 01:32:09 +00:00
|
|
|
|
wd=.; $(setwins); \
|
1998-04-24 21:17:17 +00:00
|
|
|
|
echo Directories: $$wins; \
|
1999-10-07 23:29:39 +00:00
|
|
|
|
$(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
|
1997-04-11 19:40:29 +00:00
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
loaddefs.el:
|
|
|
|
|
echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
|
|
|
|
|
echo ";;" >> $@; echo ";;; Code:" >> $@
|
|
|
|
|
echo "" >> $@
|
|
|
|
|
echo ";;; Local Variables:" >> $@
|
|
|
|
|
echo ";;; version-control: never" >> $@
|
|
|
|
|
echo ";;; no-byte-compile: t" >> $@
|
|
|
|
|
echo ";;; no-update-autoloads: t" >> $@
|
|
|
|
|
echo ";;; End:" >> $@
|
|
|
|
|
echo ";;; loaddefs.el ends here" >> $@
|
|
|
|
|
autoloads: loaddefs.el doit
|
1999-10-10 01:32:09 +00:00
|
|
|
|
wd=.; $(setwins); \
|
1998-04-24 21:17:17 +00:00
|
|
|
|
echo Directories: $$wins; \
|
1999-10-20 00:37:35 +00:00
|
|
|
|
$(emacs) --eval '(setq generated-autoload-file "'`pwd`'/loaddefs.el")' -f batch-update-autoloads $$wins
|
1997-05-12 00:51:53 +00:00
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
subdirs.el:
|
|
|
|
|
$(MAKE) $(MFLAGS) update-subdirs
|
1997-05-12 00:59:57 +00:00
|
|
|
|
update-subdirs: doit
|
1999-10-10 01:32:09 +00:00
|
|
|
|
wd=.; $(setwins); \
|
1997-05-12 00:59:57 +00:00
|
|
|
|
for file in $$wins; do \
|
|
|
|
|
../update-subdirs $$file; \
|
|
|
|
|
done;
|
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
updates: update-subdirs autoloads finder-data custom-deps
|
1997-04-11 13:14:52 +00:00
|
|
|
|
|
1998-05-03 08:24:36 +00:00
|
|
|
|
TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
|
|
|
|
|
${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
|
|
|
|
|
|
|
|
|
|
TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
|
|
|
|
|
${ETAGS} -o TAGS-LISP \
|
|
|
|
|
$(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
1999-10-20 00:37:35 +00:00
|
|
|
|
.el.elc: subdirs.el
|
|
|
|
|
-EMACSLOADPATH=`pwd` $(emacs) -f batch-byte-compile $<
|
|
|
|
|
|
|
|
|
|
$(DONTCOMPILE:.el=.elc):
|
|
|
|
|
-rm -f $@
|
|
|
|
|
|
1999-10-07 23:29:39 +00:00
|
|
|
|
# Compile all Lisp files, except those from DONTCOMPILE. This
|
|
|
|
|
# compiles files unconditionally. All .elc files are made writable
|
|
|
|
|
# before compilation in case we checked out read-only (CVS option -r).
|
1999-10-08 21:54:44 +00:00
|
|
|
|
# Files must be compiled one by one, otherwise apparently
|
|
|
|
|
# eval-when-compile's in some Lisp files make problems in files being
|
|
|
|
|
# compiled later. We also set the load-path of the Emacs used for
|
|
|
|
|
# compilation to the current directory and its subdirectories, to
|
|
|
|
|
# make sure require's and load's in the files being compiled find
|
|
|
|
|
# the right files.
|
1999-10-07 23:29:39 +00:00
|
|
|
|
|
1999-10-23 13:22:02 +00:00
|
|
|
|
compile-files: subdirs.el doit
|
1999-10-20 00:37:35 +00:00
|
|
|
|
find . -name "*.elc" -print | xargs chmod +w; \
|
|
|
|
|
wd=.; $(setwins); \
|
1999-10-25 16:29:44 +00:00
|
|
|
|
elpat=`echo $$wins | tr ' ' '\012\012' | \
|
1999-10-20 00:37:35 +00:00
|
|
|
|
sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
|
1999-10-25 16:29:44 +00:00
|
|
|
|
els=`echo $$elpat $(DONTCOMPILE) | tr ' ' '\012\012' | sort | uniq -u`; \
|
1999-10-20 00:37:35 +00:00
|
|
|
|
echo $$els; \
|
|
|
|
|
EMACSLOADPATH=`pwd` $(emacs) -f batch-byte-compile $$els
|
1999-10-08 23:25:05 +00:00
|
|
|
|
|
1999-10-23 13:22:02 +00:00
|
|
|
|
# Backup compiled Lisp files in elc.tar.gz. If that file already
|
|
|
|
|
# exists, make a backup of it.
|
|
|
|
|
|
|
|
|
|
backup-compiled-files:
|
|
|
|
|
-mv elc.tar.gz elc.tar.gz~
|
|
|
|
|
tar czf elc.tar.gz *.elc */*.elc
|
|
|
|
|
|
|
|
|
|
# Compile Lisp files, but save old compiled files first.
|
|
|
|
|
|
|
|
|
|
compile: backup-compiled-files compile-files
|
|
|
|
|
|
1999-10-07 23:29:39 +00:00
|
|
|
|
# Recompile all Lisp files which are newer than their .elc files.
|
|
|
|
|
# Note that this doesn't create .elc files. It only recompiles if an
|
|
|
|
|
# .elc is present.
|
|
|
|
|
|
|
|
|
|
recompile: doit
|
|
|
|
|
$(emacs) -f batch-byte-recompile-directory .
|
|
|
|
|
|
1999-10-23 13:22:02 +00:00
|
|
|
|
# Remove files for a bootstrap. Compiled Lisp files must be removed
|
|
|
|
|
# because otherwise `bootstrap-emacs' would not be built from sources.
|
|
|
|
|
|
|
|
|
|
bootstrap-clean:
|
|
|
|
|
-rm -f *.elc */*.elc
|
|
|
|
|
|
|
|
|
|
# Generate/update files for the bootstrap process.
|
|
|
|
|
|
|
|
|
|
bootstrap: compile-files autoloads custom-deps
|
|
|
|
|
|
1999-10-07 23:29:39 +00:00
|
|
|
|
# Makefile ends here.
|