From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Xoxfw-0000CX-75 for ptxdist@pengutronix.de; Thu, 13 Nov 2014 17:55:16 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1Xoxfw-0000L0-5o for ptxdist@pengutronix.de; Thu, 13 Nov 2014 17:55:16 +0100 Date: Thu, 13 Nov 2014 17:55:16 +0100 From: Michael Olbrich Message-ID: <20141113165516.GX30196@pengutronix.de> References: <1413322130-9678-1-git-send-email-jon@ringle.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1413322130-9678-1-git-send-email-jon@ringle.org> 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Oct 14, 2014 at 05:28:50PM -0400, jon@ringle.org 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 I've committed a different, imho nicer fix. Please test if it works for you. Michael > --- > 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 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de