#!/usr/bin/make -f

# Test debhelper interaction

include /usr/share/debhelper/dh-fortran/fortran-support.mk


%:
	@echo DEBUGF MAGIC $@
	dh $@ 

define dh_configure_fortran_TEMPLATE = 
 dh_configure_fortran_$(1): 
	@echo CALLING dh_configure_fortran_$(1)
	@echo CONFIGURE $(call get_fc_exe, $(1))
	@echo LEAVING dh_configure_fortran_$(1)
endef
$(eval $(call foreach_fc,configure))

define dh_build_fortran_TEMPLATE = 
 dh_build_fortran_$(1): 
	@echo CALLING dh_build_fortran_$(1)
	@echo "Test code that fails on exe  ( $(1) ) != gfortran "
	$(if $(filter $(1),gfortran), true , FAIL )
	@echo LEAVING dh_build_fortran_$(1)
endef
$(eval $(call foreach_fc,build))

override_dh_auto_configure:
	@echo CONFIGURE SUCCESSFUL

override_dh_auto_build:
	@echo BUILDSUCCESSFUL

