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

Re: Unikraft makefile - how to copy files in Makefile.uk



Hello,

Please find the comment inline:

On 7/7/20 1:20 PM, felix nasch wrote:
Hi,

I was hanging out in the IRC channel, but it seems inactive, so I am
asking here, hope that's ok. :)
I am trying to port a library to Unikraft, and as part of the build process I
want to copy around a few files after extracting the source files.
This is to solve these two problems:

1. Some source files have the same name (in different dirs), but the
     unikraft build system places all .obj files into the root directory, thus
     colliding object files overwrite each other.  I want to rename conflicting
     files prior to compilation.

Our approach to solve the problem, has been to resolve name collision with a '|' directive. The '|' would prepend the object file with the name following the pipe.

For eg, if you look at the Makefile.uk in plat/kvm/

LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/trace.c|common

LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/trace.c



2. Include paths - when extracting the source package, the include path is not
     how consumers of the library expect it. I would want to create an
appropriately
     named subdir and move the header files into it.

However, I can't figure out how to execute a simple "cp <src> <dest>"
in Makefile.uk, since new targets cannot be defined.:

This is a feature we do not support yet. If you believe the problem is very specific to a single library, you can do something like [1].

[1] https://github.com/unikraft/lib-lua/blob/master/Makefile.uk <https://github.com/unikraft/lib-lua/blob/master/Makefile.uk>



How can I do that?

Thanks,
f.




 


Rackspace

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