02.05.2013 Views

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Managing Projects and Sandboxes<br />

For more information about<br />

the -v option, see the online<br />

reference for the pj command.<br />

where var is the name of an attribute, value is the value it is set to, and<br />

file is one or more project members the attribute will be assigned to. If<br />

file is omitted, the attribute is assigned to all project members.<br />

Example<br />

You might use attributes to identify the components needed to build<br />

the NT and OS/2 versions of the gamble project.<br />

You could accomplish this by creating an attribute named “SYS” for<br />

all project members and assigning appropriate values for individual<br />

members.<br />

Files that are used to build both versions of the command (for<br />

example, header and most code files) are assigned a value of<br />

“Both”.<br />

Files used only for the NT version are assigned a value of “NT”.<br />

Files used only for the OS/2 version are assigned a value of<br />

“OS2”.<br />

<strong>The</strong> easiest way to implement this for the gamble project is as follows:<br />

1. Use the pj addrule command to assign the SYS attribute to all<br />

project members, with a value of “Both”.<br />

pj addrule SYS=Both<br />

2. Run the command twice more to change the value of SYS for<br />

those members used for only one operating system<br />

pj addrule SYS=NT nt\filesys.c<br />

pj addrule SYS=OS2 os2\filesys.c<br />

Note To change a member attribute, simply run pj addrule again and<br />

assign a new value.<br />

With these attributes in place, you can use the -v option to the project<br />

commands to specify that they should operate only on members with<br />

a particular attribute, or an attribute set to a certain value.<br />

For example, to print information about all project members with the<br />

SYS attribute, enter<br />

pj print -v SYS<br />

To see the same information about only those members associated<br />

with the NT platform, you would enter<br />

pj print -v SYS=NT<br />

154 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!