xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: remove more absolute paths from dependency tracking files
@ 2021-02-19 16:05 Jan Beulich
  2021-02-19 16:42 ` [for-4.15 PATCH] " Ian Jackson
  2021-02-19 16:55 ` [PATCH] " Ian Jackson
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2021-02-19 16:05 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Julien Grall,
	Stefano Stabellini, Wei Liu

d6b12add90da ("DEPS handling: Remove absolute paths from references to
cwd") took care of massaging the dependencies of the output file, but
for our passing of -MP to the compiler to take effect the same needs to
be done on the "phony" rules that the compiler emits.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/Config.mk
+++ b/Config.mk
@@ -63,7 +63,7 @@ DEPS_INCLUDE = $(addsuffix .d2, $(basena
 DEPS_RM = $(DEPS) $(DEPS_INCLUDE)
 
 %.d2: %.d
-	sed "s! $$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
+	sed "s!\(^\| \)$$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
 
 include $(XEN_ROOT)/config/$(XEN_OS).mk
 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk


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

* Re: [for-4.15 PATCH] build: remove more absolute paths from dependency tracking files
  2021-02-19 16:05 [PATCH] build: remove more absolute paths from dependency tracking files Jan Beulich
@ 2021-02-19 16:42 ` Ian Jackson
  2021-02-19 16:55 ` [PATCH] " Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2021-02-19 16:42 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Julien Grall,
	Stefano Stabellini, Wei Liu

Jan Beulich writes ("[PATCH] build: remove more absolute paths from dependency tracking files"):
> d6b12add90da ("DEPS handling: Remove absolute paths from references to
> cwd") took care of massaging the dependencies of the output file, but
> for our passing of -MP to the compiler to take effect the same needs to
> be done on the "phony" rules that the compiler emits.

Thanks.

I think this is a bugfix.  As discussed in d6b12add90da these absolute
paths can cause build races.  So:

Release-Acked-by: Ian Jackson <iwj@xenproject.org>

> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/Config.mk
> +++ b/Config.mk
> @@ -63,7 +63,7 @@ DEPS_INCLUDE = $(addsuffix .d2, $(basena
>  DEPS_RM = $(DEPS) $(DEPS_INCLUDE)
>  
>  %.d2: %.d
> -	sed "s! $$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
> +	sed "s!\(^\| \)$$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
>  
>  include $(XEN_ROOT)/config/$(XEN_OS).mk
>  include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk


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

* Re: [PATCH] build: remove more absolute paths from dependency tracking files
  2021-02-19 16:05 [PATCH] build: remove more absolute paths from dependency tracking files Jan Beulich
  2021-02-19 16:42 ` [for-4.15 PATCH] " Ian Jackson
@ 2021-02-19 16:55 ` Ian Jackson
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2021-02-19 16:55 UTC (permalink / raw)
  To: Jan Beulich
  Cc: xen-devel, Andrew Cooper, George Dunlap, Julien Grall,
	Stefano Stabellini, Wei Liu

Jan Beulich writes ("[PATCH] build: remove more absolute paths from dependency tracking files"):
> d6b12add90da ("DEPS handling: Remove absolute paths from references to
> cwd") took care of massaging the dependencies of the output file, but
> for our passing of -MP to the compiler to take effect the same needs to
> be done on the "phony" rules that the compiler emits.

Reviewed-by: Ian Jackson <iwj@xenproject.org>

> --- a/Config.mk
> +++ b/Config.mk
> @@ -63,7 +63,7 @@ DEPS_INCLUDE = $(addsuffix .d2, $(basena
>  DEPS_RM = $(DEPS) $(DEPS_INCLUDE)
>  
>  %.d2: %.d
> -	sed "s! $$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@
> +	sed "s!\(^\| \)$$PWD/! !" $^ >$@.tmp && mv -f $@.tmp $@

Urgh I hate having to remember the crazy \ rules for all these
different kinds of regexps.  I have to test it every time...

Thanks for fixing this, anyway.

Ian.


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

end of thread, other threads:[~2021-02-19 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 16:05 [PATCH] build: remove more absolute paths from dependency tracking files Jan Beulich
2021-02-19 16:42 ` [for-4.15 PATCH] " Ian Jackson
2021-02-19 16:55 ` [PATCH] " Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).