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

Re: [UNIKRAFT PATCH 3/7] build: Per-file flags and includes for M4 pre-processing


  • To: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU <vlad_andrei.badoiu@xxxxxx>
  • Date: Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
  • Cc: minios-devel <minios-devel@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 19 Apr 2021 10:05:29 +0000
  • Dkim-filter: OpenDKIM Filter v2.10.3 mx.upb.ro 5507CB5600AD
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: i3RcaWSYTuqinUuIYmCxWxDW1r2DPA==
  • Thread-topic: build: Per-file flags and includes for M4 pre-processing

Thanks!

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@xxxxxxxxx>
To: "minios-devel" <minios-devel@xxxxxxxxxxxxx>
Cc: "Simon Kuenzer" <simon.kuenzer@xxxxxxxxx>
Sent: Friday, December 18, 2020 8:09:20 PM
Subject: [UNIKRAFT PATCH 3/7] build: Per-file flags and includes for M4 
pre-processing

Similar to build rules, we add support for specifying file-local
flags and includes to M4 pre-processing rules. This can be done
through the following variables:
 <LIBNAME>_<SOURCE NAME>_M4FLAGS
 <LIBNAME>_<SOURCE NAME>_M4INCLUDES

Example: Setting `-myflag` to the M4 pre-processing of `code.m4`:
 LIBMYLIB_SRCS += $(LIBMYLIB_BASE)/code.m4>.c
 LIBMYLIB_CODE_M4FLAGS += -myflag

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 support/build/Makefile.rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 44701cd2..6a8c2099 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -622,8 +622,10 @@ $(3): $(2) | prepare
        $(call build_cmd,M4,$(1),$(3),\
                $(M4)  $$(M4INCLUDES) $$(M4INCLUDES-y) \
                       $$($(call vprefix_lib,$(1),M4INCLUDES)) $$($(call 
vprefix_lib,$(1),M4INCLUDES-y)) \
+                      $$($(call vprefix_src,$(1),$(2),,M4INCLUDES)) $$($(call 
vprefix_src,$(1),$(2),,M4INCLUDES-y)) \
                       $$(M4FLAGS) $$(M4FLAGS-y) \
                       $$($(call vprefix_lib,$(1),M4FLAGS)) $$($(call 
vprefix_lib,$(1),M4FLAGS-y)) \
+                      $$($(call vprefix_src,$(1),$(2),,M4FLAGS)) $$($(call 
vprefix_src,$(1),$(2),,M4FLAGS-y)) \
                       $(4) \
                       $(2) > $(3)
        )
-- 
2.20.1



 


Rackspace

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