Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 2000 16:40:53 +0100
From:      Ernst de Haan <ernst@jollem.com>
To:        doc@freebsd.org
Subject:   SUGG: Using colors in http://www.freebsd.org/porters-handbook/porting-samplem.html
Message-ID:  <20001201164053.A56563@c187104187.telekabel.chello.nl>

next in thread | raw e-mail | index | archive | help

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I suggest you use colors in the example Makefile for a new port in:

   * http://www.freebsd.org/porters-handbook/porting-samplem.html

to make it more obvious for readers what goes in the Makefile and what is just
comments. I've attached a suggested replacement.


Ernst de Haan

--wac7ysb48OaltWcw
Content-Type: text/html; charset=us-ascii
Content-Disposition: attachment; filename="porting-samplem.html"

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>A Sample Makefile</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.52">
    <link rel="HOME" title="FreeBSD Porter's Handbook" href= 
    "index.html">
    <link rel="PREVIOUS" title="If you are stuck..." href= 
    "x1889.html">
    <link rel="NEXT" title="Automated package list creation" href= 
    "porting-autoplist.html">
  </head>

  <body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link= 
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table width="100%" border="0" cellpadding="0" cellspacing=
      "0">
        <tr>
          <th colspan="3" align="center">FreeBSD Porter's
          Handbook</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href= 
          "x1889.html">Prev</a></td>

          <td width="80%" align="center" valign="bottom">
          </td>

          <td width="10%" align="right" valign="bottom"><a href= 
          "porting-autoplist.html">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="CHAPTER">
      <h1><a name="PORTING-SAMPLEM">Chapter 16. A Sample <tt class= 
      "FILENAME">Makefile</tt></a></h1>

      <p>Here is a sample <tt class="FILENAME">Makefile</tt> that
      you can use to create a new port. Make sure you remove all
      the extra comments (ones between brackets)!</p>

      <p>It is recommended that you follow this format (ordering of
      variables, empty lines between sections, etc.). This format
      is designed so that the most important information is easy to
      locate. We recommend that you use <a href= 
      "porting-portlint.html">portlint</a> to check the <tt class= 
      "FILENAME">Makefile</tt>.</p>
