A machine tool comprising: a plurality of machining units (100A, 100B), each of the machining units (100A, 100B) including: a first saddle (20, 20a, 20b) movable in a right-left direction; a second saddle (30, 30a, 30b) supported by the first saddle (20, 20a, 20b) and movable in an up-down direction; and a spindle device (40, 40a, 40b) supported by the second saddle (30, 30a, 30b) and movable in a front-rear direction, the plurality of machining units (100A, 100B) being arranged in the right-left direction in such a manner that spindles (41, 41a, 41b) provided in the respective spindle devices (40, 40a, 40b) are parallel to each other; a plurality of X-axis moving mechanisms (51, 52) provided corresponding to the respective machining units (100A, 100B), each one of the X-axis moving mechanisms (51, 52) being adapted to move a respective one of the first saddles (20, 20a, 20b) in the right-left direction; a control device that is adapted to control an operation of the X-axis moving mechanism (51, 52) during machining of a workpiece and during correction of a spindle spacing between the machining units (100A, 100B); and a reference position measuring device that is adapted to measure a reference position to be a reference for the correction of the spindle spacing; wherein the reference position measuring device is adapted to measure reference positions (Qa, Qb) of jigs (8a, 8b) that correspond to the spindles (41, 41a, 41b) of the machine units (100A, 100B) to correct the spindle spacing, wherein the control device is adapted to execute a spindle spacing correction procedure which includes the steps calculate a reference position spacing between a first reference position (Qa) and a second reference position (Qb) among the reference positions that correspond to a first jig and a second jig among the jigs, read out a spindle spacing between the spindles (41, 41a, 41b) of the machining units (100A, 100B) from a storage unit, wherein the spindle spacing corresponds to the spindle spacing corrected in the preceding execution of the spindle spacing correction procedure, calculate a difference (ΔW) between the reference position spacing and the spindle spacing, and move the first saddle (20, 20a, 20b) of a predetermined one of the machining units (100A, 100B) in the right-left direction based on the difference (ΔW), using the one of the X-axis moving mechanisms (51, 52) corresponding to the predetermined machining unit (100A, 100B), to correct the spindle spacing to make the spindle spacing equal to the reference position spacing and to store the corrected spindle spacing in the storage unit. a plurality of machining units (100A, 100B), each of the machining units (100A, 100B) including: a first saddle (20, 20a, 20b) movable in a right-left direction; a second saddle (30, 30a, 30b) supported by the first saddle (20, 20a, 20b) and movable in an up-down direction; and a spindle device (40, 40a, 40b) supported by the second saddle (30, 30a, 30b) and movable in a front-rear direction, the plurality of machining units (100A, 100B) being arranged in the right-left direction in such a manner that spindles (41, 41a, 41b) provided in the respective spindle devices (40, 40a, 40b) are parallel to each other; a plurality of X-axis moving mechanisms (51, 52) provided corresponding to the respective machining units (100A, 100B), each one of the X-axis moving mechanisms (51, 52) being adapted to move a respective one of the first saddles (20, 20a, 20b) in the right-left direction; a control device that is adapted to control an operation of the X-axis moving mechanism (51, 52) during machining of a workpiece and during correction of a spindle spacing between the machining units (100A, 100B); and a reference position measuring device that is adapted to measure a reference position to be a reference for the correction of the spindle spacing; wherein the reference position measuring device is adapted to measure reference positions (Qa, Qb) of jigs (8a, 8b) that correspond to the spindles (41, 41a, 41b) of the machine units (100A, 100B) to correct the spindle spacing, calculate a reference position spacing between a first reference position (Qa) and a second reference position (Qb) among the reference positions that correspond to a first jig and a second jig among the jigs, read out a spindle spacing between the spindles (41, 41a, 41b) of the machining units (100A, 100B) from a storage unit, wherein the spindle spacing corresponds to the spindle spacing corrected in the preceding execution of the spindle spacing correction procedure, calculate a difference (ΔW) between the reference position spacing and the spindle spacing, and move the first saddle (20, 20a, 20b) of a predetermined one of the machining units (100A, 100B) in the right-left direction based on the difference (ΔW), using the one of the X-axis moving mechanisms (51, 52) corresponding to the predetermined machining unit (100A, 100B), to correct the spindle spacing to make the spindle spacing equal to the reference position spacing and to store the corrected spindle spacing in the storage unit.