make nitpicking2: $UNAME_M

Tzafrir Cohen tzafrir.cohen@xorcom.com
Mon, 28 Feb 2005 22:45:12 +0200


Hi

I'm currently applying the svn patches to zaptel 1.0.6 .
I noticed that the patch replaces:

  CFLAGS+=$(shell if uname -m | grep ...

with something like:

  CFLAGS+=$(shell if echo $UNAME_M | grep ...

As you probably notice, $UNAME_M above is expanded by make, and thus it
$U is expanded separately (probably an empty value) and NAME_M is left
as the string UNAME_M. You probably wanted $(UNAME_M) there.

UNAME_M is defined a bit above:

ifeq ($(DEB_HOST_GNU_TYPE),)
  UNAME_M=`uname -m`
else
  UNAME_M=$(DEB_HOST_GNU_TYPE)
endif

Which is exactly a place to use : assignment and avoid the need for the
subshell that produces UNAME_M to be called twice whenever CFALGS is
being expanded.

I also removed the first modification in this part (removing of the cvs
version line).

anyway, libpri patched with no problem (hardly a surprise: it
practically didn't change) and zaptel patched with only minor changes.
Already at http://tzafrir.org.il/rapid/APT.html .

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen@xorcom.com  http://www.xorcom.com