In the domain of building
software out of an assorted collection of ?¬?les, one simple word says it all: make.
The make tool allows you to specify what ?¬?les your ?¬?nished application is
dependent on and what command is necessary to process those ?¬?les into that
application. There may be several stages and intermediate ?¬?les, with different
commands necessary at each stage. For instance, an executable is built by a linker
from object ?¬?les, but the object ?¬?les themselves must be built with a compiler from
source ?¬?les.With a little work, it is possible to make a make?¬?le (the input to the make
tool) that simply lists the source ?¬?les, the general command to compile source ?¬?les,
and the general command to link object ?¬?les.
When writing software by hand, keeping such a make ?¬?le up-to-date is just a
matter of remembering to add a ?¬?le name each time you create a new source ?¬?le.
When building software from models, we de?¬?nitely do not want the modeler to
have to know what source ?¬?les we are creating, and remember to update a make?¬?le.
Since the generator is creating the source ?¬?les??”apart from some framework ?¬?les
that are ?¬?xed regardless of the models??”it is easy enough to generate a list of the
?¬?les for the make program. If your generator language supports it, the easiest
way is to append the name of each source ?¬?le to a variable or temporary ?¬?le as
you start generating it.
Pages:
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555