Makefile generation templates

 

Introduction to makefile generation templates

The technique used for code generation is also used for the generation of compilation makefiles.


Three document templates have been developed for this purpose. The first is used to compile the classes in a package and second to compile only a class.

 

 

Structure of the package makefile template

 

Figure 75. Template for generating the makefile for a package

 

 

The ... item

generates ...

Shell

Declaration of the Shell variable (GNU make on Windows only).

Compiler

the definition of the compiler.

RemoveCommand

the definition of the command to delete the files.

GenDirectory

the definition of the .C# source files root directory.

CompDirectory

the definition of the root directory for the compilation results.

CompOptions

the definition of the compiler options.

ClassPaths

the definition of the paths that search the C# classes used.

CompiledFiles

the definition of the list of .class files to produce.

JarFile

the declaration of the storage file name.

AllTarget

the compilation's global target.

CleanTarget

the target of the class files destruction.

ForceTarget

the target of the forced re-generation of all the .class files.

ArchiveTarget

the main target for producing file storage.

CompilationTargets

the targets for producing compiled files.

JarTarget

the target that runs the jar command for producing the storage file.

ForcedTarget

the target used to force the running of the commands of a target on which the target is dependent.

 

 

Contents of CompiledFiles

 

Figure 76. Template for generating the makefile for a package - the "CompiledFiles" item

 

 

The ... item

generates ...

CompiledFilesToCompile

the definition of the list of .class files to produce

CompiledClasses

the files compiled for a class

StandardCompiledFiles

the .class file compiled for a class

RMICompiledFiles

the stub and skeleton for a class

CompiledPackages

the files compiled for the classes of a package recursively

CompiledFilesToClean

the definition of the list of .class files to be produced (format of the GNU make tool on PC).

CompiledClassesToClean

the files compiled for a class (format of the destruction library)

StandardCompiledFilesToClean

the .class file compiled for a class (format of the destruction library)

RMICompiledFilesToClean

the stub and skeleton for a class (format of the destruction library)

CompiledPackagesToClean

the files compiled for the classes of a leaf package (format of the destruction library)

 

 

Contents of CompilationTargets

 

Figure 77. Template for generating the makefile for a package - "CompilationTargets" item

 

 

The ... item

generates...

PackagesTargets

the compilation targets of the sub-packages of a package

ClassesTargets

the compilation targets of a package's classes

CompilationTarget

the compilation target for compiling a .C# in .class

RmicTarget

the target for producing the stub and skeleton

 

 

Structure of the class makefile template

 

Figure 78. Template for generating the makefile for a class

 

 

The command ...

is used to ...

Shell

declaration of the Shell variable (GNU make on Windows only)

Compiler

the definition of the compiler

RemoveCommand

the definition of the command to delete the file

GenDirectory

the definition of the generation root directory

CompDirectory

the definition of the directory put together for the compilation results

CompOptions

the definition of the compiler options

ClassPaths

the definition of the paths used to search for the used C# classes

CompiledFiles

the definition of the list of .class files to be produced

CompiledFilesToCompile

the definition of the list of .class files to be produced

StandardCompiledFiles

the file compiled for a class

RMICompiledFiles

the stub and skeleton for a class

CompiledFilesToClean

the definition of the list of .class files to be produced (format of the destruction binary).

StandardCompiledFilesToClean

the file compiled for a class (format of the destruction binary)

RMICompiledFilesToClean

the stub and skeleton for a class (format of the destruction binary)

JarFile

the declaration of the name of the storage file

AllTarget

the target of the .class files destruction

ForceTarget

the target of the forced re-generation of all the .class files

ArchiveTarget

the main target for producing file storage

CompilationTargets

the targets of the .class generation

CompilationTarget

the target used to produce the stub and skeleton

RmicTarget

the target used to produce the stub and skeleton

JarTarget

the target that runs the .jar command used to produce the storage file.

ForcedTarget

the target used to force the running of the commands of a target on which the target is dependent.