Efficient manufacturing of products have become more important than ever in our global society. Have you ever thought about how these systems themselves are designed? Manufacturing systems that produce these products are becoming increasingly complex. They need to be flexible, in order to quickly adapt to changing market demands. Products need to be produced faster, while ensuring their quality. All these constraints make the design of present-day manufacturing systems a true challenge. Achieving the economic and quality goals of manufacturing requires the use of a sophisticated controller that directs the scheduling of operations in the system and handles on-line changes in the production process. The controller in a sense functions as the brains of the system, and controls its behavior. In this article, we describe how these controllers can be automatically generated from domain-specific models that specify the system and its requirements.