[Libreoffice] patch for make to help in gbuild debugging

Norbert Thiebaud nthiebaud at gmail.com
Thu Jun 23 00:23:46 PDT 2011


It is sometimes hard to follow what gbuild does internally... which
when gbuild has a bug, or when it is misused makes things quite
'interesting'...

What I found was that the most confusing things to follow were $(eval
and $(call, especially when they cascade 4, 5, 6 level deep.

So I created a patch for make-3.82 that allow the use of --debug=e,c
That add trace about, respectively, $(eval and $(scall
see: http://cgit.freedesktop.org/libreoffice/contrib/dev-tools/commit/?id=a4f03f17f42ded70e6a3c49cf4e9a90eaf3c12ca

Tor, note that this is v2 (i.e different from the one I pastebined you
yesterday)

Norbert


Things look like this excerpt of make --debug=e,c on sw
[...]
   ### call $(gb_Library_set_include) -->
   ### arg 0 for call $(gb_Library_set_include) is 'gb_Library_set_include'
   ### arg 1 for call $(gb_Library_set_include) is 'msword'
   ### arg 2 for call $(gb_Library_set_include) is '
-I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw '
    ### call $(gb_Library_get_linktargetname) -->
    ### arg 0 for call $(gb_Library_get_linktargetname) is
'gb_Library_get_linktargetname'
    ### arg 1 for call $(gb_Library_get_linktargetname) is 'msword'
    ### arg 2 for call $(gb_Library_get_linktargetname) is implicit
     ### call $(gb_Library_get_filename) -->
     ### arg 0 for call $(gb_Library_get_filename) is 'gb_Library_get_filename'
     ### arg 1 for call $(gb_Library_get_filename) is 'msword'
     ### arg 2 for call $(gb_Library_get_filename) is implicit
     ### call to $(gb_Library_get_filename) expended into
libmswordlo.so
     ### call $(gb_Library_get_filename) <--
    ### call to $(gb_Library_get_linktargetname) expended into
Library/libmswordlo.so
    ### call $(gb_Library_get_linktargetname) <--
    ### call $(gb_LinkTarget_set_include) -->
    ### arg 0 for call $(gb_LinkTarget_set_include) is
'gb_LinkTarget_set_include'
    ### arg 1 for call $(gb_LinkTarget_set_include) is 'Library/libmswordlo.so'
    ### arg 2 for call $(gb_LinkTarget_set_include) is '
-I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw '
    ### arg 3 for call $(gb_LinkTarget_set_include) is ''
     ### call $(gb_LinkTarget_get_headers_target) -->
     ### arg 0 for call $(gb_LinkTarget_get_headers_target) is
'gb_LinkTarget_get_headers_target'
     ### arg 1 for call $(gb_LinkTarget_get_headers_target) is
'Library/libmswordlo.so'
     ### arg 2 for call $(gb_LinkTarget_get_headers_target) is implicit
     ### arg 3 for call $(gb_LinkTarget_get_headers_target) is implicit
     ### call to $(gb_LinkTarget_get_headers_target) expended into
/lo/libo/solver/340/unxlngx6.pro/workdir/Headers/Library/libmswordlo.so
     ### call $(gb_LinkTarget_get_headers_target) <--
     ### call $(gb_LinkTarget_get_target) -->
     ### arg 0 for call $(gb_LinkTarget_get_target) is
'gb_LinkTarget_get_target'
     ### arg 1 for call $(gb_LinkTarget_get_target) is 'Library/libmswordlo.so'
     ### arg 2 for call $(gb_LinkTarget_get_target) is implicit
     ### arg 3 for call $(gb_LinkTarget_get_target) is implicit
     ### call to $(gb_LinkTarget_get_target) expended into
/lo/libo/solver/340/unxlngx6.pro/workdir/LinkTarget/Library/libmswordlo.so
     ### call $(gb_LinkTarget_get_target) <--
     ### call $(gb_LinkTarget_get_dep_target) -->
     ### arg 0 for call $(gb_LinkTarget_get_dep_target) is
'gb_LinkTarget_get_dep_target'
     ### arg 1 for call $(gb_LinkTarget_get_dep_target) is
'Library/libmswordlo.so'
     ### arg 2 for call $(gb_LinkTarget_get_dep_target) is implicit
     ### arg 3 for call $(gb_LinkTarget_get_dep_target) is implicit
     ### call to $(gb_LinkTarget_get_dep_target) expended into
/lo/libo/solver/340/unxlngx6.pro/workdir/Dep/LinkTarget/Library/libmswordlo.so.d
     ### call $(gb_LinkTarget_get_dep_target) <--
    ### call to $(gb_LinkTarget_set_include) expended into
/lo/libo/solver/340/unxlngx6.pro/workdir/Headers/Library/libmswordlo.so
/lo/libo/solver/340/unxlngx6.pro/workdir/LinkTarget/Library/libmswordlo.so
: INCLUDE :=  -I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw
ifeq (T,T)
/lo/libo/solver/340/unxlngx6.pro/workdir/Dep/LinkTarget/Library/libmswordlo.so.d
: INCLUDE :=  -I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw
endif

    ### call $(gb_LinkTarget_set_include) <--
   ### call to $(gb_Library_set_include) expended into
/lo/libo/solver/340/unxlngx6.pro/workdir/Headers/Library/libmswordlo.so
/lo/libo/solver/340/unxlngx6.pro/workdir/LinkTarget/Library/libmswordlo.so
: INCLUDE :=  -I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw
ifeq (T,T)
/lo/libo/solver/340/unxlngx6.pro/workdir/Dep/LinkTarget/Library/libmswordlo.so.d
: INCLUDE :=  -I/lo/libo/clone/writer/sw/source/core/inc
-I/lo/libo/clone/writer/sw/source/ui/inc
-I/lo/libo/clone/writer/sw/source/filter/inc
-I/lo/libo/clone/writer/sw/inc/pch -I/lo/libo/clone/writer/sw/inc
-I/lo/libo/solver/340/unxlngx6.pro/workdir/inc/sw/sdi
-I/lo/libo/solver/340/unxlngx6.pro/workdir/Misc/sw/ $(INCLUDE)
-I/lo/libo/solver/340/unxlngx6.pro/inc/offuh
-I/lo/libo/solver/340/unxlngx6.pro/inc/sw
endif

   ### call $(gb_Library_set_include) <--
[...]


More information about the LibreOffice mailing list