Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8494405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:17:25+00:00 2026-06-10T23:17:25+00:00

I need to attach to the SCons build in order to be notified when

  • 0

I need to attach to the SCons build in order to be notified when things happened during it: file compilation, files linkage, etc.

I know similar is possible for ANT builds via -listener option. Could you please tell how to do it for SCons builds?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:17:26+00:00Added an answer on June 10, 2026 at 11:17 pm

    When targets are built in SCons, you can associate a post action via the AddPostAction(target, action) function as documented here.

    Here is a simple example with a python function action:

    # Create yourAction here:
    #   can be a python function or external (shell) command line
    
    def helloWorldAction(target = None, source = None, env = None):
        '''
          target: a Node object representing the target file
          source: a Node object representing the source file
          env: the construction environment used for building the target file
          The target and source arguments may be lists of Node objects if there 
          is more than one target file or source file.
        '''
    
        print "PostAction for target: %s" % str(target)
    
        # you can get a map of the source files like this:
        # source_file_names = map(lambda x: str(x), source)
        # compilation options, etc can be retrieved from the env
    
        return 0
    
    env = Environment()
    progTarget = env.Program(target = "helloWorld", source = "helloWorld.cc")
    env.AddPostAction(progTarget, helloWorldAction)
    # Or create the action object like this:
    # a = Action(helloWorldAction)
    

    Then, each time helloWorld is built, the helloWorldAction python function will be executed afterwords.

    Regarding doing this without modifying the given SConstruct, I dont see how that would be possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our enterprise application we need to attach files to a document. We have
I need to attach an XLS-file to e-mail via PHP. The Problem is -
I need to attach a debugger to a remote instance of WAS and know
I need to attach a file to the email Magento sends when a client
I need to know if any kind of file can be signed digitally, using
I need to attach custom metadata to my source files that at tracked via
I am dealing with this problem. I need to attach files from my desktop
I need to attach a file with mailx but at the moment I am
My issue is that I need to attach files with C# to the default
I am creating mail page for sending mails. I need to attach some file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.