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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:23:10+00:00 2026-05-12T15:23:10+00:00

(disclaimer: I am used to scons … I am somewhat unexperienced with make) Context:

  • 0

(disclaimer: I am used to scons … I am somewhat unexperienced with make)

Context: I am using Eclipse CDT which generates makefiles.

Let’s say I have a project directory ‘lib’ and 2 build configurations ‘Debug’ and ‘Release’. Eclipse CDT gracefully generates a makefile for each build configuration. The said makefiles end-up residing in ‘Debug’ and ‘Release’ folders.

Now, what I want to do is have a makefile in the folder ‘lib’ which calls the makefiles ‘Debug/makefile’ and ‘Release/makefile’.

How do I do that?

I want to be able to launch ‘make’ in the folder ‘lib’ and both configurations would be called with the specified target(s).

Solution
Based on all the great input gathered here, I devised the following:

MAKE=make
BUILDS=Release Debug
TARGETS=all clean

$(TARGETS):
    @for b in $(BUILDS) ; do $(MAKE) -C $$b $@ ; done

$(BUILDS):
    @for t in $(TARGETS) ; do $(MAKE) -C $@ $$t ; done

%:
    @for b in $(BUILDS) ; do $(MAKE) -C $$b $@ ; done
  • 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-12T15:23:10+00:00Added an answer on May 12, 2026 at 3:23 pm

    depends on what is “calls”. You want to either

    include $(BUILD)/Makefile

    or

    $(MAKE) -C $(BUILD) $@

    or some such. I’d guess you want the latter. Maybe something like

    release debug:
        $(MAKE) -C $@
    

    You get the idea.

    More examples:

    BUILDS=release debug
    TARGETS=all clean
    
    $(TARGETS):
        for b in $(BUILDS) ; do $(MAKE) -C $$b $@ ; done
    
    $(BUILDS):
        for t in $(TARGETS) ; do $(MAKE) -C $@ $$t ; done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer: I have not used RoR, and I have not generated tests. But, I
Disclaimer: I have no Twitter API experience nor have I used Twitter until today
Disclaimer: I know there are better ways to track email open rates, which are
Disclaimer: I am using ExtJS 3, but I don't think it's very relevant to
Disclaimer: Never used php in my life. New to Unix and Jenkins I have
Disclaimer: This question is not about fixing visual studio So, I've used VSS for
Disclaimer: I'm fairly new to AJAX! I've looked around, and I'm not sure which
Background Disclaimer: I have very little experience with Java. We previously used a wrapped
Disclaimer: first time I've used DBI. I have a MySQL table with a lot
Disclaimer : I know that Thread.Abort is evil. I'm using it as a last

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.