I've seen internal splines being cut with the workpiece held in a dividing head using a milling machine as a shaper. The difficult bit is getting the shaper tool ground correctly - the guy doing it did it by hand (but he had plenty of experience :-) ). After that it was just tedious traversing of the X axis to take the cut and moving the Y axis to change the depth. Should be easier with a CNC milling machine...