diff mbox series

[XEN,57/57] stubdom: xenlibs linkfarm, ignore non-regular files

Message ID 20211206170241.13165-58-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Toolstack build system improvement, toward non-recursive makefiles | expand

Commit Message

Anthony PERARD Dec. 6, 2021, 5:02 p.m. UTC
When we will convert tools/ build system, their will be a need to
replace some use of "vpath". This will done making symbolic links.
Those symlinks are not wanted by stubdom build system when making a
linkfarm for the Xen libraries. To avoid them, we will use `find`
instead of plain shell globbing.

For example, there will be a link to "xen/lib/x86/cpuid.o" in
"tools/libs/guest/".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 stubdom/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Samuel Thibault Dec. 11, 2021, 11:53 p.m. UTC | #1
Anthony PERARD, le lun. 06 déc. 2021 17:02:40 +0000, a ecrit:
> When we will convert tools/ build system, their will be a need to
> replace some use of "vpath". This will done making symbolic links.
> Those symlinks are not wanted by stubdom build system when making a
> linkfarm for the Xen libraries. To avoid them, we will use `find`
> instead of plain shell globbing.
> 
> For example, there will be a link to "xen/lib/x86/cpuid.o" in
> "tools/libs/guest/".
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  stubdom/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 1fa075b9ad..b312f710cd 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -345,7 +345,7 @@ define do_links
>    mkdir -p $(dir $@)include
>    cd $(dir $@); \
>    ln -sf $(dir $<)include/*.h include/; \
> -  ln -sf $(dir $<)*.[ch] .; \
> +  find $(dir $<) -maxdepth 1 -type f -name '*.[ch]' -exec ln -sf {} . \; ; \
>    ln -sf $(dir $<)Makefile.common .
>    touch $@
>  endef
> -- 
> Anthony PERARD
>
diff mbox series

Patch

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 1fa075b9ad..b312f710cd 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -345,7 +345,7 @@  define do_links
   mkdir -p $(dir $@)include
   cd $(dir $@); \
   ln -sf $(dir $<)include/*.h include/; \
-  ln -sf $(dir $<)*.[ch] .; \
+  find $(dir $<) -maxdepth 1 -type f -name '*.[ch]' -exec ln -sf {} . \; ; \
   ln -sf $(dir $<)Makefile.common .
   touch $@
 endef