what is $(ps .. ) in zaptel makefile?

Kilian Krause kk@verfaction.de
Thu, 24 Feb 2005 15:27:41 +0100


--=-jEJckwFrAE2TIAZ7u14S
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Tzafrir,

Am Donnerstag, den 24.02.2005, 16:22 +0200 schrieb Tzafrir Cohen:
> On Thu, Feb 24, 2005 at 02:14:56PM +0100, Kilian Krause wrote:
> > Hi Tzafrir,
> >=20
> > Am Donnerstag, den 24.02.2005, 14:32 +0200 schrieb Tzafrir Cohen:
> > > Hi
> > >=20
> > > One of the current differences between my package and the deb is:
> > >=20
> > > diff -ur ./Makefile ../Debs/zaptel-1.0.4/Makefile
> > > --- ./Makefile  2005-02-19 14:37:35.000000000 +0200
> > > +++ ../Debs/zaptel-1.0.4/Makefile       2005-02-24 13:40:40.000000000=
 +0200
> > > @@ -38,11 +38,11 @@
> > >  ifeq (${BUILDVER},linux24)
> > >  #We only support DEVFS in linux 2.4 kernels, since its considered ob=
solete post 2.4
> > > -DYNFS=3D$(shell ps ax | grep -v grep | grep -q devfsd && echo "yes")
> > > +DYNFS=3D$(ps ax | grep -v grep | grep -q devfsd && echo "yes")
> > >  endif
> > >  ifeq (${BUILDVER},linux26)
> > >  #Tests for newer linux-2.6 udev support
> > > -DYNFS=3D$(shell ps ax | grep -v grep | grep udevd && echo "yes")
> > > +DYNFS=3D$(ps ax | grep -v grep | grep udevd && echo "yes")
> > >  endif
>=20
> I'll just state that $(ps ...) does not seem to work here:
>=20
> tzafrir@boole:~$ make -f <(echo -e 'var=3D$(shell ps 1)\nall:\n\t@echo va=
r=3D$(var)')
> var=3D PID TTY STAT TIME COMMAND 1 ? S 0:00 init [2]
> tzafrir@boole:~$ make -f <(echo -e 'var=3D$(ps 1)\nall:\n\t@echo var=3D$(=
var)')
> var=3D

well, i *think* that this shell thingie is evaluated when parsing the
variable and then stored as result, not as function to be executed each
time. Moreover i read your diff the other way round; yes, it's proabably
better to add shell. Nevertheless i disagree with your demo above as i
don't think it does represent correctly how make does evaluate the
Makefile in question.

I'll add this to SVN and update my debs. Thanks for the pointer.

--=20
Best regards,
 Kilian

--=-jEJckwFrAE2TIAZ7u14S
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCHeRdvdkzt4X+wX8RAtfUAJ9Z+zEFfxp1bN747JDmXj5tCxNR6gCfSr4K
c3xR5Vjdc0iBC5vfrNaLrGU=
=DsxZ
-----END PGP SIGNATURE-----

--=-jEJckwFrAE2TIAZ7u14S--