mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 3/6] make: check for greadlink first, fall back to readlink
Date: Tue, 5 Jun 2012 10:56:18 +0200	[thread overview]
Message-ID: <20120605085618.GA12403@pengutronix.de> (raw)
In-Reply-To: <1338842419-27037-4-git-send-email-dirker@gmail.com>

On Mon, Jun 04, 2012 at 10:40:16PM +0200, Dirk Hörner wrote:
> OS X' readlink does not have an -f option.
> 
> Signed-off-by: Dirk Hörner <dirker@gmail.com>
> ---
>  common/Makefile |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/common/Makefile b/common/Makefile
> index 9c14d7b..48cf715 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -48,7 +48,9 @@ ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
>  DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
>  endif
>  
> -ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f '{}' \;; done)
> +READLINK := $(shell command -v greadlink || echo readlink)
> +
> +ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec $(READLINK) -f '{}' \;; done)

This is already broken. '-type f' only matches regular files. And ENV_FILES
is only used for make dependencies. And make follows links. I think what we
really need here is 'find $${i} ! -type d -print'

Michael

>  
>  endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
>  
> -- 
> 1.7.10.3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-06-05  8:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 20:40 [PATCH 0/6] Support cross-compiling on Mac OS X Dirk Hörner
2012-06-04 20:40 ` [PATCH 1/6] kbuild: Use Elfnn_Half as replacement for Elfnn_Section Dirk Hörner
2012-06-04 20:40 ` [PATCH 2/6] make: use wc -c instead of stat -c%s to get file sizes Dirk Hörner
2012-06-05  2:49   ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-05 19:43     ` Sascha Hauer
2012-06-05 21:15     ` Dirk Hörner
2012-06-04 20:40 ` [PATCH 3/6] make: check for greadlink first, fall back to readlink Dirk Hörner
2012-06-05  8:56   ` Michael Olbrich [this message]
2012-06-04 20:40 ` [PATCH 4/6] hostcc tools: include "compiler.h", fix included headers Dirk Hörner
2012-06-04 20:40 ` [PATCH 5/6] scripts/compiler.h: fixup endianess defines on OS X Dirk Hörner
2012-06-04 20:40 ` [PATCH 6/6] scripts/genenv: always pass template to mktemp Dirk Hörner
2012-06-05 19:42 ` [PATCH 0/6] Support cross-compiling on Mac OS X Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120605085618.GA12403@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox