From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Xjqr9-0001PJ-2c for ptxdist@pengutronix.de; Thu, 30 Oct 2014 15:37:43 +0100 Received: by mail-lb0-f169.google.com with SMTP id l4so4394620lbv.14 for ; Thu, 30 Oct 2014 07:37:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1413322130-9678-1-git-send-email-jon@ringle.org> Date: Thu, 30 Oct 2014 10:37:36 -0400 Message-ID: From: Jon Ringle Subject: Re: [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0319053138==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: "ptxdist@pengutronix.de" --===============0319053138== Content-Type: multipart/alternative; boundary=001a11c234e85702360506a4d2cd --001a11c234e85702360506a4d2cd Content-Type: text/plain; charset=UTF-8 ping again... is this solution to hackish? On Tue, Oct 21, 2014 at 8:43 AM, Jon Ringle wrote: > ping... > > On Tue, Oct 14, 2014 at 5:28 PM, wrote: > > From: Jon Ringle > > > > Install a wrapper touch that will strip --no-dereference from the args > > if the host installed touch does not support it > > > > Signed-off-by: Jon Ringle > > --- > > Makefile.in | 14 ++++++++++++++ > > configure.ac | 8 ++++++++ > > 2 files changed, 22 insertions(+) > > > > diff --git a/Makefile.in b/Makefile.in > > index 64dc808..5787699 100644 > > --- a/Makefile.in > > +++ b/Makefile.in > > @@ -39,6 +39,18 @@ kconfig: > > conf mconf $(NCONF) > > @echo "done." > > > > +define touch_wrapper > > +#!/bin/bash > > + > > +declare -a args > > +args=($${@}) > > + > > +[ -n "@TOUCH_NO_DEREFERENCE@" ] || args=($${@//--no-dereference/}) > > + > > +@GNU_touch@ $${args[*]} > > +endef > > +export touch_wrapper > > + > > environment: > > @echo -n "preparing PTXdist environment ..." > > @ln -sf @AWK@ "$(abs_srcdir)/bin/awk" > > @@ -69,6 +81,8 @@ environment: > > @ln -sf @BASH@ "$(abs_srcdir)/bin/bash" > > @ln -sf @SYSCTL@ "$(abs_srcdir)/bin/sysctl" > > @ln -sf @MAKE@ "$(abs_srcdir)/bin/make" > > + @echo "$$touch_wrapper" > "$(abs_srcdir)/bin/touch" > > + @chmod +x "$(abs_srcdir)/bin/touch" > > @echo " done" > > > > clean: > > diff --git a/configure.ac b/configure.ac > > index 22c8df0..5fed6c9 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -158,6 +158,7 @@ GNU_TOOL(sort, coreutils) > > GNU_TOOL(cat, coreutils) > > GNU_TOOL(tty, coreutils) > > GNU_TOOL(readlink, coreutils) > > +GNU_TOOL(touch, coreutils) > > GNU_TOOL(tar, tar) > > GNU_TOOL(find, findutils) > > GNU_TOOL(xargs, findutils) > > @@ -278,6 +279,13 @@ if test -z "$MSGFMT"; then > > AC_MSG_ERROR([gettext could not be found, please install]) > > fi > > > > +dnl Check for touch --no-dereference support > > +AC_CACHE_CHECK([for touch that supports --no-dereference], > [ac_cv_path_TOUCH_NO_DEREFERENCE], > > + [AC_PATH_PROGS_FEATURE_CHECK([TOUCH_NO_DEREFERENCE], > [touch], > > + [[$ac_path_TOUCH_NO_DEREFERENCE --no-dereference > /dev/null 2> /dev/null && \ > > + > ac_cv_path_TOUCH_NO_DEREFERENCE=$ac_path_TOUCH_NO_DEREFERENCE > ac_path_TOUCH_NO_DEREFERENCE_found=:]])]) > > +AC_SUBST([TOUCH_NO_DEREFERENCE], [$ac_cv_path_TOUCH_NO_DEREFERENCE]) > > + > > dnl > > dnl Checks for Python, needed for ipkg-utils > > dnl > > -- > > 1.8.5.4 > > > --001a11c234e85702360506a4d2cd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
ping again... is this solution to hackish?

On Tue, Oct 21, 2014 at 8:4= 3 AM, Jon Ringle <jon@ringle.org> wrote:
ping...

On Tue, Oct 14, 2014 at 5:28 PM,=C2=A0 <jon@ringle.org> wrote:
> From: Jon Ringle <jringle@= gridpoint.com>
>
> Install a wrapper touch that will strip --no-dereference from the args=
> if the host installed touch does not support it
>
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>=C2=A0 Makefile.in=C2=A0 | 14 ++++++++++++++
>=C2=A0 configure.ac |=C2=A0 8 ++++++++
>=C2=A0 2 files changed, 22 insertions(+)
>
> diff --git a/Makefile.in b/Makefile.in
> index 64dc808..5787699 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -39,6 +39,18 @@ kconfig:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0conf mcon= f $(NCONF)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@echo "done."
>
> +define touch_wrapper
> +#!/bin/bash
> +
> +declare -a args
> +args=3D($${@})
> +
> +[ -n "@TOUCH_NO_DEREFERENCE@" ] || args=3D($${@//--no-deref= erence/})
> +
> +@GNU_touch@ $${args[*]}
> +endef
> +export touch_wrapper
> +
>=C2=A0 environment:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@echo -n "preparing PTXdist envi= ronment ..."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@ln -sf @AWK@ "$(abs_srcdir)/bin= /awk"
> @@ -69,6 +81,8 @@ environment:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@ln -sf @BASH@=C2=A0 "$(abs_srcd= ir)/bin/bash"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@ln -sf @SYSCTL@ "$(abs_srcdir)/= bin/sysctl"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@ln -sf @MAKE@ "$(abs_srcdir)/bi= n/make"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0@echo "$$touch_wrapper" > &qu= ot;$(abs_srcdir)/bin/touch"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0@chmod +x "$(abs_srcdir)/bin/touch&qu= ot;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@echo " done"
>
>=C2=A0 clean:
> diff --git a/
configu= re.ac b/configure.ac<= /a>
> index 22c8df0..5fed6c9 100644
> --- a/
configure.ac
> +++ b/
configure.ac
> @@ -158,6 +158,7 @@ GNU_TOOL(sort, coreutils)
>=C2=A0 GNU_TOOL(cat, coreutils)
>=C2=A0 GNU_TOOL(tty, coreutils)
>=C2=A0 GNU_TOOL(readlink, coreutils)
> +GNU_TOOL(touch, coreutils)
>=C2=A0 GNU_TOOL(tar, tar)
>=C2=A0 GNU_TOOL(find, findutils)
>=C2=A0 GNU_TOOL(xargs, findutils)
> @@ -278,6 +279,13 @@ if test -z "$MSGFMT"; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0AC_MSG_ERROR([gettext could not be fo= und, please install])
>=C2=A0 fi
>
> +dnl Check for touch --no-dereference support
> +AC_CACHE_CHECK([for touch that supports --no-dereference], [ac_cv_pat= h_TOUCH_NO_DEREFERENCE],
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [AC_PA= TH_PROGS_FEATURE_CHECK([TOUCH_NO_DEREFERENCE], [touch],
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= [[$ac_path_TOUCH_NO_DEREFERENCE --no-dereference /dev/null 2> /dev/null= && \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 ac_cv_path_TOUCH_NO_DEREFERENCE=3D$ac_path_TOUCH_NO_DEREFERE= NCE ac_path_TOUCH_NO_DEREFERENCE_found=3D:]])])
> +AC_SUBST([TOUCH_NO_DEREFERENCE], [$ac_cv_path_TOUCH_NO_DEREFERENCE])<= br> > +
>=C2=A0 dnl
>=C2=A0 dnl Checks for Python, needed for ipkg-utils
>=C2=A0 dnl
> --
> 1.8.5.4
>

--001a11c234e85702360506a4d2cd-- --===============0319053138== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0319053138==--