# This Makefile is only for installation
# Edit here
NORDUGRID_LOCATION=/opt/nordugrid

# Do not edit here
LIBEXEC=${NORDUGRID_LOCATION}/libexec
ETC=${NORDUGRID_LOCATION}/etc


PROVIDERS=cluster.pl queue+jobs.pl users.pl rc.pl se.pl
SCHEMAS=nordugrid.schema 
CONFIGFILES=info.conf nordugrid-ldif.conf


install: ${PROVIDERS}
	mkdir -p ${LIBEXEC}
	cp ${PROVIDERS} ${LIBEXEC}/
	mkdir -p ${ETC}
	cp ${SCHEMAS} ${ETC}/
	@for conf in ${CONFIGFILES}; do \
	if [ -e ${ETC}/$${conf} ]; then mv ${ETC}/$${conf} ${ETC}/$${conf}.save; fi\
	done
	cp ${CONFIGFILES} ${ETC}/ 
	@echo "Please check and edit the ${CONFIGFILES} file(s)"
