prefix = @prefix@
datadir = @datadir@
lispdir = @lispdir@
srcdir = @srcdir@

@SET_MAKE@
EMACS = @EMACS@
XEMACS = @EMACS@

all: lick info

lick:
	cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" all

install:
	cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" install
	cd texi && $(MAKE) EMACS="$(EMACS)" install
	cd etc && $(MAKE) EMACS="$(EMACS)" install

list-installed-shadows:
	cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" list-installed-shadows

remove-installed-shadows:
	cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" remove-installed-shadows

uninstall:
	cd lisp && $(MAKE) lispdir="$(lispdir)" uninstall
	cd texi && $(MAKE) uninstall
	cd etc && $(MAKE) uninstall

GNUS-NEWS: texi/gnus-news.texi
	cd texi && $(MAKE) GNUS-NEWS

# Rule for Lars and nobody else.
some:
	cd lisp && $(MAKE) EMACS="$(EMACS)" some
l:
	cd lisp && $(MAKE) EMACS="$(EMACS)" clever

info:
	cd texi && $(MAKE) EMACS="$(EMACS)" all

clean:
	rm -f */*.orig */*.rej *.orig *.rej

elclean:
	rm lisp/*.elc

x:
	$(MAKE) EMACS=$(XEMACS)

xsome:
	$(MAKE) EMACS="$(XEMACS)" some

distclean:
	make clean
	rm -rf *~
	for i in lisp texi etc texi/ps; do (cd $$i; make distclean); done
	rm -f config.log config.status config.cache Makefile

config.status: $(srcdir)/configure
	$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
	cd $(srcdir) && autoconf
Makefile: $(srcdir)/Makefile.in config.status
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
