#!/usr/bin/make -f

export PYBUILD_NAME=opentsne

# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))

# How to recursively find all files with the same name in a given folder
ALL_PYX := $(call rwildcard,openTSNE/,*.pyx)
#NOTA: No space before *

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_clean:
	# remove the cython generated file to force rebuild
	rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
