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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:41:21+00:00 2026-05-23T17:41:21+00:00

Given this very simple Makefile : all: @mkdir -pv test/{a,b} I get this output

  • 0

Given this very simple Makefile:

all:
    @mkdir -pv test/{a,b}

I get this output on OS X 10.6.8 and CentOS 5.5:

mkdir: created directory `test'
mkdir: created directory `test/a'
mkdir: created directory `test/b'

But on Ubuntu 11.04 I get this:

mkdir: created directory `test'
mkdir: created directory `test/{a,b}'

Running the command mkdir -pv test/{a,b} manually in the shell on all platforms gives the expected result.

The version of GNU Make is the same on all platforms:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program is built for [PLATFORM]

What’s different under Ubuntu and why doesn’t the shell expansion work there?

  • 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-23T17:41:22+00:00Added an answer on May 23, 2026 at 5:41 pm

    The problem is probably that Make spawns /bin/sh. It is usually a symlink to your system’s default shell.

    Option 1

    You could make sure it points to bash (as this is a bashism). Probably, it is now /bin/dash or /bin/sh, depending on your version of Ubuntu.

    Option 2

    Easier option:

    SHELL=/bin/bash
    
    all:
        @echo a{3,4}
        @bash -c 'echo a{3,4}'
    

    This prints the same output twice unless you comment-out the SHELL= line

    Option 3

    If you can’t/don’t want to modify the make file, you can invoke it like so:

    make SHELL=/bin/bash
    

    beware of interactions with sub-makefiles or includes. You might want to look at the make -e option and the make export keyword: http://www.gnu.org/s/hello/manual/make/Variables_002fRecursion.html

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

Sidebar

Related Questions

I know this should be very simple especially given all the information and example
this is probably a very stupid question; in a bash script, given the output
This code works great for generating thumbnails, but when given a very large (100MB+)
I'm sure someone will have a very simple answer to this but I can't
I thought this was going to be very simple but I am really out
I am writing a very simple Bash script that tars a given directory, encrypts
I need to write a very simple WinForms application, but I often get stuck
This is probably very simple, but I simply cannot find the answer myself :(
I might be asking very simple question, but i am not able to get
This is a very simple test about persisting a transient Person Object in the

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.