
shell-scripts	:=	larch.sh

include $(makefiles)/shell-scripts.mk

larch.sh: larch.sh.in
	sed -e "s,@LIBEXECDIR@,$(libexec-install-dir)," \
	    -e "s,@PACKAGE@,$(cfg__std__package)," \
	    -e "s,@ARCHSHELL@,$(cfg__posix_shell)," \
	    -e "s,@ARCHMAILER@,$(cfg__posix_mailx)," \
	    -e "s,@ARCHSENDMAIL@,$(cfg__sendmail)," \
	    -e "s,@BUGMAIL@,$(cfg__arch_bug_mail)," \
	    $< > larch.sh

install: install-larch Installed-shell-scripts

install-larch Installed-shell-scripts: larch
	test ! -e $(program-install-dir)/larch || rm $(program-install-dir)/larch
	mkdir -p $(program-install-dir)
	cp larch $(program-install-dir)/larch
	test ! -e $(libexec-install-dir)/arch/arch/larch || rm $(libexec-install-dir)/arch/arch/larch
	mkdir -p $(libexec-install-dir)/arch/arch
	cp larch $(libexec-install-dir)/arch/arch/larch
	echo larch > Installed-shell-scripts

clean: clean-arch

clean-arch:
	test ! -e Installed-shell-scripts || rm Installed-shell-scripts
	test ! -e larch.sh || rm larch.sh

# tag: Tom Lord Tue Dec  4 14:52:14 2001 (arch/Makefile.in)
#

