Re: [cciug] Make Tools

From: David L. Paterline (zcdlp@cnfd.pgh.wec.com)
Date: Thu Feb 24 2000 - 09:01:20 EST


Paul M. Sander wrote:
> Subject: Re: [cciug] Make Tools
> ...
> When writing the build procedures for your own code, be sure to
> abstract out the mechanics of how each file is built as well as you
> can. Rely on default (or even built-in) rules as much as possible;
> if you must write your own pattern rules then put them in a file that's
> included by every makefile. Note that this can get pretty messy when
> using a Make tool exclusively, so a makefile generator such as Imake
> might be of help.
> ...

I would also suggest that, if you are going to need to build on
multiple platforms, you should abstract out the platform-specific
details - compiler/linker options, include file paths, etc. - into a
separate file that is included in each makefile.

In our environment, we define an environment variable $PLATFORM on
each workstation (HP, Sun, IBM, ...), and our makefiles all include
the lines:
        
        # Macro Path
            MACRO_PATH = ${SRC}
        include ${MACRO_PATH}/${PLATFORM}_macros

Then, we create platform-dependent build directories under the
source directory, to contain object files and executables for
each platform.

This allows us to build our products for multiple platforms, using the same
makefile. Standard platform-dependent macros files are defined for each
platform by either a "build master" or a pioneer on a new platform.

Also, if you have the ability to create new makefiles, define a standard
structure and generate new makefiles using this standard structure, so
that the build process for each product component is consistent and
compatible.

One feature of clearmake which we are taking advantage of is the use
of the configuration record for the compiled objects. All of our
developers use clearmake and, when it is time for the developer to
configure their code for QA testing, we check the configuration
record of the built objects. As long as all of the source, include,
and library files which were used in the build are "controlled"
items - i.e., checked-in ClearCase elements - then the build can
be used directly for QA testing without going through an additional
controlled build step.

Hope this helps.

--
David L. Paterline                Westinghouse Electric Company LLC
Advanced Technical Engineer       Commercial Nuclear Fuel Division
dave.paterline@cnfd.pgh.wec.com   Westinghouse Energy Center
PH: 412-374-2286                  4350 Northern Pike Blvd.
FX: 412-374-2284                  Monroeville PA 15146
                                  

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:26 EDT