Cut the aubergines into quarters and set them aside.
To make the spice powder, heat 2 teaspoons of oil in a deep, heavy-based frying pan (skillet) over medium heat. Add the coriander seeds, asafoetida, dried red chillies, and dal and stir-fry for about 2 minutes, or until the spices are fragrant. Remove from the pan and set aside.
Heat 2 more teaspoons oil in the pan over medium heat. Add the coconut and stir-fry for about 1-2 minutes, or until golden brown. Make sure the coconut doesn't burn.
Combine the coconut with the fried spices and dal in a bowl. Add the tamarind extract and season with salt. Transfer the mixture to a blender and process until ground.
Heat the oil for the tempering in the same pan over medium heat, add the mustard seeds, dried red chilli and curry leaves, and stir-fry for 1 minute, or until the mustard seeds start to splutter Add the onions and fry for about 2 minutes.
Add the aubergines, turmeric, 4 tablespoons water, and season with salt. Reduce the heat, cover, and simmer for about 10 minutes, or until the aubergines are tender and all the moisture has evaporated.
Sprinkle in the spice powder and stir gently before serving.