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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:52:30+00:00 2026-06-14T14:52:30+00:00

I have a problem where I want to create a variable that looks like

  • 0

I have a problem where I want to create a variable that looks like this,

INCDIRS = -I dir0 -I dir1 -Idir2 -I dir3 ... -I dirN

where dir1, … , dirN are the names of all the subdirectories some base directory, base_dir.

How would I go about building up this variable? Originally, I thought I could do the following,

INCDIRS = $(shell for x in `find base_dir -type -d -print`; do echo -I $x; done;)

but this just results in

INCDIRS = -I -I -I -I ... -I

If anyone could explain how to do this, or explain why my original command got the output that it did, I would greatly appreciate it. Thanks!

  • 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-14T14:52:31+00:00Added an answer on June 14, 2026 at 2:52 pm

    You have two errors in your INCDIRS assignment. One is in the find command. It should be find -type d -print (or just find -type d; the -print is superfluous here). The other error the use of $x. You need to escape the $ with another $:

    INCDIRS = $(shell for x in `find base_dir -type d -print`; do echo -I $$x; done;)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem I have a tab delimited input file that looks like so: Variable
So I have a a text file that looks something like this: public >ret
I have a problem with moving animation. I want to create animation which start
I have a problem with switching images in android. I want to create animation
I have the following problem: Within a stylesheet document I want to create an
I have created this Fiddle with this code: This is my problem I want
I have this problem: I want to generate a new source code file from
hi i want to create user search fully driven with sphinx. problem is that
I have three problems: I want to create resizable shapes with box bounding... I
I have problem with dynamically created image (JavaScript). I want to change the innerHTML

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.