Using Sun WorkShop

The dmake Host

The dmake utility searches for a runtime configuration file to determine where to distribute jobs. Generally, this file must be in your home directory on the dmake host and is named .dmakerc. The dmake utility searches for the runtime configuration file in these locations and in the following order:

  1. The path name you specify on the command line using the -c option

  2. The path name you specify using the DMAKE_RCFILE makefile macro

  3. The path name you specify using the DMAKE_RCFILE environment variable

  4. $(HOME)/.dmakerc

If a runtime configuration file is not found, the dmake utility distributes two jobs to the dmake host.

You edit the runtime configuration file so that it consists of a list of build servers and the number of jobs you want distributed to each build server. The following is an example of a .dmakerc file:


# My machine. This entry causes dmake to distribute to it.
falcon			{ jobs = 1 }
hawk
eagle			{ jobs = 3 }
# Manager's machine. She's usually at meetings
heron			{ jobs = 4 }
avocet

You can also construct groups of build servers in the runtime configuration file. This provides you with the flexibility of easily switching between different groups of build servers as circumstances warrant. For instance, you may define groups of build servers for builds under different operating systems, or you may define groups of build servers that have special software installed on them.

The following is an example of a runtime configuration file that contains groups of build servers:


earth			{ jobs = 2 }
mars			{ jobs = 3 }

group lab1 {
			host falcon	{ jobs = 3 }
			host hawk
			host eagle					{ jobs = 3 }
}
			 
group lab2 {
			host heron
			host avocet					{ jobs = 3 }
			host stilt					{ jobs = 2 }
}
			 
group labs {
			group lab1
			group lab2
}

group sunos5.x {
			group labs
			host jupiter
			host venus	{ jobs = 2 }
			host pluto 	{ jobs = 3 }
}

In order of precedence, the dmake utility distributes jobs to the following:

  1. The formal group specified on the command-line as an argument to the --g option

  2. The formal group specified by the DMAKE_GROUP makefile macro

  3. The formal group specified by the DMAKE_GROUP environment variable

  4. The first group specified in the runtime configuration file

The dmake utility allows you to specify a different execution path for each build server. By default dmake looks for the dmake support binaries on the build server in the same logical path as on the dmake host. You can specify alternate paths for build servers as a host attribute in the .dmakerc file. For example:


group lab1 {
			host falcon	{ jobs = 10 , path = "/set/dist/sparc-S2/bin" }
			host hawk	{ path = "/opt/SUNWspro/bin"                    }
}

You can use double quotation marks to enclose the names of groups and hosts in the .dmakerc file. This allows you more flexibility in the characters that you can use in group names. Digits are allowed, as well as alphabetic characters. Names that start with digits should be enclosed in double quotes. For example:


group "123_lab" {
			host "456_hawk"	{ path = "/opt/SUNWspro/bin"                  }
}