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

Re: [Minios-devel] [UNIKRAFT PATCH 5/8] build/Makefile.rules: build_cmd_fixdep supports specifying dependency files



On 11.09.2018 18:19, Yuri Volchkov wrote:
Hi,

I would rather extend the obj2dep to recognize the *.lds too. Because
this auto-generation is already very complex. One more parameter to
the build_cmd_fixdep makes the logic even harder to follow.

Okay, good point. Let me do a v2.


I know that *.lds is not really an obj file. But it is very similar to
object by the nature - it is also an intermediate step. We could also
rename obj2dep to something like output2dep.

- Yuri.

Simon Kuenzer <simon.kuenzer@xxxxxxxxx> writes:

Make build_cmd_fixdep independent of obj2dep function. This enables that the
funciton can be used for other buildrule generator functions that specify
different dependecy file name than obj2dep does.

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

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index a5f5f7d..ebbb8dd 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -204,13 +204,13 @@ endif
  # $command) `$(call debflags,$target)` should be used to let the
  # compiler create this temporary dependency file.
  #
-# build_cmd_fixdep $quietlabel,$libname(optional),$target,$command
+# build_cmd_fixdep $quietlabel,$libname(optional),$target,$command,$depfile
  tmp_depfile = $(dir $1).$(notdir $1).d
  depflags = -Wp$(comma)-MD$(comma)$(call tmp_depfile,$(3))
  define build_cmd_fixdep =
        $(call build_cmd,$1,$2,$3,$4)
        $Q $(UK_FIXDEP) $(call tmp_depfile,$3) $3 '$(call strip,$4)' \
-               $(BUILD_DIR)    > $(call obj2dep,$3) && \
+               $(BUILD_DIR) > $(call strip,$5) && \
                rm -f $(call tmp_depfile,$3)
  endef
@@ -325,7 +325,8 @@ $(3): $(2) | prepare
                       $(ASFLAGS) $(ASFLAGS-y) \
                       $($(call vprefix_lib,$(1),ASFLAGS)) $($(call 
vprefix_lib,$(1),ASFLAGS-y)) \
                       $(4) -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) \
-                      -c $(2) -o $(3) $(depflags)
+                      -c $(2) -o $(3) $(depflags),\
+               $(call obj2dep,$(3))
        )
UK_SRCS-y += $(2)
@@ -361,8 +362,9 @@ $(3): $(2) | prepare
                       $(CFLAGS) $(CFLAGS-y) \
                       $($(call vprefix_lib,$(1),CFLAGS)) $($(call 
vprefix_lib,$(1),CFLAGS-y)) \
                       $(4) -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) \
-                      -c $(2) -o $(3) $(depflags)
-)
+                      -c $(2) -o $(3) $(depflags),\
+               $(call obj2dep,$(3))
+       )
UK_SRCS-y += $(2)
  UK_DEPS-y += $(call obj2dep,$(3))
@@ -379,7 +381,8 @@ $(3): $(2) | prepare
                       $(CXXFLAGS) $(CXXFLAGS-y) \
                       $($(call vprefix_lib,$(1),CXXFLAGS)) $($(call 
vprefix_lib,$(1),CXXFLAGS-y)) \
                       $(4) -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) \
-                      -c $(2) -o $(3) $(depflags)
+                      -c $(2) -o $(3) $(depflags),\
+               $(call obj2dep,$(3))
        )
UK_SRCS-y += $(2)
--
2.7.4



_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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