################################################################
#	Makefile for CFEngine's bin directory
################################################################

prefix = @prefix@
exec_prefix = @exec_prefix@

VPATH = @srcdir@

bindir = @bindir@
sbindir = @sbindir@

datadir = @datadir@
acdatadir = ${datadir}/cfengine

INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@

MKINSTALLDIR = @top_srcdir@/bin/mkinstalldirs

PERL = @PERL@
SCRIPTS = cfdaily cfwrap cfmail noseyparker editquotas cfbackup cfbg \
		cfrestore

RM = rm -f

all: ${SCRIPTS} backup.exclude
	@echo "All scripts built"

install: install_scripts install_data
	@echo "Install done"

install_scripts: ${SCRIPTS}
	${MKINSTALLDIR} ${sbindir}
	for x in $?; \
	do \
	${INSTALL_PROGRAM} $$x ${sbindir}; \
	done

install_data: backup.exclude
	${MKINSTALLDIR} ${acdatadir}
	${INSTALL_DATA} $? ${acdatadir}

clean:
	${RM} *~

distclean: clean
	${RM} ${SCRIPTS} cf-install Makefile cfengine

dist:
	(cd @top_srcdir@; ${MAKE} dist)