<pre class="PROGRAMLISTING">
    <FONT color="#CC0000">[the header...just to make it easier for us to identify the ports.]</FONT>
    # New ports collection makefile for:   xdvi
    <FONT color="#CC0000">[the "version required" line is only needed when the PORTVERSION
     variable is not specific enough to describe the port.]</FONT>
    # Date created:                26 May 1995
    <FONT color="#CC0000">[this is the person who did the original port to FreeBSD, in particular, the
    person who wrote the first version of this Makefile.  Remember, this should
    not be changed when upgrading the port later.]</FONT>
    # Whom:                        Satoshi Asami &lt;asami@FreeBSD.org&gt;
    #
    # $FreeBSD$
    <FONT color="#CC0000">[ ^^^^^^^^^ This will be automatically replaced with RCS ID string by CVS
    when it is committed to our repository.  If upgrading a port, do not alter
    this line back to "$FreeBSD$".  CVS deals with it automatically.]</FONT>
    #
    
    <FONT color="#CC0000">[section to describe the port itself and the master site - PORTNAME
     and PORTVERSION are always first, followed by CATEGORIES,
     and then MASTER_SITES, which can be followed by MASTER_SITE_SUBDIR.
     PKGNAMEPREFIX and PKGNAMESUFFIX, if needed, will be after that.
     Then comes DISTNAME, EXTRACT_SUFX and/or DISTFILES, and then
     EXTRACT_ONLY, as necessary.]</FONT>
    PORTNAME=      xdvi
    PORTVERSION=   18.2
    CATEGORIES=    print
    <FONT color="#CC0000">[do not forget the trailing slash ("/")!
     if you are not using MASTER_SITE_* macros]</FONT>
    MASTER_SITES=  ${MASTER_SITE_XCONTRIB}
    MASTER_SITE_SUBDIR= applications
    PKGNAMEPREFIX= ja-
    DISTNAME=      xdvi-pl18
    <FONT color="#CC0000">[set this if the source is not in the standard ".tar.gz" form]</FONT>
    EXTRACT_SUFX=  .tar.Z
    
    <FONT color="#CC0000">[section for distributed patches -- can be empty]</FONT>
    PATCH_SITES=   ftp://ftp.sra.co.jp/pub/X11/japanese/
    PATCHFILES=    xdvi-18.patch1.gz xdvi-18.patch2.gz
    
    <FONT color="#CC0000">[maintainer; *mandatory*!  This is the person (preferably with commit
     privileges) whom a user can contact for questions and bug reports - this
     person should be the porter or someone who can forward questions to the
     original porter reasonably promptly.  If you really do not want to have
     your address here, set it to "ports@FreeBSD.org".]</FONT>
    MAINTAINER=    asami@FreeBSD.org
    
    <FONT color="#CC0000">[dependencies -- can be empty]</FONT>
    RUN_DEPENDS=   gs:${PORTSDIR}/print/ghostscript
    LIB_DEPENDS=   Xpm.5:${PORTSDIR}/graphics/xpm
    
    <FONT color="#CC0000">[this section is for other standard bsd.port.mk variables that do not
     belong to any of the above]</FONT>
    <FONT color="#CC0000">[If it asks questions during configure, build, install...]</FONT>
    IS_INTERACTIVE=        yes
    <FONT color="#CC0000">[If it extracts to a directory other than ${DISTNAME}...]</FONT>
    WRKSRC=                ${WRKDIR}/xdvi-new
    <FONT color="#CC0000">[If the distributed patches were not made relative to ${WRKSRC}, you
     may need to tweak this]</FONT>
    PATCH_DIST_STRIP=      -p1
    <FONT color="#CC0000">[If it requires a "configure" script generated by GNU autoconf to be run]</FONT>
    GNU_CONFIGURE= yes
    <FONT color="#CC0000">[If it requires GNU make, not /usr/bin/make, to build...]</FONT>
    USE_GMAKE=     yes
    <FONT color="#CC0000">[If it is an X application and requires "xmkmf -a" to be run...]</FONT>
    USE_IMAKE=     yes
    <FONT color="#CC0000">[et cetera.]</FONT>
    
    <FONT color="#CC0000">[non-standard variables to be used in the rules below]</FONT>
    MY_FAVORITE_RESPONSE=  "yeah, right"
    
    <FONT color="#CC0000">[then the special rules, in the order they are called]</FONT>
    pre-fetch:
            i go fetch something, yeah
    
    post-patch:
            i need to do something after patch, great
    
    pre-install:
            and then some more stuff before installing, wow
    
    <FONT color="#CC0000">[and then the epilogue]</FONT>
    .include &lt;bsd.port.mk&gt;
</pre>
    </div>

    <div class="NAVFOOTER">
      <hr align="LEFT" width="100%">

      <table width="100%" border="0" cellpadding="0" cellspacing=
      "0">
        <tr>
          <td width="33%" align="left" valign="top"><a href= 
          "x1889.html">Prev</a></td>

          <td width="34%" align="center" valign="top"><a href= 
          "index.html">Home</a></td>

          <td width="33%" align="right" valign="top"><a href= 
          "porting-autoplist.html">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">If you are
          stuck...</td>

          <td width="34%" align="center" valign="top">&nbsp;</td>

          <td width="33%" align="right" valign="top">Automated
          package list creation</td>
        </tr>
      </table>
    </div>

    <p align="center"><small>For questions about the FreeBSD ports
    system, e-mail &lt;<a href=
    "mailto:ports@freebsd.org">ports@freebsd.org</a>&gt;.<br>
    For questions about this documentation, e-mail &lt;<a href= 
    "mailto:doc@freebsd.org">doc@freebsd.org</a>&gt;.</small></p>
  </body>
</html>


--wac7ysb48OaltWcw--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001201164053.A56563>