beautypg.com

Customizing managed builds, Creating custom make targets, Running commands before and after builds – HP Integrity NonStop H-Series User Manual

Page 58

background image

Customizing managed builds

Though managed builds generate makefiles for you, you can still customize managed builds.
NSDEE provides two separate mechanisms for customizing managed builds. The first mechanism
involves writing your own version of top-level makefile targets. The second mechanism involves
using project properties to add commands to be invoked before and after Build Project and Deploy
Project actions.

Creating custom make targets

Managed builds support customization via the following three include statements written to every
top-level auto-generated makefile (one per build configuration):

-include ../makefile.init

-include ../makefile.defs

-include ../makefile.targets

The above include statements pull in text from the files makefile.init, makefile.defs, and
makefile.targets

. NSDEE does not create any of the three files, but you can create any or

all of them. No errors are generated if any of the three files is not present when the makefile is
used.

makefile.init is included at the top of the top-level makefile. You can use it to add your own makefile
initialization.

makefile.defs is included in the top-level makefile just before build targets. Use it to define your
own makefile macros or to alter predefined macros such as those declared in the auto-generated
make include files, objects.mk and source.mk. For example, you can add objects built by
another project by specifying the path to the objects using the USER_OBJS macro defined in
objects.mk

(as makefile.defs is included "after" objects.mk in the top-level makefile).

USER_OBJS

is included on the command-line of the final build target for a project. For details,

see

“Adding externally-built objects and linkfiles to managed builds” (page 107)

.

makefile.targets

is included at the bottom of the top-level makefile. Use it to add your own

build targets, which you can then build via the Make Target view (by also adding your own build
targets in that view).

You can even use makefile.targets to override predefined build targets. For details, see

“Creating a makefile.targets file for managed builds” (page 110)

.

Running commands before and after builds

You can set up commands to be run before and after builds and before and after deploying the
final build object.

Figure 15 (page 59)

shows an example of using project properties to set simple

commands to be issued before and after a build.

58

Concepts

This manual is related to the following products: