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

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

CVSweb <webmaster@jp.NetBSD.org>