Brush the pineapple with a few tablespoons of oil and season with salt and pepper. Grill until golden brown on all sides. Remove the pineapple from the grill, cut into small dice and transfer to a bowl. Add the onion, chile, vinegar, a few tablespoons of oil, cilantro and honey, to taste. Season with salt and pepper. Let sit at room temperature for at least 30 minutes before serving.
For the glaze:
Heat 2 tablespoons of the oil in a medium saucepan over high heat. Add the onions and cook until soft. Add the garlic and cook for 30 seconds. Stir in the sugar, add the rum and cook until reduced by half. Add the stock, habanero, cinnamon stick and star anise, bring to a boil and cook until reduced by half, stirring occasionally, about 30 minutes.
Strain the mixture into a bowl then return it to the saucepan and continue cooking until reduced by half and thickened to a glaze, season with salt and pepper. Pour the mixture into a bowl and let cool to room temperature.
Heat the grill over high heat.
Brush the tenderloin with the remaining 2 tablespoons of oil and season with salt and pepper. Grill until crusty and charred on both sides and the internal temperature reaches 145 degrees F on an instant-read thermometer, brushing with the glaze during the last few minutes of grilling. Remove from the grill, brush with more of the glaze and let rest 5 minutes before slicing into 1/2-inch thick slices.