mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion
@ 2012-01-29 19:15 Bernhard Walle
  2012-01-30 14:06 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Walle @ 2012-01-29 19:15 UTC (permalink / raw)
  To: ptxdist

Since I switched to make 3.82 on my Mac (from MacPorts), "ptxdist
images" didn't produce any images. I compared the output of make
--debug=all with a working one (from make 3.81 that comes from Apple)
and one difference was the order in reading includes Makefiles.

With make 3.82, the wildcard command doesn't sort any more. See
https://bugzilla.redhat.com/show_bug.cgi?id=635607. This small fix
fixed the issue for me.

Don't ask my why this doesn't show up on Linux. Maybe the return values
of some library function that is make using internally is already
sorted. I have no clue.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/other/Toplevel.make |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index 35c2c27..0cb7e82 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL	:= \
 	$(PACKAGES-b)
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES)))))
+include $(sort $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))))))
 # install_alternative and install_copy has some configuration defined
 # dependencies. include the files specifying these dependencies.
 include $(wildcard $(STATEDIR)/*.deps)
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion
  2012-01-29 19:15 [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion Bernhard Walle
@ 2012-01-30 14:06 ` Michael Olbrich
  2012-01-30 18:46   ` Bernhard Walle
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2012-01-30 14:06 UTC (permalink / raw)
  To: ptxdist

On Sun, Jan 29, 2012 at 08:15:49PM +0100, Bernhard Walle wrote:
> Since I switched to make 3.82 on my Mac (from MacPorts), "ptxdist
> images" didn't produce any images. I compared the output of make
> --debug=all with a working one (from make 3.81 that comes from Apple)
> and one difference was the order in reading includes Makefiles.
> 
> With make 3.82, the wildcard command doesn't sort any more. See
> https://bugzilla.redhat.com/show_bug.cgi?id=635607. This small fix
> fixed the issue for me.
> 
> Don't ask my why this doesn't show up on Linux. Maybe the return values
> of some library function that is make using internally is already
> sorted. I have no clue.

This is not correct. It will sort all post files and does not honor the
order of PTXDIST_PATH_POSTRULES. This should probably be something like
this (untested):

$(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), include (sort $(wildcard $(dir)/*.make)))

and the same for PTXDIST_PATH_PRERULES.

Michael

> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>  rules/other/Toplevel.make |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
> index 35c2c27..0cb7e82 100644
> --- a/rules/other/Toplevel.make
> +++ b/rules/other/Toplevel.make
> @@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL	:= \
>  	$(PACKAGES-b)
>  
>  # might be non existent
> -include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES)))))
> +include $(sort $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))))))
>  # install_alternative and install_copy has some configuration defined
>  # dependencies. include the files specifying these dependencies.
>  include $(wildcard $(STATEDIR)/*.deps)
> -- 
> 1.7.7.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] 5+ messages in thread

* Re: [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion
  2012-01-30 14:06 ` Michael Olbrich
@ 2012-01-30 18:46   ` Bernhard Walle
  2012-02-01  8:45     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Walle @ 2012-01-30 18:46 UTC (permalink / raw)
  To: ptxdist

Hi Michael,

* Michael Olbrich <m.olbrich@pengutronix.de> [2012-01-30 15:06]:
> 
> This is not correct. It will sort all post files and does not honor the
> order of PTXDIST_PATH_POSTRULES. This should probably be something like
> this (untested):
> 
> $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), include (sort $(wildcard $(dir)/*.make)))

I'm not really a make guru like you. Your example doesn't work.
Following works:

include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))

Does that look correct in your eyes?


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion
  2012-01-30 18:46   ` Bernhard Walle
@ 2012-02-01  8:45     ` Michael Olbrich
  2012-02-02 20:23       ` Bernhard Walle
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2012-02-01  8:45 UTC (permalink / raw)
  To: ptxdist

On Mon, Jan 30, 2012 at 07:46:39PM +0100, Bernhard Walle wrote:
> * Michael Olbrich <m.olbrich@pengutronix.de> [2012-01-30 15:06]:
> > 
> > This is not correct. It will sort all post files and does not honor the
> > order of PTXDIST_PATH_POSTRULES. This should probably be something like
> > this (untested):
> > 
> > $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), include (sort $(wildcard $(dir)/*.make)))
> 
> I'm not really a make guru like you. Your example doesn't work.
> Following works:
> 
> include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))
> 
> Does that look correct in your eyes?

Yes, this is better. Don't forget PRERULES in the patch.

Michael

-- 
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] 5+ messages in thread

* [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion
  2012-02-01  8:45     ` Michael Olbrich
@ 2012-02-02 20:23       ` Bernhard Walle
  0 siblings, 0 replies; 5+ messages in thread
From: Bernhard Walle @ 2012-02-02 20:23 UTC (permalink / raw)
  To: ptxdist

Since I switched to make 3.82 on my Mac (from MacPorts), "ptxdist
images" didn't produce any images. I compared the output of make
--debug=all with a working one (from make 3.81 that comes from Apple)
and one difference was the order in reading includes Makefiles.

With make 3.82, the wildcard command doesn't sort any more. See
https://bugzilla.redhat.com/show_bug.cgi?id=635607. This small fix
fixed the issue for me.

Don't ask my why this doesn't show up on Linux. Maybe the return values
of some library function that is make using internally is already
sorted. I have no clue.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/other/Toplevel.make |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index 35c2c27..85ad515 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -39,7 +39,7 @@ include $(PTX_MAP_ALL_MAKE)
 include $(RULESDIR)/other/Namespace.make
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_PRERULES)))))
+include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_PRERULES))), $(sort $(wildcard $(dir)/*.make)))
 
 include $(PTX_DGEN_DEPS_PRE)
 include $(PTX_DGEN_RULESFILES_MAKE)
@@ -95,7 +95,7 @@ PTX_PACKAGES_INSTALL	:= \
 	$(PACKAGES-b)
 
 # might be non existent
-include $(wildcard $(addsuffix /*.make,$(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES)))))
+include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))
 # install_alternative and install_copy has some configuration defined
 # dependencies. include the files specifying these dependencies.
 include $(wildcard $(STATEDIR)/*.deps)
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2012-02-02 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 19:15 [ptxdist] [PATCH] make 3.82: Don't rely on sorted wildcard expansion Bernhard Walle
2012-01-30 14:06 ` Michael Olbrich
2012-01-30 18:46   ` Bernhard Walle
2012-02-01  8:45     ` Michael Olbrich
2012-02-02 20:23       ` Bernhard Walle

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