Annotation of htdocs/docs/pkgsrc/devfaq.html, revision 1.30

1.1       dsieger     1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                      2: <html>
                      3: <head>
                      4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1.5       rillig      5: <title>Chapter 22. Frequently Asked Questions</title>
1.24      spz         6: <link rel="stylesheet" type="text/css" href="/global.css">
1.1       dsieger     7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
1.13      rillig      8: <link rel="home" href="index.html" title="The pkgsrc guide">
1.1       dsieger     9: <link rel="up" href="developers-guide.html" title="Part II. The pkgsrc developer's guide">
1.5       rillig     10: <link rel="prev" href="submit.html" title="Chapter 21. Submitting and Committing">
                     11: <link rel="next" href="gnome.html" title="Chapter 23. GNOME packaging and porting">
1.1       dsieger    12: </head>
                     13: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
                     14: <div class="navheader">
                     15: <table width="100%" summary="Navigation header">
1.5       rillig     16: <tr><th colspan="3" align="center">Chapter 22. Frequently Asked Questions</th></tr>
1.1       dsieger    17: <tr>
                     18: <td width="20%" align="left">
                     19: <a accesskey="p" href="submit.html">Prev</a> </td>
                     20: <th width="60%" align="center">Part II. The pkgsrc developer's guide</th>
                     21: <td width="20%" align="right"> <a accesskey="n" href="gnome.html">Next</a>
                     22: </td>
                     23: </tr>
                     24: </table>
                     25: <hr>
                     26: </div>
1.22      wiz        27: <div class="chapter" title="Chapter 22. Frequently Asked Questions">
1.1       dsieger    28: <div class="titlepage"><div><div><h2 class="title">
1.5       rillig     29: <a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div>
1.1       dsieger    30: <p>This section contains the answers to questions that may
                     31:        arise when you are writing a package. If you don't find your
                     32:        question answered here, first have a look in the other chapters,
                     33:        and if you still don't have the answer, ask on the
                     34:        <code class="literal">pkgsrc-users</code> mailing list.</p>
1.22      wiz        35: <div class="qandaset" title="Frequently Asked Questions">
1.30    ! wiz        36: <a name="id1168229282042"></a><dl>
1.5       rillig     37: <dt>22.1. <a href="devfaq.html#devfaq.makeflags">What is the difference between
1.1       dsieger    38:        MAKEFLAGS, .MAKEFLAGS and
                     39:        MAKE_FLAGS?</a>
                     40: </dt>
1.5       rillig     41: <dt>22.2. <a href="devfaq.html#devfaq.make">What is the difference between
1.1       dsieger    42:        MAKE, GMAKE and
                     43:        MAKE_PROGRAM?</a>
                     44: </dt>
1.5       rillig     45: <dt>22.3. <a href="devfaq.html#devfaq.cc">What is the difference between
1.1       dsieger    46:        CC, PKG_CC and
                     47:        PKGSRC_COMPILER?</a>
                     48: </dt>
1.5       rillig     49: <dt>22.4. <a href="devfaq.html#devfaq.bl3flags">What is the difference between
1.1       dsieger    50:        BUILDLINK_LDFLAGS,
                     51:        BUILDLINK_LDADD and
                     52:        BUILDLINK_LIBS?</a>
                     53: </dt>
1.5       rillig     54: <dt>22.5. <a href="devfaq.html#devfaq.bl3prefix">Why does make show-var
1.1       dsieger    55:        VARNAME=BUILDLINK_PREFIX.foo
                     56:        say it's empty?</a>
                     57: </dt>
1.5       rillig     58: <dt>22.6. <a href="devfaq.html#devfaq.master_sites">What does
1.1       dsieger    59:        ${MASTER_SITE_SOURCEFORGE:=package/} mean? I
                     60:        don't understand the := inside
                     61:        it.</a>
                     62: </dt>
1.5       rillig     63: <dt>22.7. <a href="devfaq.html#devfaq.mailinglists">Which mailing lists are there for package
1.1       dsieger    64:        developers?</a>
                     65: </dt>
1.5       rillig     66: <dt>22.8. <a href="devfaq.html#devfaq.documentation">Where is the pkgsrc
1.1       dsieger    67:        documentation?</a>
                     68: </dt>
1.5       rillig     69: <dt>22.9. <a href="devfaq.html#devfaq.too-much-time">I have a little time to kill.  What shall I
1.1       dsieger    70: do?</a>
                     71: </dt>
                     72: </dl>
1.22      wiz        73: <table border="0" width="100%" summary="Q and A Set">
1.1       dsieger    74: <col align="left" width="1%">
1.22      wiz        75: <col>
1.1       dsieger    76: <tbody>
1.22      wiz        77: <tr class="question" title="22.1.">
1.1       dsieger    78: <td align="left" valign="top">
1.30    ! wiz        79: <a name="devfaq.makeflags"></a><a name="id1168229282045"></a><p><b>22.1.</b></p>
1.1       dsieger    80: </td>
                     81: <td align="left" valign="top"><p>What is the difference between
                     82:        <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
                     83:        <code class="varname">MAKE_FLAGS</code>?</p></td>
                     84: </tr>
                     85: <tr class="answer">
                     86: <td align="left" valign="top"></td>
                     87: <td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed
1.28      dholland   88:        to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while
1.1       dsieger    89:        <code class="varname">MAKE_FLAGS</code> are the flags that are passed to
                     90:        the <code class="varname">MAKE_PROGRAM</code> when building the
                     91:        package. [FIXME: What is .MAKEFLAGS for?]</p></td>
                     92: </tr>
1.22      wiz        93: <tr class="question" title="22.2.">
1.1       dsieger    94: <td align="left" valign="top">
1.30    ! wiz        95: <a name="devfaq.make"></a><a name="id1168229282080"></a><p><b>22.2.</b></p>
1.1       dsieger    96: </td>
                     97: <td align="left" valign="top"><p>What is the difference between
                     98:        <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
                     99:        <code class="varname">MAKE_PROGRAM</code>?</p></td>
                    100: </tr>
                    101: <tr class="answer">
                    102: <td align="left" valign="top"></td>
                    103: <td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the
1.28      dholland  104:        <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc
1.1       dsieger   105:        infrastructure. <code class="varname">GMAKE</code> is the path to GNU
                    106:        Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to
                    107:        use that. <code class="varname">MAKE_PROGRAM</code> is the path to the
                    108:        Make program that is used for building the
                    109:        package.</p></td>
                    110: </tr>
1.22      wiz       111: <tr class="question" title="22.3.">
1.1       dsieger   112: <td align="left" valign="top">
1.30    ! wiz       113: <a name="devfaq.cc"></a><a name="id1168229282116"></a><p><b>22.3.</b></p>
1.1       dsieger   114: </td>
                    115: <td align="left" valign="top"><p>What is the difference between
                    116:        <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
                    117:        <code class="varname">PKGSRC_COMPILER</code>?</p></td>
                    118: </tr>
                    119: <tr class="answer">
                    120: <td align="left" valign="top"></td>
                    121: <td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C
                    122:        compiler, which can be configured by the pkgsrc user.
                    123:        <code class="varname">PKG_CC</code> is the path to the compiler wrapper.
                    124:        <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a
                    125:        path to a compiler, but the type of compiler that should be
                    126:        used. See <code class="filename">mk/compiler.mk</code> for more
                    127:        information about the latter variable.</p></td>
                    128: </tr>
1.22      wiz       129: <tr class="question" title="22.4.">
1.1       dsieger   130: <td align="left" valign="top">
1.30    ! wiz       131: <a name="devfaq.bl3flags"></a><a name="id1168229282151"></a><p><b>22.4.</b></p>
1.1       dsieger   132: </td>
                    133: <td align="left" valign="top"><p>What is the difference between
                    134:        <code class="varname">BUILDLINK_LDFLAGS</code>,
                    135:        <code class="varname">BUILDLINK_LDADD</code> and
                    136:        <code class="varname">BUILDLINK_LIBS</code>?</p></td>
                    137: </tr>
                    138: <tr class="answer">
                    139: <td align="left" valign="top"></td>
                    140: <td align="left" valign="top"><p>[FIXME]</p></td>
                    141: </tr>
1.22      wiz       142: <tr class="question" title="22.5.">
1.1       dsieger   143: <td align="left" valign="top">
1.30    ! wiz       144: <a name="devfaq.bl3prefix"></a><a name="id1168229282169"></a><p><b>22.5.</b></p>
1.1       dsieger   145: </td>
1.8       hubertf   146: <td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var
1.1       dsieger   147:        VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
                    148:        say it's empty?</p></td>
                    149: </tr>
                    150: <tr class="answer">
                    151: <td align="left" valign="top"></td>
                    152: <td align="left" valign="top"><p>For optimization reasons, some variables are only
