Results 1 to 3 of 3

Thread: a question about makefile

  1. #1
    Join Date
    May 2008
    Beans
    61

    a question about makefile

    today I met a makefile having a line like:
    TMP ?= /tmp

    What does the "?" mean here.

    Thanks indeed

  2. #2
    Join Date
    Apr 2008
    Location
    Carlisle, MA
    Beans
    71
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: a question about makefile

    From:
    http://www.gnu.org/software/make/man...s.html#Flavors



    There is another assignment operator for variables, `?='. This is called a conditional variable assignment operator, because it only has an effect if the variable is not yet defined. This statement:

    FOO ?= bar

    is exactly equivalent to this (see The origin Function):

    ifeq ($(origin FOO), undefined)
    FOO = bar
    endif

  3. #3
    Join Date
    May 2008
    Beans
    61

    Re: a question about makefile

    thank you for providing the link, which is good.

Bookmarks

Posting Permissions

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