[Top] [Prev] [Next] [Bottom]

Chapter 8: Managing SDE Products

8.1 Product Creation

A creation of a product release includes several steps:

This chapter describes the support that SDE provides for these steps.

8.2 Product Definition Files

A product release is a subset of one or several system configurations. Not all files from the system configurations belong to a product. For this reason it is necessary to describe which files belong to a product, or more precisely to a product release.

Files that belong to a product release should be described in Product Definition Files (PD files).

A PD file contains the following information:

The format of the PD file is as follows:

/* comment */
src dest; commands ! file description

PD files are processed by the cpp preprocessor which means that it is possible to use statements like

#include "file"


#define name definition

or conditional statements.

The item src denotes a file specification of the component(s) to be copied. Any legal filename specification can be used (including the characters *,%,[]). It is also possible to define several files. Normally, only a filename should be specified, which denotes that the file(s) should be placed in the current directory or in the belonging RCS library. If the file is not placed in the current directory, then a complete path may be specified. Normally, a path relative to the current directory should be specified.

The item dest denotes the directory where the files should be copied to. The first part of the directory (root) should be specified by the environment variable PRODUCT_ROOT. This variable denotes the root of a product version.

Both src and dest items may include environment variables for a dynamic definition of items. For example, the environment variable PLATFORM decides which variant of the file will be copied to the corresponding destination directory:


After the first semicolon, commands that are applied on each component after its copying, may be specified. In these commands, the environment variable FILE denotes the component that has been copied.

The last part of the line begins with the "!" character which is followed by a file description.

A PD file may be created by any editor.

PD files should be stored in systems in the same way as other files. Particular versions of PD files describe the particular product releases.

One of the features of the PD file is the include statement, which makes it possible to have several PD files describing the components of a product release. For an easy maintenance, it is recommended that every subsystem containing files to be copied to a product, includes a PD file describing the files from the subsystem. The top level PD file (configuration level) should refer to PD files from the subsystem by using the include statement.

The name of a PD file should correspond to the product name, and the default file type is .pd. For example, PD files for SDE product are called sde.pd.

If several products are produced from a system, then several sets of PD files may be used. For different variants of a product release, conditional statements may be used.

If several systems make a product, then one system (called the product system) contains the main PD file.

The following examples show two PD files - one on the top level, and one on a subsystem.

*FILE sde.pd
*$Id:sde.pd,v1.41993/03/2411:41:31 edewaal STABLE$
*DESCRIPTION Product definition file for SDE

#include "Navigator/sde.pd" ! VerWork command
#include "PDF_Manager/sde.pd" ! PDFE editor
#include "Product_Manager/sde.pd" ! Product Manager
#include "Project_Manager/sde.pd" ! Project Manager
#include "System_Manager/sde.pd" ! System Manager
#include "admin/sde.pd" ! system administration commands
#include "book/sde.pd" ! name booking function
#include "cr_support/sde.pd" ! CR commands
#include "doc/sde.pd" ! SDE documentation
#include "fonts/sde.pd" ! commands for creating new fonts
#include "product/sde.pd" ! product commands
#include "product/patch_support/sde.pd" ! product patch commands
#include "project/sde.pd" ! project commands
#include "public/diff/sde.pd" ! GNU diff commands
#include "public/make/sde.pd" ! GNU make commands
#include "public/rcs/sde.pd" ! GNU rcs commands
#include "rcsp/sde.pd" ! rcsp command
#include "system/sde.pd" ! system commands
#include "utilities/sde.pd" ! miscellaneous commands
#include "utilities/printtool/sde.pd" ! ptool command

* FILE sde.pd
* $Id: sde.pd,v 1.1 1993/02/22 15:30:04 icrnkovi STABLE $
* DESCRIPTION Product definition file for SDE CR subsystem

crdef $PRODUCT_ROOT/lib ; chmod 755 $FILE ! CR dir definition file
craddt $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Add a description to a CR
craddt.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - add a description
craddf $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Add a file spec to a CR
craddf.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - add a file spec
crcat $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Cat CRs
crcat.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - cat CRs
crcre $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Create a CR
crcre.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - create a CR
crdel $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Delete a CR
crdel.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - delete a CR
cred $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Edit a CR
cred.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page - edit a CR
cradd $PRODUCT_ROOT/bin ; chmod 755 $FILE ! Add file version and log message
cradd.1 $PRODUCT_ROOT/man/man1 ; chmod 644 $FILE ! Man page

8.2.1 Copying Files to a Product Release

The files are copied from a system (or from several systems) to a product release by the command


In general the pcopy program copies files from one directory structure to another directory structure. The command can also be used for creation of a temporary product structure, i.e. files from a project's directory structure can be copied to a test directory structure.

When creating a new product release, then the files from a system configuration will be copied to a product release structure.

The program pcopy goes trough the PD file(s) and reads which components should be copied. By default all the components are taken. Using the option -g or -m it is possible to select which files will be copied. A specific file or directory (subsystem) or a specific file suffix may be specified.

If the same components already exist in the destination directory, then only the components that are newer than those in the destination directory are taken. Optionally, no date is tested.

The environment variable SDE_PD defines the PD file name.

PD files define the root destination directory by the environment variable PRODUCT_ROOT. When pcopy is executed this variable must be defined.

Optionally the pcopy command creates the destination directories.

The command pcopy may be invoked as a line command, or from the application

SDE-System Manager, the function

Copy to product.

It may happen that a programmer or system manager copies a file directly to a product release, and forgets to specify it in a PD file. To check if there are some files present in a product release, but not found in PD files, the command


may be used. This command also checks that there are not several definitions of the same files in the PD files.

The command


compares the files in two directory trees and this command can be used for getting information about the differences between two product releases.

Both commands are integrated in the SDE System Manager.

8.3 Delivering a Product Release

SDE does not support directly the product delivery, but only the local installation. The standard HP-UX support can be used.

Figure 8-1 shows the process of integration and distribution of a product release.

Fig 8.1 Processing a product release

A local product structure is created by using pcopy command.

8.4 Checking Product Consistence

When a product version is created it is important that the whole product is built in a consistent way. All external and internal components used for the building must be of the same version. If some parts of a product are built using one version of an external product, and other parts using another version, there is a risk that two parts come into conflict. For this reason it is important to do the following:

These two steps are supported by SDE in the following way:

When building a system, some definition files are used by Makefiles. One of them is a file called imports.mkf. It contains definitions of SDE product versions, external products and other software components which are used for the build procedure.

To check that the components referred to from the imports.mkf file have used the same version of the common products, the command imports must be run, or invoked from the SDE System Manager.

To include information in the generated product, about the used external components, the same file should be taken as a part of the released product version. By convenience, the file is saved as product_root/info/imports.mkf file. Having this definition file in all the product components, the command imports may be used for the products in the same way as for the systems. This command may be invoked from SDE Product Manager.

[Top] [Prev] [Next] [Bottom]