Detroit — In its storied past, General Motors Co. built refrigerators, locomotive engines and a gamut of auto parts before dumping those businesses in a long-running battle to return to profitability.

The 112-year-old automaker is making money again and back in the business of building product for others, this time