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

  • SEARCH
  • Home
  • 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 7441737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:03:54+00:00 2026-05-29T11:03:54+00:00

If I have an executable that generates an output from multiple files at a

  • 0

If I have an executable that generates an output from multiple files at a time –

generate_output -o a.out -f input1.txt input2.txt input3.txt

Is there a way to write such a custom builder for this?
What I have at the moment is –

builder = Builder(
        action='generate_output -o $TARGET -f $SOURCE',
        suffix='.out', src_suffix='.txt')

Then it only generates files in a sequence, which is not what I really wanted –

generate_output -o input1.out -f input1.txt
generate_output -o input2.out -f input2.txt
# etc...
  • 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-05-29T11:03:55+00:00Added an answer on May 29, 2026 at 11:03 am

    Try using $SOURCES, see Variable Substitution:

    builder = Builder(
            action='generate_output -o $TARGET -f $SOURCES',
            suffix='.out', src_suffix='.txt')
    

    It works for me in this simple example:

    env = Environment()
    
    builder = Builder(action='cat $SOURCES > $TARGET',
            suffix='.out', src_suffix='.txt')
    
    env = Environment(BUILDERS = {'MyBld' : builder})
    
    env.MyBld('all', ['a.txt', 'b.txt', 'c.txt'])
    

    This will work as long as generate_output doesn’t require -f to precede each input file.

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

Sidebar

Related Questions

I have a product setup executable that copies some files to the user's hard
I have one set of source files from which I need to generate multiple
I have a project that generates a shell script at CMake time (with file(WRITE
I have an executable that depending on the command line switch supplied looks something
I have an executable that is started by a windows service, this program will
I have an executable that defaults to 32-bit. It doesn't have source code and
I have a setup executable that I need to install. When I run it,
I have a server executable that talks to Active Directory to retrieve user information.
I want to have an executable file that will call some other programs. The
I have a command line executable that alters some bits in a file that

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.