#	$Id: Makefile.in,v 1.6 1999/06/23 07:13:14 assar Exp $

SHELL		= /bin/sh

srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
RM		= rm

INSTALL		= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS 	= @top_srcdir@/mkinstalldirs

prefix 		= @prefix@
exec_prefix 	= @exec_prefix@
libdir 		= @libdir@
libexecdir 	= @libexecdir@
bindir 		= @bindir@
transform	= @program_transform_name@
ARLACACHEDIR	= @ARLACACHEDIR@

XFS_BIN		= startarla

all:		startarla arla.init

clean:
	$(RM) -f startarla arla.init *.o *~

startarla: startarla.in
	sed -e 's!%bindir%!$(bindir)!' $(srcdir)/startarla.in | sed -e 's!%ARLACACHEDIR%!$(ARLACACHEDIR)!' > $@
	chmod +x $@

arla.init: arla.init.in
	sed -e 's!%bindir%!$(bindir)!' $(srcdir)/arla.init.in | sed -e 's!%ARLACACHEDIR%!$(ARLACACHEDIR)!' > $@
	chmod +x $@

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	PROG_BIN='$(XFS_BIN)'; for x in $$PROG_BIN; do \
	  f=`echo $$x | sed '$(transform)'`; \
	  $(INSTALL_PROGRAM) $$x $(DESTDIR)$(bindir)/$$f; \
	done

uninstall:
	PROG_BIN='$(XFS_BIN)'; for x in $$PROG_BIN; do \
	  f=`echo $$x | sed '$(transform)'`; \
	  rm -f $(DESTDIR)$(bindir)/$$f; \
	done

Makefile: Makefile.in ../../../config.status
	cd ../../..; CONFIG_FILES=xfs/linux/bin/Makefile CONFIG_HEADERS= $(SHELL) config.status

.PHONY: all install uninstall clean
