SUBDIRS = \
	recipes \
	isp \
	gpc1 \
	cfh12k \
	megacam \
	mosaic2 \
	simple \
	simmosaic \
	simtest \
	tc3 \
	skycell \
	sdssmosaic \
	sdss \
	esowfi \
	lbc_red \
	lulin \
	uh8k

install_files = \
	system.config \
	GSCregions.tbl \
	dvo.photcodes

built_sources = \
	ipprc.config.in \
	dvo.site.in

built_files = \
	ipprc.config \
	dvo.site

installdir = $(datadir)/ippconfig

install_DATA = $(install_files) $(built_files)

install-data-hook:
	chmod 0755 $(installdir) 

EXTRA_DIST = $(install_files) $(built_sources)

BUILT_SOURCES = $(built_files)

#ACLOCAL_AMFLAGS = -I m4

# From the autoconf manual, section 4.7.2 "Installation Directory Variables"
edit = sed \
	-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
	-e 's|@prefix[@]|$(prefix)|g'

ipprc.config dvo.site: Makefile
	rm -f $@
	$(edit) '$(srcdir)/$@.in' > $@

ipprc.config: $(srcdir)/ipprc.config.in
dvo.site: $(srcdir)/dvo.site.in
