[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v8 12/47] build: build everything from the root dir, use obj=$subdir
Hi Anthonny, On 25/11/2021 13:39, Anthony PERARD wrote: A subdirectory is now built by setting "$(obj)" instead of changing directory. "$(obj)" should always be set when using "Rules.mk" and thus a shortcut "$(build)" is introduced and should be used. A new variable "$(need-builtin)" is introduce. It is to be used whenever a "built_in.o" is wanted from a subdirectory. "built_in.o" isn't the main target anymore, and thus only needs to depends on the objects that should be part of "built_in.o". Introduce $(srctree) and $(objtree) to replace $(BASEDIR) in cases a relative path is better, and $(abs_srctree) and $(abs_objtree) which have an absolute path. DEPS is updated as the existing macro to deal with it doesn't know about $(obj). There's some changes in "Rules.mk" which in addition to deal with "$(obj)" also make it's looks more like "Makefile.build" from Linux v5.12. test/Makefile doesn't need special handling in order to build everything under test/, Rules.mk will visit test/livepatch via $(subdir-y), thus "tests" "all" and "build" target are removed. "subtree-force-update" target isn't useful so it is removed as well. test/livepatch/Makefile doesn't need default target anymore, Rules.mk will build everything in $(extra-y) and thus all *.livepatch. Adjust cloc recipe: dependency files generated by CC will now have the full path to the source file, so we don't need to prepend the subdirectory. This fix some issue with source not been parsed by cloc before. Also source from tools/kconfig would be listed with changes in this patch so adjust the find command to stop listing the "tools" directory and thus kconfig. With a default build of Xen on X86, they are a few new files parsed by cloc: arch/x86/x86_64/compat/mm.c arch/x86/x86_64/mm.c common/compat/domain.c common/compat/memory.c common/compat/xlat.c Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Bob Eshleman <bobbyeshleman@xxxxxxxxx> For Arm: Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |