Code generation tools are crucial to programmer productivity and program correctness in many areas. Our "base" languages like C, C++, Java, Fortran, Ada, Python are general-purpose, which means that anything except basic computaiton is bound to end up a messy sequence of function calls, variable creation, etc. Also, the typical imperative languages do not map well to a whole host of domains.
I see telecom people using tools that generate code in a whole variety of places. For example, ASN.1, SDL (the telecom programming language), UML, state charts are all used to generate code from a domain-oriented expresssion to whatever ugly system lies below. Automotive programmers are big on Matlab/Simulink to go directly from a diagram describing a computation to an implementation without manual intervention. Anybody creating a custom language or a compiler are bound to be using code generation tools in the creation of the code generation tool -- lex, yacc, bison, and more advanced tools such as BURS or hte commercial offerings from Target Technology are used extensively.
So yes, most complex systems are coded to a large extent in code-generation tools of various kinds.