version:
      $ make -v
      GNU Make version 3.77, by Richard Stallman and Roland McGrath.
      
os:
      Red Hat 6.1, i686. (Make was built/configured by Redhat, not me)

the info file states:  (Node: Flavors, and numerous others)
at the end of the page, it says:
--------------------------------------------------

     FOO ?= bar

is exactly equivalent to this (*note The `origin' Function: Origin
Function.):

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

--------------------------------------------------

This is *WRONG* or there's a bug, or I am not reading this 
correctly. This example make file shows the problem.

         BAR   =/foo/bar
         BAR2  =/foo/bar2

         # This does not work.
         FOO ?= ${BAR}

         # This does.
         ifeq ($(origin FOO2), undefined)
         FOO2 = ${BAR2}
         endif

         doit:
                @echo "FOO  is: ${FOO}"
                @echo "FOO2 is: ${FOO2}"

--------------------------------------------------
I get this:

      FOO  is: 
      FOO2 is: /foo/bar2

I expected to get this:

      FOO  is: /foo/bar
      FOO2 is: /foo/bar/2

I have tried various := type assignments, and they don't
work either.

Thanks,

-Duane.

Reply via email to