[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH] build/rules: Provide `src2dst` function
`src2dst` converts a list of sources to paths pointing to their corresponding destination files to a given filename suffix/extension. This is a more generic case than `src2obj`. `src2obj` is changed to call `src2dst` with the '.o' suffix. Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> --- support/build/Makefile.rules | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules index 04f2f0dc..d5a54213 100644 --- a/support/build/Makefile.rules +++ b/support/build/Makefile.rules @@ -61,13 +61,19 @@ libname2olib = $(addprefix $(BUILD_DIR)/,$(addsuffix .o,$(1))) libname2preolib = $(addprefix $(BUILD_DIR)/,$(addsuffix .ld.o,$(1))) +# converts a list of sources to paths pointing to their corresponding destination files +# src2dst $libname,$source(s),$destsuffix,$variant(optional) +define src2dst = +$(if $(4),\ +$(addprefix $(call sub_build_dir,$(1))/,$(addsuffix .$(4)$(3),$(basename $(notdir $(2))))),\ +$(addprefix $(call sub_build_dir,$(1))/,$(addsuffix $(3),$(basename $(notdir $(2)))))\ +) +endef + # converts a list of sources to paths pointing to their corresponding object file # src2obj $libname,$source(s),$variant(optional) define src2obj = -$(if $(3),\ -$(addprefix $(call sub_build_dir,$(1))/,$(addsuffix .$(3).o,$(basename $(notdir $(2))))),\ -$(addprefix $(call sub_build_dir,$(1))/,$(addsuffix .o,$(basename $(notdir $(2)))))\ -) +$(call src2dst,$(1),$(2),.o,$(3)) endef # converts a list of output file (object files or linker scripts) paths -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |