mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support
@ 2014-10-14 21:28 jon
  2014-10-21 12:43 ` Jon Ringle
  2014-11-13 16:55 ` Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: jon @ 2014-10-14 21:28 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

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>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support
  2014-10-14 21:28 [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support jon
@ 2014-10-21 12:43 ` Jon Ringle
  2014-10-30 14:37   ` Jon Ringle
  2014-11-13 16:55 ` Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Jon Ringle @ 2014-10-21 12:43 UTC (permalink / raw)
  To: ptxdist

ping...

On Tue, Oct 14, 2014 at 5:28 PM,  <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>
> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support
  2014-10-21 12:43 ` Jon Ringle
@ 2014-10-30 14:37   ` Jon Ringle
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Ringle @ 2014-10-30 14:37 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2635 bytes --]

ping again... is this solution to hackish?

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

> ping...
>
> On Tue, Oct 14, 2014 at 5:28 PM,  <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>
> > ---
> >  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
> >
>

[-- Attachment #1.2: Type: text/html, Size: 4060 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support
  2014-10-14 21:28 [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support jon
  2014-10-21 12:43 ` Jon Ringle
@ 2014-11-13 16:55 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2014-11-13 16:55 UTC (permalink / raw)
  To: ptxdist

On Tue, Oct 14, 2014 at 05:28:50PM -0400, 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>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-13 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-14 21:28 [ptxdist] [PATCH] configure/Makefile: Check for touch --no-dereference support jon
2014-10-21 12:43 ` Jon Ringle
2014-10-30 14:37   ` Jon Ringle
2014-11-13 16:55 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox