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 304145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:15:12+00:00 2026-05-12T07:15:12+00:00

I currently have 10 tests in my autotoolset project. Any time I make a

  • 0

I currently have 10 tests in my autotoolset project. Any time I make a change to one of my src/ files and recompile, each test is rebuilt and linked. This is starting to have a considerable impact on my development time.

What is the best way to conditionally build binary programs, tests or otherwise, with GNU autotoolset? For instance, if I’m working in test/check_curl_requestheaders.cc, and I make a change, I am only going to want to recompile the library and then that one test and none of the other binaries.

I saw some mention of using automake conditionals (like WANTS_XXX) but I am not 100% certain that is what I’m looking for nor am I sure how that would be configured by autoconf.

I am sort of hoping for something that will end up looking like this:

./configure
make test/check_curl_requestheaders

or

./configure --only-build=test/check_curl_requestheaders
make

Pointers?

EDIT I’m not doing a configure before every make. If I make changes to check_curl_requestheaders, only check_curl_requestheaders is rebuilt as one would expect. The problem is that if I’m working on the RequestHeaders part of the library, and make a change to say, src/curl/requestheaders.cc, all of the the tests and other binaries are rebuilt, not just the check_curl_requestheaders. That is taking far too long, and that is what I am trying to avoid. If I have a dozen binaries, is there a way to rebuild only one of them?

  • 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-12T07:15:12+00:00Added an answer on May 12, 2026 at 7:15 am

    I’m not sure this is the best way to do this, but it turns out that the programs in my test folder did have their own unique make targets. However, there were some issues.

    1. If I issue make at the top level, all of src/ and test/ are built
    2. If I issue make at test/ level, changes to src/ won’t be picked up

    To solve this, I wrote a shell script that does the following:

    1. Enter src, and build it. (if changes to src/ have happened, src/ is rebuilt)
    2. Enter test, and build a specific binary. (this will rebuild the specific binary if it has changed and will relink of the code in src/ has been updated by the previous step)

    The code is listed below:

    #!/bin/sh
    
    TYPE="$1"
    WHICH="$2"
    OUT="`readlink -f ./buildandrun.out`"
    
    rm -rf $OUT
    
    if test ! -n "$WHICH"
    then
        echo "Please specify which type to build"
        exit 1
    fi
    
    if test ! -n "$WHICH"
    then
        echo "Please specify which $TYPE to build"
        exit 2
    fi
    
    RV=0
    
    echo "" >> $OUT
    echo "Building src" >> $OUT
    echo "" >> $OUT
    
    cd src
    make >> $OUT || RV=3
    cd ..
    
    if test $RV != 0; then exit $RV; fi
    
    echo "" >> $OUT
    echo "Building $TYPE/$WHICH" >> $OUT
    echo "" >> $OUT
    
    cd $TYPE
    make "$WHICH" >>  $OUT || RV=4
    cd ..
    
    if test $RV != 0; then exit $RV; fi
    
    echo "" >> $OUT
    echo "Running $TYPE/$WHICH" >> $OUT
    echo "" >> $OUT
    
    $TYPE/$WHICH || RV=5
    
    exit $RV
    

    This lets me do the following:

    ./buildandrun.sh test check_curl_requestheaders
    

    Hopefully there will eventually be someone who can show me a more elegant solution to this problem, preferably using autoconf and automake. I have a feeling that this is probably something that these tools do out of the box and I just haven’t discovered it yet.

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

Sidebar

Ask A Question

Stats

  • Questions 253k
  • Answers 254k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you asking for [ someDict[k] for k in someList… May 13, 2026 at 10:02 am
  • Editorial Team
    Editorial Team added an answer You could extend a HashSet the following way: public class… May 13, 2026 at 10:02 am
  • Editorial Team
    Editorial Team added an answer Allright guys, I found it: $("div#container").scroll(function() { var screenheight =… May 13, 2026 at 10:02 am

Related Questions

A portion of our research group's program has auxiliary functionality provided by ctemplate library.
I currently have code in my ApplicationController to check if a user is logged
In relation to my previous question , I need to check whether a component
Just a quick question... I currently have the following jQuery code with a selector

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.