Somewhat OT - A Makefile Question

Tim Daneliuk tundra at
Wed Jun 6 12:10:47 UTC 2012

Not strictly FBSD, but ...

Within a makefile, I need to assign the name of a program as in:

FOO = "bar".

The problem is that 'bar' may also be know as, say, "".  Worse still
both "bar" and "" can exist with one linked to the other.  Is there
a simple way to determine which form "bar" or "" on on a given
system *at the time the make is run*?  If both exist, I will pick
one arbitrarily, I just don't want the detection mechanism to fail when
this is the case.  For example I don't think this works when both
are there:

FOO = $(shell `which bar

Tim Daneliuk     tundra at
PGP Key:

More information about the freebsd-questions mailing list