Find the answer to your Linux question:
Results 1 to 3 of 3
Or my login shell or /bin/bash? Background: I have a variable in the Makefile: C_FILES := $(patsubst %.c,%.o,$(shell ls *.c 2> /dev/null)) I want to make sure it's OK to ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    2

    Does GNU make $(shell ...) call /bin/sh ...

    Or my login shell or /bin/bash?

    Background:
    I have a variable in the Makefile:
    C_FILES := $(patsubst %.c,%.o,$(shell ls *.c 2> /dev/null))
    I want to make sure it's OK to use "2>/dev/null" here. My login shell is /bin/bash so it's hard for me to tell if this is OK for all users, even those whose login shell is csh/tcsh, which don't have the "2>" syntax.

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    Welcome to the forum.
    The program used as the shell is taken from the variable `SHELL'.
    By default, the program `/bin/sh' is used.

    -- excerpt from info make, GNU Make 3.80, q.v.
    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    2
    Thanks a bunch!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...