1.22      wiz       153:        available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To
                    154:        <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append
1.8       hubertf   155:        <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above
1.1       dsieger   156:        command.</p></td>
                    157: </tr>
1.22      wiz       158: <tr class="question" title="22.6.">
1.1       dsieger   159: <td align="left" valign="top">
1.30    ! wiz       160: <a name="devfaq.master_sites"></a><a name="id1168229282195"></a><p><b>22.6.</b></p>
1.1       dsieger   161: </td>
                    162: <td align="left" valign="top"><p>What does
                    163:        <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
                    164:        don't understand the <code class="literal">:=</code> inside
                    165:        it.</p></td>
                    166: </tr>
                    167: <tr class="answer">
                    168: <td align="left" valign="top"></td>
                    169: <td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an
                    170:        assignment operator, like you might expect at first sight.
                    171:        Instead, it is a degenerate form of
                    172:        <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>,
1.28      dholland  173:        which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which you
1.1       dsieger   174:        may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the
                    175:        case of <code class="varname">MASTER_SITE_*</code>,
                    176:        <em class="replaceable"><code>old_string</code></em> is the empty string and
                    177:        <em class="replaceable"><code>new_string</code></em> is
                    178:        <code class="literal">package/</code>. That's where the
                    179:        <code class="literal">:</code> and the <code class="literal">=</code> fall
                    180:        together.</p></td>
                    181: </tr>
1.22      wiz       182: <tr class="question" title="22.7.">
1.1       dsieger   183: <td align="left" valign="top">
1.30    ! wiz       184: <a name="devfaq.mailinglists"></a><a name="id1168229282330"></a><p><b>22.7.</b></p>
1.1       dsieger   185: </td>
                    186: <td align="left" valign="top"><p>Which mailing lists are there for package
                    187:        developers?</p></td>
                    188: </tr>
                    189: <tr class="answer">
                    190: <td align="left" valign="top"></td>
                    191: <td align="left" valign="top"><div class="variablelist"><dl>
1.8       hubertf   192: <dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt>
1.1       dsieger   193: <dd><p>This is a list for technical discussions related
                    194:        to pkgsrc development, e.g. soliciting feedback for changes to
                    195:        pkgsrc infrastructure, proposed new features, questions related
                    196:        to porting pkgsrc to a new platform, advice for maintaining a
                    197:        package, patches that affect many packages, help requests moved
                    198:        from pkgsrc-users when an infrastructure bug is found,
                    199:        etc.</p></dd>
1.8       hubertf   200: <dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt>
1.1       dsieger   201: <dd><p>All bug reports in category "pkg" sent with
1.28      dholland  202:        <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here
1.1       dsieger   203:        directly; use one of the other mailing
                    204:        lists.</p></dd>
                    205: </dl></div></td>
                    206: </tr>
1.22      wiz       207: <tr class="question" title="22.8.">
1.1       dsieger   208: <td align="left" valign="top">
1.30    ! wiz       209: <a name="devfaq.documentation"></a><a name="id1168229282362"></a><p><b>22.8.</b></p>
1.1       dsieger   210: </td>
                    211: <td align="left" valign="top"><p>Where is the pkgsrc
                    212:        documentation?</p></td>
                    213: </tr>
                    214: <tr class="answer">
                    215: <td align="left" valign="top"></td>
                    216: <td align="left" valign="top">
                    217: <p>There are many places where you can find
                    218:        documentation about pkgsrc:</p>
1.22      wiz       219: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
                    220: <li class="listitem"><p>The pkgsrc guide (this document) is a collection
1.1       dsieger   221:        of chapters that explain large parts of pkgsrc, but some
                    222:        chapters tend to be outdated. Which ones they are is hard to
                    223:        say.</p></li>
1.22      wiz       224: <li class="listitem"><p>On the mailing list archives (see <a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>), you can find discussions
1.1       dsieger   225:        about certain features, announcements of new parts of the pkgsrc
                    226:        infrastructure and sometimes even announcements that a certain
                    227:        feature has been marked as obsolete. The benefit here is that
                    228:        each message has a date appended to it.</p></li>
