Re: make Command Builder not print command
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CEZOQHDzcLc11q-HTAkvZ-5-eMCy+q0s=4esKTiii8=CA@mail.gmail.com> |
Jason - Good One. I forgot about that.. ;) On Tue, Mar 5, 2019 at 11:38 PM Jason Kenny <[email protected]> wrote: > I think there is a easier answer… it is hidden in the documents. > > > > If the first argument is a string, a command-line Action is returned. Note > that the command-line string may be preceded by an *@* (at-sign) to > suppress printing of the specified command line, or by a * -* (hyphen) to > ignore the exit status from the specified command: > > Action('$CC -c -o $TARGET $SOURCES') > > > > # Doesn't print the line being executed. > > Action('@build $TARGET $SOURCES') > > > > # Ignores return value > > Action('-build $TARGET $SOURCES') > > > > > > Jason > > > > *From:* Scons-users <[email protected]> * On Behalf Of *Bill > Deegan > *Sent:* Tuesday, March 5, 2019 9:34 PM > *To:* SCons users mailing list <[email protected]> > *Subject:* Re: [Scons-users] make Command Builder not print command > > > > Maybe an override defining PRINT_CMD_LINE_FUNC? > > > > Like this: > > > > import sys > > def print_cmd_line(s, target, source, env): > sys.stdout.write("AHAH\n") > > env = Environment() > env.Command('file.out', 'file.in > <https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffile.in&data=02%7C01%7C%7Cc3c33284464b48eed0cd08d6a1e49ee0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636874400617998292&sdata=JGIglVfxBeJ7fkiUxMP9VKywVeqoCtZLOXUnk8F3uxM%3D&reserved=0>', > 'cat $SOURCE > $TARGET', PRINT_CMD_LINE_FUNC=print_cmd_line ) > > > > > > > > On Tue, Mar 5, 2019 at 7:30 PM Daniel Moody <[email protected]> wrote: > > How can I make a Command() that doesn't print the command, or print my own > string instead? I don't want to use silent or -Q because I only want this > command to be printed. > > > > For example > > > env = Environment() > env.Command('file.out', 'file.in > <https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffile.in&data=02%7C01%7C%7Cc3c33284464b48eed0cd08d6a1e49ee0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636874400618018308&sdata=U2r79jv%2BA1LStmzwMnDKmzRR%2B%2FEjfEQHJ3bVI0J2QPA%3D&reserved=0>', > 'cat $SOURCE > $TARGET') > > > > results in: > > > > scons: Reading SConscript files ... > > scons: done reading SConscript files. > > scons: Building targets ... > > cat file.in > <https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffile.in&data=02%7C01%7C%7Cc3c33284464b48eed0cd08d6a1e49ee0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636874400618028319&sdata=ZeqaIZjSmP5DdglcLnlHpri84DAZX9nJvZRghDxJ8UY%3D&reserved=0> > > file.out > > scons: done building targets. > > > > I just want: > > > > scons: Reading SConscript files ... > > scons: done reading SConscript files. > > scons: Building targets ... > > scons: done building targets. > > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > <https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc3c33284464b48eed0cd08d6a1e49ee0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636874400618038330&sdata=8l46UWAFTAgv0g0HZZoOoQF64dohVqqoByH6fp2Lrxk%3D&reserved=0> > > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users