Browse Prior Art Database

Generating Multi-Platform Build Logic from Common Source Code

IP.com Disclosure Number: IPCOM000118929D
Original Publication Date: 1997-Sep-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 4 page(s) / 105K

Publishing Venue

IBM

Related People

Jacob, SW: AUTHOR

Abstract

Increasingly, projects are written in a common subset of a high level language, such as C or C++*, and ported to multiple operating systems as diverse as Unix**, OS/2*, NT, and MVS. It is important to be able to do this cheaply and rapidly.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 44% of the total text.

Generating Multi-Platform Build Logic from Common Source Code

      Increasingly, projects are written in a common subset of a high
level language, such as C or C++*, and ported to multiple operating
systems as diverse as Unix**, OS/2*, NT, and MVS.  It is important to
be able to do this cheaply and rapidly.

      However, each of these systems has different rules for building
product objects and executables, meaning that a complete set of
unique metadata has to be maintained for each platform for each
object.

      No new object can be built on a particular platform until a
developer or builder creates the metadata specific to that object and
platform.  In the case of projects like MQSeries, that means 12
complete copies of over 20 items of data for more than 3,000 files,
each of which  have to be maintained in step.

      Global changes, for instance, a change in naming convention or
new level of header files or macros, are particularly difficult.

      Logical differences between the syntax used by various forms of
Make or the complete culture change when using MVS JCL are both
sources of confusion, making it harder to see if data is in step.

      Instead of storing build instructions and metadata together in
Make files, the solution described here defines a set of rules which
take a simple instruction, for instance:
  /*Build File Sample*************/
    CCOMPILE(fred)
    CCOMPILE(george)
    ........
  and develop real programs written in a machine specific language
which will compile that particular object.

The process flow is:

TRANSLATION
  +_____+      +___________+             +___________+
  !Build!      !Macro      !             !Meta Data  !
  !Files!   +  !Definitions! ----------> !(Make) file!
  +_____+      +___________+             +___________+
  Simple       Translation               Definitive
  Instructions Rules                     Build Information

GENERATION
  +___________+     +________+            +_____________+
  !Meta Data  !     !Process !            !Executable   !
  !(Make) file!  +  !Template! ---------> !Build Program!
  +___________+     +________+            +_____________+
                     Generic               Specific
                     Program               Program

TRANSLATION:

Translation rules are written in C Precompiler syntax as follows:
  /*Macro Definition Sample*******/
  #define BUILDID1 level3
  #define BUILDID2 level2
  #define CCOMPILE(NAME)  \
  object: ccclib(NAME.c)                                       @@\
   input: ccclib(NAME.c)                                       @@\
 library: ccclib /product/r100/BUILDID1:product/r100/BUILD...