[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] build: fix building flask headers before descending in flask/ss/


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 20 Jan 2023 15:16:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SAkNAJNbpqHnz7hWUsIgJtVYVxBDwYG/EWbdIQSgTGs=; b=i+gsLtb44OV6Pt+msawPBX10auBbUw3p/Sf64JWeMTpcUK4XoNhdfV0kCY8Sy+E2/+JoTL7jCXGHoYYmInLbG6yuU5aB6odNgkntm6PIB+nqNwnGGFR8og+NUFN6reVTzrte8uY2Fwt2I7cjqaAslAKkxDA8pOOACvzmXm2+hjObBODXuL7Zkkd1F1HsP+OedwLVev3Xd8U6ABCl5rxto+35S4F6ElOE5wect1PB9lU6IDZ5t+K1bDk1St4LaOxBbGpF4xKPYU3lqbCSEIgZvECMKn3BP8QKWSm8lTgKSCIX1gPVRqI0goVy8afpRuzTYLrbo2+xawzDE4w+yHcgGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A72YYcSZI9WIVOG9uVXtvsB6lmPuFOH/2yP/LXzM9xMyPU5NStNudA7ErKvp3l1GQEJlEVRBzQ5TJjhBi+/ko+5jA8wZXxBNvDfwd79b24YvebIaJavrNOu3MAEyqf6ShlZzGv5v6vy5aCH1sux/4yjZk9nD9PhTNiK4AaG6YIjUMSPTTRrXMFpRSsAxCEBOTyoWncFsvIqK5Ao3BxSalgPRzbNt4eWmUBXpYyRziHACdKCXD8YVtiqKVYgO6dzraURR7Ywy1sCg6jSM9pWpPZvI+5E7dNZ1cgXqB4i52Kc3UTdwCbqIF8xTz4QYBWEaqc4LQWpXEFVemnNfkMsOZg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 20 Jan 2023 14:17:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.01.2023 14:36, Anthony PERARD wrote:
> Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't
> work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk.
> So, make is allow to try to build objects in "xsm/flask/ss/" before
> generating the headers.
> 
> Adding a prerequisite on "$(obj)/ss" instead will fix the issue has
> that the target used to run make in this subdirectory.

DYM "... the issue, as that's ..."?

> Unfortunatly, that target is also used when running `make clean`, so
> we need to ignore it in this case. $(MAKECMDGOALS) can't be used in

s/need/want/, I guess, as nothing would break, we'd just create files
only to delete them again right away?

> this case as it is empty, but we can guess which operation is done by
> looking at the list of loaded makefiles.
> 
> Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use 
> obj=$subdir")
> Reported-by: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

> --- a/xen/xsm/flask/Makefile
> +++ b/xen/xsm/flask/Makefile
> @@ -16,7 +16,11 @@ FLASK_H_FILES := flask.h class_to_string.h 
> initial_sid_to_string.h
>  AV_H_FILES := av_perm_to_string.h av_permissions.h
>  ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES))
>  
> -$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix 
> $(obj)/,$(ALL_H_FILES))
> +# Adding prerequisite to descending into ss/ folder only when not running 
> `make
> +# clean`.

That's then for all "clean" targets, isn't it? I.e. maybe better to refer to
`make *clean` (or `make %clean`, but I think the % could be misleading there)?

I'm happy to make adjustments while committing, as long (or as far) as you
agree with me doing so.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.