1.22      wiz       229: <li class="listitem"><p>Many of the files in the
1.1       dsieger   230:        <code class="filename">mk/</code> directory start with a comment that
                    231:        describes the purpose of the file and how it can be used by the
                    232:        pkgsrc user and package authors. An easy way to find this
1.8       hubertf   233:        documentation is to run <span class="command"><strong>bmake
1.1       dsieger   234:        help</strong></span>.</p></li>
1.22      wiz       235: <li class="listitem"><p>The CVS log messages are a rich source of
1.1       dsieger   236:        information, but they tend to be highly abbreviated, especially
                    237:        for actions that occur often. Some contain a detailed
                    238:        description of what has changed, but they are geared towards the
                    239:        other pkgsrc developers, not towards an average pkgsrc user.
                    240:        They also only document <span class="emphasis"><em>changes</em></span>, so if you
                    241:        don't know what has been before, these messages may not be worth
                    242:        too much to you.</p></li>
1.22      wiz       243: <li class="listitem"><p>Some parts of pkgsrc are only <span class="quote">&#8220;<span class="quote">implicitly
                    244:        documented</span>&#8221;</span>, that is the documentation exists only in the
1.1       dsieger   245:        mind of the developer who wrote the code. To get this
1.8       hubertf   246:        information, use the <span class="command"><strong>cvs annotate</strong></span> command
1.1       dsieger   247:        to see who has written it and ask on the
                    248:        <code class="literal">tech-pkg</code> mailing list, so that others can
                    249:        find your questions later (see above). To be sure that the
                    250:        developer in charge reads the mail, you may CC him or
                    251:        her.</p></li>
                    252: </ul></div>
                    253: </td>
                    254: </tr>
1.22      wiz       255: <tr class="question" title="22.9.">
1.1       dsieger   256: <td align="left" valign="top">
1.30    ! wiz       257: <a name="devfaq.too-much-time"></a><a name="id1168229282485"></a><p><b>22.9.</b></p>
1.1       dsieger   258: </td>
                    259: <td align="left" valign="top"><p>I have a little time to kill.  What shall I
                    260: do?</p></td>
                    261: </tr>
                    262: <tr class="answer">
                    263: <td align="left" valign="top"></td>
                    264: <td align="left" valign="top">
                    265: <p>This is not really an FAQ yet, but here's the answer
                    266: anyway.</p>
1.22      wiz       267: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
                    268: <li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the
1.1       dsieger   269:     <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a> package).  It
                    270:     will tell you about newer versions of installed packages that are
                    271:     available, but not yet updated in pkgsrc.</p></li>
1.22      wiz       272: <li class="listitem"><p>Browse <code class="filename">pkgsrc/doc/TODO</code>
1.12      jmcneill  273:     &mdash; it contains a list of suggested new packages and a list of
1.1       dsieger   274:     cleanups and enhancements for pkgsrc that would be nice to
                    275:     have.</p></li>
1.22      wiz       276: <li class="listitem"><p>Review packages for which review was requested on
1.8       hubertf   277:     the <a class="ulink" href="http://pkgsrc-wip.sourceforge.net/" target="_top">pkgsrc-wip</a> review
1.1       dsieger   278:     mailing list.</p></li>
                    279: </ul></div>
                    280: </td>
                    281: </tr>
                    282: </tbody>
                    283: </table>
                    284: </div>
                    285: </div>
                    286: <div class="navfooter">
                    287: <hr>
                    288: <table width="100%" summary="Navigation footer">
                    289: <tr>
                    290: <td width="40%" align="left">
                    291: <a accesskey="p" href="submit.html">Prev</a> </td>
                    292: <td width="20%" align="center"><a accesskey="u" href="developers-guide.html">Up</a></td>
                    293: <td width="40%" align="right"> <a accesskey="n" href="gnome.html">Next</a>
                    294: </td>
                    295: </tr>
                    296: <tr>
1.5       rillig    297: <td width="40%" align="left" valign="top">Chapter 21. Submitting and Committing </td>
1.1       dsieger   298: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
1.5       rillig    299: <td width="40%" align="right" valign="top"> Chapter 23. GNOME packaging and porting</td>
1.1       dsieger   300: </tr>
                    301: </table>
                    302: </div>
                    303: </body>
                    304: </html>

CVSweb <webmaster@jp.NetBSD.org>