+ /*
+ * Generate the command required to open a pipe to a process
+ * which will be refered to with a handle in the task for
+ * reading the data from the pipe.
+ */
+ if (strcmp(tmpl->proceduretype, "-pp")) {
+ if (qcflags) {
+ if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ directories[i],
+ tmpl->sourcefile,
+ qcflags,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ } else {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ defs,
+ directories[i],
+ tmpl->sourcefile,
+ qcflags,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ }
+ } else {
+ if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s -o %s",
+ task_bins[TASK_COMPILE],
+ directories[i],
+ tmpl->sourcefile,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ } else {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s/%s %s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ defs,
+ directories[i],
+ tmpl->sourcefile,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ }
+ }
+ } else {
+ /* Preprocessing (qcflags mean shit all here we don't allow them) */
+ if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
+ util_snprintf(buf, sizeof(buf), "%s -E %s/%s -o %s",
+ task_bins[TASK_COMPILE],
+ directories[i],
+ tmpl->sourcefile,
+ tmpl->tempfilename
+ );
+ } else {
+ util_snprintf(buf, sizeof(buf), "%s -E %s/%s %s/%s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ defs,
+ directories[i],
+ tmpl->sourcefile,
+ tmpl->tempfilename
+ );
+ }
+ }