Beispiel #1
0
        public override IVerbWorker getWorker(WorkingDirectory workingDirectory)
        {
            // "beat $BUILD_DEFS -out $out.tmp -in $in $incls"
            List <string> args = new List <string>();

            args.Add("-in");
            args.Add(this.beatobj.getRelativePath());

            IEnumerable <BuildObject> beatImports =
                BeatExtensions.getBeatFlavoredShallowIncludes(this.contextVerb, this.beatobj, BeatIncludes.ImportFilter.ForBeatOrBasm);

            foreach (BuildObject ifcObj in beatImports.Where(obj => !obj.Equals(this.beatobj)))
            {
                Util.Assert(!ifcObj.getRelativePath().Contains(".imp"));   // Erk, don't feed imp files as includes!
                args.Add("-i");
                args.Add(ifcObj.getRelativePath());
            }

            args.AddRange(this.contextVerb.getPoundDefines().ToDefArgs());

            string dbgText = string.Format(
                "rem verb {0}{1}",
                this,
                System.Environment.NewLine);

            return(new ProcessInvokeAsyncWorker(
                       workingDirectory,
                       this,
                       this.getBeatExecutable().getRelativePath(),
                       args.ToArray(),
                       ProcessExitCodeHandling.NonzeroIsFailure,
                       captureStdout: this.outputFile(),
                       failureBase: getDiagnosticsBase(),
                       dbgText: dbgText));
        }
Beispiel #2
0
        public override IVerbWorker getWorker()
        {
            //-        "beat $BUILD_DEFS -out $out.tmp -in $in $incls"
            List <string> args = new List <string>();

            args.Add("-in");
            args.Add(beatobj.getRelativePath());

            IEnumerable <BuildObject> beatImports =
                BeatExtensions.getBeatFlavoredShallowIncludes(contextVerb, beatobj, BeatIncludes.ImportFilter.ForBeatOrBasm);

            foreach (BuildObject ifcObj in beatImports.Where(obj => !obj.Equals(beatobj)))
            {
                Util.Assert(!ifcObj.getRelativePath().Contains(".imp"));   //- Erk, don't feed imp files as includes!
                args.Add("-i");
                args.Add(ifcObj.getRelativePath());
            }
            args.AddRange(contextVerb.getPoundDefines().ToDefArgs());

            string dbgText = String.Format("rem verb {0}{1}",
                                           this, System.Environment.NewLine);

            return(new ProcessInvokeAsyncWorker(this,
                                                getBeatExecutable().getRelativePath(),
                                                args.ToArray(),
                                                ProcessInvoker.RcHandling.NONZERO_RC_IS_FAILURE,
                                                finalStdoutPath: outputFile().getFilesystemPath(),
                                                failureBase: getDiagnosticsBase(),
                                                dbgText: dbgText));
        }