[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v8 27/47] build: grab common EFI source files in arch specific dir
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Tue, 18 Jan 2022 16:21:48 +0000
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 18 Jan 2022 16:22:09 +0000
- Ironport-data: A9a23:bi9kWq4B9NYhSo6bYoDQkwxRtHnBchMFZxGqfqrLsTDasY5as4F+v mobD2CGMvjZZjD2KIp0Oonjph9QsMLTzNZhSgRp/Cs2Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FV8MpBsJ00o5wbZg294w2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zy 9lUlbXvdxcQGqz8nbQkbzR2My9sIvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQR6+DO ZZAOVKDajztfCxLOgsxNahikd+E3HPkNAZ0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3kNXqh75JEXBIjn1lgixl1YOMGODyb35NeEaslWM1lsK TiR3fKQi7NZz0vEUnwyCXmSgrYN2cVQ4EhHnA0YOlCEutvZnftmjhRe/AM+QhlR0hgagfl4P XJmNhEtKKiDl9uyaBOvg4x499l9OSCk
- Ironport-hdrordr: A9a23:WhwAG6qnNrdyWMyassCRiYIaV5oreYIsimQD101hICG8cqSj+f xGuM5rsSMc6QxhPU3I9ursBEDtex/hHNtOkO4s1NSZLWvbUQmTTL2KhLGKq1aLJ8S9zJ8/6U 4JSdkZNDSaNzlHZKjBjzWFLw==
- Ironport-sdr: Rh3eWGnNFzhivLJzHitEowFhLZEiq+PQsNlZTaZE1d9E94wXKo7P2PO2CJQUyznkZ7ctFOHtfU SaRlKmcIyby1SGYZAxzFxg8ycFwpLb7Tvc/jDY3eJsUE1JcmU3cpT/81k2deYzxRlnEc040Fsq tUMTxWcZH2BQJuQEBotnhymsw35vPEvFJtqnEcYOODhBxhaUQjvQ45fv1X26rIOkgAUeUWKXyR bFwPf8nT20JRikZ1VYF2LTlR0wWqPD7g3d122HAA9e4Oq3I9KgkSwzs040SA5NwZnY5OWdYYar cJMY/ZV+mAvK38rnY39KtZA9
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Jan 18, 2022 at 11:06:38AM +0000, Anthony PERARD wrote:
> On Tue, Dec 21, 2021 at 02:53:49PM +0100, Jan Beulich wrote:
> > On 25.11.2021 14:39, Anthony PERARD wrote:
> > > +$(obj)/%.c: $(abs_srctree)/common/efi/%.c FORCE
> > > + $(Q)ln -nfs $< $@
> >
> > Like was the case before, I think it would be better if the links were
> > relative ones, at least when srctree == objtree (but ideally always).
>
> I can give it a try.
How about:
ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, ,$(obj))))/$(if
$(building_out_of_srctree),source/)common/efi/$(<F) $@
This will result in the relative path "../../../common/efi/runtime.c"
for in-tree builds, and "../../../source/common/efi/runtime.c" for
out-of-tree builds. There's a "source" symlink that can be used which
point to the source tree when doing out-of-tree builds.
The part:
$(subst $(space),/,$(patsubst %,..,$(subst /, ,$(obj))))
means that if $(obj) were to be something other than "arch/*/efi", the
command would still works and give the right number of "../".
It does this steps to "arch/x86/efi":
arch x86 efi
.. .. ..
../../..
The added "source/" depends on whether we do out-of-tree build or not.
--
Anthony PERARD
|