<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi David,<br>
    hi Matus,<br>
    <br>
    thank you for your comments on my patch. I changed it accordingly.<br>
    <br>
    *@Matúš:* thank you for your help on IRC.<br>
    <br>
    Special usage gnu_getopt lib in windows:<br>
    Matúš proposed the follow simple solution to include in
    Executable_idlcpp.mk:<br>
    <br>
    ifeq ($(OS),WNT)<br>
    $(eval $(call gb_Executable_use_libraries,idlcpp,\<br>
        gnu_getopt \<br>
    ))<br>
    endif<br>
    <br>
    because<br>
    <br>
    1. HAVE_GETOPT is allways NO on windows<br>
    <br>
    2. gnu_getopt is registered already on windows:
    gb_Library_PLAINLIBS_NONE += [...] gnu_getopt [...]<br>
    here solenv/gbuild/platform/WNT_INTEL_GCC.mk<br>
    and here solenv/gbuild/platform/WNT_INTEL_MSC.mk<br>
    <br>
    3. original make file snippet was only active on windows<br>
    <br>
    .IF "$(HAVE_GETOPT)" != "YES"<br>
    .IF "$(GUI)$(COM)" == "WNTMSC"<br>
    APP1STDLIBS=gnu_getopt.lib<br>
    .ELIF "$(GUI)$(COM)" == "WNTGCC"<br>
    APP1STDLIBS=-lgnu_getopt<br>
    .ENDIF<br>
    .ENDIF<br>
    <br>
    Having said that, how could we simplify the gnu_getopt treatment in
    tools/Executable_rscdep.mk?<br>
    <br>
    David<br>
    <br>
    -------- Original Message --------
    <table class="moz-email-headers-table" border="0" cellpadding="0"
      cellspacing="0">
      <tbody>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
          <td>Re: [PATCH][REVIEW] gbuild conversion: idlc module</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
          <td>Thu, 12 Apr 2012 06:33:19 +0200</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
          <td>David Tardon <a class="moz-txt-link-rfc2396E" href="mailto:dtardon@redhat.com">&lt;dtardon@redhat.com&gt;</a></td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
          <td>David Ostrovsky <a class="moz-txt-link-rfc2396E" href="mailto:david.ostrovsky@gmx.de">&lt;david.ostrovsky@gmx.de&gt;</a></td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
          <td>Libreoffice-dev <a class="moz-txt-link-rfc2396E" href="mailto:libreoffice@lists.freedesktop.org">&lt;libreoffice@lists.freedesktop.org&gt;</a></td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    <pre>On Wed, Apr 11, 2012 at 11:18:46PM +0200, David Ostrovsky wrote:
&gt; Hi,
&gt; 
&gt; this is gbuild conversion for idlc module.

Good. But it is not quite ready yet, see comments below.

&gt; diff --git a/Repository.mk b/Repository.mk
&gt; index 1a3851e..638f4f8 100644
&gt; --- a/Repository.mk
&gt; +++ b/Repository.mk
&gt; @@ -31,6 +31,8 @@ $(eval $(call gb_Helper_register_executables,NONE, \
&gt;      bmp \
&gt;      bmpsum \
&gt;      cppunit/cppunittester \
&gt; +    idlc \
&gt; +    idlcpp \
&gt;      g2g \
&gt;      gencoll_rule \
&gt;      genconv_dict \

Both binaries should be registered in layer SDKBIN (because of
APP1RPATH=SDK).

&gt; +
&gt; +$(eval $(call gb_Executable_use_libraries,idlc,\
&gt; +    sal \
&gt; +    reg \

Originally idlc is linked with salhelper too. It is possible it is no
longer necessary, but it is also possible that it is necessary on a
different platform. (Nitpick: please, keep the libs sorted
alphabetically :-)

&gt; +))
&gt; +$(eval $(call gb_Executable_use_linked_libs,idlcpp,\
&gt; +    gnu_getopt \
&gt; +))

This is wrong: there is no unconditionally built library gnu_getopt. It
only worked for you because there is no function
gb_Executable_use_linked_libs either (it is called
gb_Executable_use_libraries) and your platform's libc has getopt .-)

You need to use gb_Executable_use_externals and add a new definition to
RepositoryExternals.mk for it, like:

ifeq ($(HAVE_GETOPT),YES)

# nothing needed
define gb_LinkTarget__use_gnu_getopt

endef

else # !HAVE_GETOPT

define gb_LinkTarget__use_gnu_getopt
$(call gb_LinkTarget_use_libraries,$(1),\
    gnu_getopt \
)

endef

$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
    gnu_getopt \
))

endif # HAVE_GETOPT

D.
</pre>
  </body>
</html>