SHELL = /bin/sh
lisp=@srcdir@
VPATH=@srcdir@
srcdir=@srcdir@/..
EMACS = ../src/emacs
EMACSOPT = -batch --no-site-file --multibyte
SOURCES = *.el COPYING Makefile
lisptagsfiles1 = $(lisp)/[a-zA-Z]*.el
lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el
ETAGS = ../lib-src/etags
DONTCOMPILE = \
$(lisp)/cus-load.el \
$(lisp)/cus-start.el \
$(lisp)/emacs-lisp/cl-specs.el \
$(lisp)/eshell/esh-maint.el \
$(lisp)/eshell/esh-groups.el \
$(lisp)/finder-inf.el \
$(lisp)/forms-d2.el \
$(lisp)/forms-pass.el \
$(lisp)/generic-x.el \
$(lisp)/international/latin-1.el \
$(lisp)/international/latin-2.el \
$(lisp)/international/latin-3.el \
$(lisp)/international/latin-4.el \
$(lisp)/international/latin-5.el \
$(lisp)/international/latin-8.el \
$(lisp)/international/latin-9.el \
$(lisp)/international/mule-conf.el \
$(lisp)/loaddefs.el \
$(lisp)/loadup.el \
$(lisp)/mail/blessmail.el \
$(lisp)/patcomp.el \
$(lisp)/paths.el \
$(lisp)/play/bruce.el \
$(lisp)/subdirs.el \
$(lisp)/term/internal.el \
$(lisp)/term/AT386.el \
$(lisp)/term/apollo.el \
$(lisp)/term/bobcat.el \
$(lisp)/term/iris-ansi.el \
$(lisp)/term/keyswap.el \
$(lisp)/term/linux.el \
$(lisp)/term/lk201.el \
$(lisp)/term/news.el \
$(lisp)/term/vt102.el \
$(lisp)/term/vt125.el \
$(lisp)/term/vt200.el \
$(lisp)/term/vt201.el \
$(lisp)/term/vt220.el \
$(lisp)/term/vt240.el \
$(lisp)/term/vt300.el \
$(lisp)/term/vt320.el \
$(lisp)/term/vt400.el \
$(lisp)/term/vt420.el \
$(lisp)/term/wyse50.el \
$(lisp)/term/xterm.el \
$(lisp)/version.el
COMPILE_FIRST = \
$(lisp)/emacs-lisp/byte-opt.el \
$(lisp)/emacs-lisp/bytecomp.el \
$(lisp)/subr.el \
$(lisp)/progmodes/cc-mode.el \
$(lisp)/progmodes/cc-vars.el
emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT)
setwins=subdirs=`find $$wd -type d -print`; \
for file in $$subdirs; do \
case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
finder_setwins=subdirs=`find $$wd -type d -print`; \
for file in $$subdirs; do \
case $$file in */Old | */RCS | */CVS | */CVS/* | */=* | */obsolete | */term) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
doit:
cus-load.el:
touch $@
custom-deps: cus-load.el doit
wd=$(lisp); $(setwins); \
echo Directories: $$wins; \
$(EMACS) $(EMACSOPT) -l cus-dep -f custom-make-dependencies $$wins
finder-inf.el:
echo "(provide 'finder-inf)" >> $@
finder-data: finder-inf.el doit
wd=$(lisp); $(finder_setwins); \
echo Directories: $$wins; \
$(EMACS) $(EMACSOPT) -l finder -f finder-compile-keywords-make-dist $$wins
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
wd=$(lisp); $(setwins); \
echo Directories: $$wins; \
$(EMACS) $(EMACSOPT) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
subdirs.el:
$(MAKE) $(MFLAGS) update-subdirs
update-subdirs: doit
wd=$(lisp); $(setwins); \
for file in $$wins; do \
$(srcdir)/update-subdirs $$file; \
done;
updates: update-subdirs autoloads finder-data custom-deps
update-authors:
$(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \
${ETAGS} $$els
TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \
${ETAGS} -o TAGS-LISP $$els
.SUFFIXES: .elc .el
.el.elc: subdirs.el
-$(emacs) -f batch-byte-compile $<
$(DONTCOMPILE:.el=.elc):
-rm -f $@
compile-files: subdirs.el doit
find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \
wd=$(lisp); $(setwins); \
elpat=`echo $$wins | tr ' ' '\012\012' | \
sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
els=`echo $$elpat $(DONTCOMPILE) $(COMPILE_FIRST) | \
tr ' ' '\012\012' | sort | uniq -u`; \
for el in $(COMPILE_FIRST) $$els; do \
echo Compiling $$el; \
$(emacs) -f batch-byte-compile $$el || exit 1; \
done
backup-compiled-files:
-mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
-tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
compile: backup-compiled-files compile-files
recompile: doit
$(EMACS) $(EMACSOPT) -f batch-byte-recompile-directory $(lisp)
bootstrap-clean:
if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
-rm -f $(lisp)/*.elc $(lisp)/*/*.elc
bootstrap: autoloads compile-files custom-deps
distclean:
-rm -f $(lisp)/Makefile