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

Re: [PATCH] build: adjust include/xen/compile.h generation


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 13 Jan 2022 11:22:45 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 13 Jan 2022 11:23:06 +0000
  • Ironport-data: A9a23:20wJqaN1j1vPc8HvrR1ZkMFynXyQoLVcMsEvi/4bfWQNrUoq1WAGn WFLWzvVMvyPZmr1f9slaISwpxkD7Z6Dz4dhHgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6UUsxNbVU8En150Es4w7dRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYowyyovdp9 4RJiZePdy0XOvP9kt0wSSANRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YuBqmsQkKtitJI4Fs2ts5TrYEewnUdbIRKCiCdpwgmto3Z0fRq62i 8wxMmdeU0vPOEd0G3glNs0yhNumunPjfGgNwL6SjfVuuDWCpOBr65D2K8bccNGOQcRTn26bq 3jA8mC/BQsVXPSAzRKV/3TqgfXA9Qv5RYYTGbuQ5vNsxlqJyQQ7ChcbS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V00zEX/kB9WHVpmszxra 6TddAgpHvJYVcqKRQdcL+7VZVoLUmxyXcx2/h3AV7AZniFhILLFuFfBOLZqlWKcREWtNQttp uIG5IObuEYZmIasS+V2maFL+o=
  • Ironport-sdr: XLFbTPXtLHGPZQGZu7Xgsclu28YyXT9HxO5qPg+EuH8OV/+B/woIhVo+JtIm6jM4+ZtrIXFiS9 WuvIsX4OHyk3k6fGACFTy/WdCz87UIdHlp5igflknAcbAUOBmWatLcnvSXX59g15Y1ZeJu4a/Q Y4j3MKBv1bOdnJqxfGJDT9NVCt1iEYFm1rGvmRTab9IjuEP+3cCRxqSN3dqGiL9tAfEiqqdYmh 3pHnjzBBLTZc+JQO6pT0NCsifTaF/eix9TpmqKidlN8BRUcyW22mLUXjZXwlGpppUd6dHii7/6 hlhc18Isctx726ZbL4UEDzUx
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jan 11, 2022 at 03:16:17PM +0100, Jan Beulich wrote:
> Prior to 19427e439e01 ("build: generate "include/xen/compile.h" with
> if_changed") running "make install-xen" as root would not have printed
> the banner under normal circumstances. Its printing would instead have
> indicated that something was wrong (or during a normal build the lack
> of printing would do so).

So, having several line of logs with one generating "compile.h", and
several object rebuild plus the re-linking of xen isn't enough has to
indicate that something is wrong?

Also, with this patch, the banner would no longer be printed on rebuild,
unless one doesn't try to prevent regeneration of "compile.h" by
exporting two variables.

I kind of like having the banner been nearly always printed, but I'm not
opposed to the change.

> Further aforementioned change had another undesirable effect, which I
> didn't notice during review: Originally compile.h would have been
> re-generated (and final binaries re-linked) when its dependencies were
> updated after an earlier build. This is no longer the case now, which
> means that if some other file also was updated, then the re-build done
> during "make install-xen" would happen with a stale compile.h (as its
> updating is suppressed in this case).

So, the comment:
    Don't refresh this files during e.g., 'sudo make install'
wasn't correct?

On the other hand, it's probably not good to not regen the file when the
prerequisite changes. It's kind of weird to "rm" the target, but I don't
have a better solution at the moment.

> Restore the earlier behavior for both aspects.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> An alternative to removing the target would be to replace "! -r $@" by
> "-n '$?'" in the shell "if", but that would cause unhelpful alteration
> of what gets recorded in include/xen/.compile.h.cmd. (The command
> normally changes every time anyway, due to the inclusion of
> $(XEN_BUILD_TIME), but I consider that different from varying the
> conditions of the "if".)
> 
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -424,6 +424,7 @@ targets += .banner
>  quiet_cmd_compile.h = UPD     $@
>  define cmd_compile.h
>      if [ ! -r $@ -o -O $@ ]; then \
> +     cat .banner; \
>       sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
>           -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
>           -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
> @@ -441,7 +442,7 @@ define cmd_compile.h
>  endef
>  
>  include/xen/compile.h: include/xen/compile.h.in .banner FORCE
> -     @cat .banner
> +     $(if $(filter-out FORCE,$?),rm -fv $@)

Is there a reason for -v? Do we care if the file existed?

Do we want to log "rm -f compile.h" ? Or could you just prefix the line
with $(Q)?

Thanks,

-- 
Anthony PERARD



 


Rackspace

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