5 ########################################################################
8 ##########################################################################
10 # Script setup: THIS NEEDS TO BE FIRST
12 SCRIPTS_DIR="`dirname $0`"
13 if [ "" = "$SCRIPTS_DIR" ]; then
14 SCRIPTS_DIR=/project/dt/scripts
17 ##########################################################################
18 ##########################################################################
20 # Script specific global variables
22 ##########################################################################
23 ##########################################################################
25 LOG_DIR="/project/dt/admin/mkid"
30 DO_MOTIF_BUILD="False"
32 DO_CDEDOC_BUILD="False"
33 DO_CDETEST_BUILD="False"
37 ##########################################################################
43 [-e | -dev] # Default: build x11, motif and cde
44 [-x | -x11] # Build x11 only
45 [-m | -motif] # Build motif only
46 [-c | -cde] # Build cde only
47 [-t | -cdetest] # Build cde tests only
48 [-a | -all] # Build x11, motif, cde, cdedoc and cdetest
49 [-debug] # Debugging output
50 [{-ld | -log_dir} <dirpath>]
51 # Specify an alternate log directory.
53 [{-lf | -log_file} <filename>]
54 # Specify an alternate log file relative to $LOG_DIR.
56 [{-lp | -log_path} <path>]
57 # Specify an alternate log directory.
58 # Default: $LOG_DIR/$LOG_FILE
59 [-h | -? | -help] # Print usage and exit
64 ##########################################################################
66 while [ $# -gt 0 ]; do
68 -e | -dev) DO_X_BUILD="True"
73 -x | -x11) DO_X_BUILD="True"
76 -m | -motif) DO_MOTIF_BUILD="True"
79 -c | -cde) DO_CDE_BUILD="True"
82 -t | -cdetest) DO_CDETEST_BUILD="True";
85 -a | -all) DO_X_BUILD="True"
88 DO_CDEDOC_BUILD="True"
89 DO_CDETEST_BUILD="True"
92 -debug) DO_DEBUG="True"
95 -ld | -log_dir) LOG_DIR=$2; shift 2 ;;
97 -lf | -log_file) LOG_FILE=$2; shift 2 ;;
99 -lp | -log_path) LOG_PATH=$2; shift 2 ;;
101 -h | "-?" | -help | *) usage $PROG_NAME;
107 ##########################################################################
109 # Script setup: Do this after the command line parsing to pick up
110 # an alternate setting of SCRIPTS_DIR
112 if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then
113 print -u2 "$PRG: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!"
114 print -u2 "$PRG: Exiting ..."
117 . $SCRIPTS_DIR/script_setup.ksh
120 ##########################################################################
122 # If no project was selected, then build the 'dev' projects
125 if [ "True" = $DO_X_BUILD ]; then
126 PROJECTS="$PROJECTS $X_TOP"
129 if [ "True" = $DO_MOTIF_BUILD ]; then
130 PROJECTS="$PROJECTS $MOTIF_TOP"
133 if [ "True" = $DO_CDE_BUILD ]; then
134 PROJECTS="$PROJECTS $CDE_TOP"
137 if [ "True" = $DO_CDETEST_BUILD ]; then
138 PROJECTS="$PROJECTS $CDETEST_TOP"
141 if [ -z "$PROJECTS" ]; then
142 PROJECTS="$X_TOP $MOTIF_TOP $CDE_TOP"
145 ##########################################################################
149 if [ -z "$LOG_PATH" ]; then
150 LOG_PATH=$LOG_DIR/$LOG_PATH
153 /usr/local/bin/mkid -o$LOG_PATH $PROJECTS
156 # Clean up temporary files and exit