## Process this file with automake to produce Makefile.in

##   This file is part of the AMBER Pipeline
##   Copyright (C) 2002-2004 European Southern Observatory

##   This library is free software; you can redistribute it and/or modify
##   it under the terms of the GNU General Public License as published by
##   the Free Software Foundation; either version 2 of the License, or
##   (at your option) any later version.

##   This program is distributed in the hope that it will be useful,
##   but WITHOUT ANY WARRANTY; without even the implied warranty of
##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##   GNU General Public License for more details.

##   You should have received a copy of the GNU General Public License
##   along with this program; if not, write to the Free Software
##   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

AUTOMAKE_OPTIONS = 1.8 foreign

DISTCLEANFILES = *~


if MAINTAINER_MODE

MAINTAINERCLEANFILES = $(srcdir)/Makefile.in


endif

reg0:
	esoreg.pl  -force -id 0 ../../${PACKAGE}_reg/sof

reg1:
	esoreg.pl  -force -id 1 ../../${PACKAGE}_reg/sof

valgrind:
	esoreg.pl  -valgrind -preload  ../../${PACKAGE}_reg/sof

regcheck:
	mkdir -p .purifydir
	@if test -d ../../${PACKAGE}_reg/sof/; then esorex --version ; fi
	@if test -d ../../${PACKAGE}_reg/sof/; then mkdir -p ../../${PACKAGE}_reg/sof/.purifydir ; fi
	@if test -d ../../${PACKAGE}_reg/sof/.purifydir; then touch ../../${PACKAGE}_reg/sof/.purifydir/_dummy ; fi
#	if test -d ../../${PACKAGE}_reg; then esoreg.pl  -force -id 0 ../../${PACKAGE}_reg/sof; fi
#       link to the Reference data under ${SOF_DATA}/${PACKAGE}/ReferenceData/
	if test -d ../../${PACKAGE}_reg; then  for i in ${SOF_DATA}/${PACKAGE}/ReferenceData/*.0; do ln -f -s  $$i ../../${PACKAGE}_reg/sof/ ; done ; fi
	if test -d ../../${PACKAGE}_reg; then esoreg.pl  -force -id 1 ../../${PACKAGE}_reg/sof; fi 
	@if test "$$?x" = "0x"; then echo PASS: regtests; fi
	@if test "$$?x" != "0x"; then echo FAILED: regtests; fi
	@if test -d ../../${PACKAGE}_reg/sof/.purifydir; then cp ../../${PACKAGE}_reg/sof/.purifydir/* .purifydir; fi

if PURIFY
include $(top_builddir)/Makefile.purify
endif





