
.PHONY: tests clean

subdirs = \
scf-opt scf-opt2 scf-opt3 scf-opt4 scf-opt5 scf-opt6 scf-opt7 scf-opt8 \
scf-opt9 scf-opt10 scf-opt11 \
scf-opt-numer scf-freq scf-freq-numer scf-freq-symm-numer \
scf-polar rhf-stab uhf-stab rohf-stab mp2-sp mp2-direct-sp cis-sp cisd-sp \
cisd-opt-numer cc1 cc2 cc3 cc4 cc8 cc9 cc10 cc11 cc12 cc13 cc14 cc15 cc16 \
cc17 cc18 cc19 dboc-rhf1 dboc-rohf1 dboc-uhf1 dboc-rcisd1 dboc-rocisd1 \
rhf-oeprop mp2-oeprop \
extrema-deloc extrema-zmat mp2r12-sp1 mp2-opt-numer \
rhf-lindep1 rohf-lindep1 uhf-lindep1 \
psi_start

tests:
	for dir in $(subdirs); \
	do \
	 (cd $${dir}; echo ...Testing $${dir}...; $(MAKE)) || exit 1; \
	done

clean:
	for dir in $(subdirs); \
	do \
	 (cd $${dir}; echo ...Cleaning $${dir}...; $(MAKE) clean) || exit 1; \
	done
	rm -f ../test-case-results

top_srcdir = /tmp/a/ports/science/psi3/work/psi3
srcdir = /tmp/a/ports/science/psi3/work/psi3/tests
top_objdir = ..

$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
	cd $(top_srcdir) && autoconf

$(top_objdir)/config.status: $(top_srcdir)/configure
	cd $(top_objdir) && ./config.status --recheck

Makefile: $(srcdir)/Makefile.in $(top_objdir)/config.status
	cd $(top_objdir) && CONFIG_FILES=tests/Makefile ./config.status

