pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc regen.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/71a7d332a891
branches:  trunk
changeset: 503477:71a7d332a891
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Nov 21 09:40:30 2005 +0000

description:
regen.

diffstat:

 doc/pkgsrc.html |  90 +++++++++++++++++++++++++++++++++++++++++++++++---------
 doc/pkgsrc.txt  |  52 ++++++++++++++++++++++++--------
 2 files changed, 113 insertions(+), 29 deletions(-)

diffs (266 lines):

diff -r 23983fbb75dc -r 71a7d332a891 doc/pkgsrc.html
--- a/doc/pkgsrc.html   Mon Nov 21 09:33:39 2005 +0000
+++ b/doc/pkgsrc.html   Mon Nov 21 09:40:30 2005 +0000
@@ -870,7 +870,11 @@
                     defines</a></span></dt>
 
                     <dt><span class="sect2"><a href=
-                    "#cpp-list">15.4.2. Getting a list of CPP
+                    "#cpp-list-examples">15.4.2. Examples of CPP
+                    defines for some platforms</a></span></dt>
+
+                    <dt><span class="sect2"><a href=
+                    "#cpp-list">15.4.3. Getting a list of CPP
                     defines</a></span></dt>
                   </dl>
                 </dd>
@@ -6331,7 +6335,11 @@
                   defines</a></span></dt>
 
                   <dt><span class="sect2"><a href=
-                  "#cpp-list">15.4.2. Getting a list of CPP
+                  "#cpp-list-examples">15.4.2. Examples of CPP
+                  defines for some platforms</a></span></dt>
+
+                  <dt><span class="sect2"><a href=
+                  "#cpp-list">15.4.3. Getting a list of CPP
                   defines</a></span></dt>
                 </dl>
               </dd>
@@ -11623,7 +11631,11 @@
                 <dt><span class="sect2"><a href=
                 "#cpp-defines">15.4.1. CPP defines</a></span></dt>
 
-                <dt><span class="sect2"><a href="#cpp-list">15.4.2.
+                <dt><span class="sect2"><a href=
+                "#cpp-list-examples">15.4.2. Examples of CPP
+                defines for some platforms</a></span></dt>
+
+                <dt><span class="sect2"><a href="#cpp-list">15.4.3.
                 Getting a list of CPP defines</a></span></dt>
               </dl>
             </dd>
@@ -12983,9 +12995,9 @@
               <pre class="programlisting">
     #include &lt;sys/param.h&gt;
     #if (defined(BSD) &amp;&amp; BSD &gt;= 199306)
-      /* your BSD-specific code goes here */
+      /* BSD-specific code goes here */
     #else
-      /* non-BSD-specific code */
+      /* non-BSD-specific code goes here */
     #endif
 </pre>
 
@@ -12998,7 +13010,7 @@
     Linux       linux, __linux, __linux__
     NetBSD      __NetBSD__
     OpenBSD     __OpenBSD__
-    Solaris     sun, __sun (GCC and SunPro), __sun__ (only GCC)
+    Solaris     sun, __sun
 </pre>
             </div>
 
@@ -13032,7 +13044,51 @@
               </div>
               <pre class="programlisting">
     GCC         __GNUC__ (major version), __GNUC_MINOR__
-</pre>
+    SunPro      __SUNPRO_C (0x570 for version 5.7)
+</pre>
+            </div>
+          </div>
+
+          <div class="sect2" lang="en" xml:lang="en">
+            <div class="titlepage">
+              <div>
+                <div>
+                  <h3 class="title"><a name="cpp-list-examples" id=
+                  "cpp-list-examples"></a>15.4.2.&nbsp;Examples of
+                  CPP defines for some platforms</h3>
+                </div>
+              </div>
+            </div>
+
+            <p>The list of the CPP identification macros for
+            hardware and operating system may depend on the
+            compiler that is used. The following list contains some
+            examples that may help you to choose the right ones.
+            For example, if you want to conditionally compile code
+            on Solaris, don't use <code class=
+            "varname">__sun__</code>, as the SunPro compiler does
+            not define it. Use <code class="varname">__sun</code>
+            instead.</p>
+
+            <div class="variablelist">
+              <dl>
+                <dt><span class="term">SunPro 5.7 + Solaris 8 +
+                SPARC</span></dt>
+
+                <dd>
+                  <p>__SVR4, __sparc, __sun, __unix, sparc, sun,
+                  unix.</p>
+                </dd>
+
+                <dt><span class="term">GCC 4 + Solaris 8 +
+                SPARC</span></dt>
+
+                <dd>
+                  <p>__ELF__, __sparc, __sparc__, __sun, __sun__,
+                  __SVR4, __svr4__, __unix, __unix__, sparc, sun,
+                  unix.</p>
+                </dd>
+              </dl>
             </div>
           </div>
 
@@ -13041,19 +13097,23 @@
               <div>
                 <div>
                   <h3 class="title"><a name="cpp-list" id=
-                  "cpp-list"></a>15.4.2.&nbsp;Getting a list of CPP
+                  "cpp-list"></a>15.4.3.&nbsp;Getting a list of CPP
                   defines</h3>
                 </div>
               </div>
             </div>
 
-            <p>When your system uses the GNU C Compiler, you can
-            get a list of symbols that are defined by default, e.g.
-            to identify the platform, with the following
-            command:</p>
+            <p>If your system uses the GNU C Compiler, you can get
+            a list of symbols that are defined by default, e.g. to
+            identify the platform, with the following command:</p>
             <pre class="programlisting">
     gcc -E -dM - &lt; /dev/null 
 </pre>
+
+            <p>On other systems you may get the list by using the
+            system's syscall trace utility (ktrace, truss, strace)
+            to have a look which arguments are passed to the actual
+            compiler.</p>
           </div>
         </div>
 
@@ -14778,9 +14838,9 @@
 </pre>
 
           <p>Depending on the supplied command line arguments (see
-          pkglint(1)), more verbose checks will be performed. Use
-          e.g. <span><strong class="command">pkglint
-          -v</strong></span> for a very verbose check.</p>
+          pkglint(1)), more checks will be performed. Use e.g.
+          <span><strong class="command">pkglint -Call
+          -Wall</strong></span> for a very thorough check.</p>
         </div>
       </div>
 
diff -r 23983fbb75dc -r 71a7d332a891 doc/pkgsrc.txt
--- a/doc/pkgsrc.txt    Mon Nov 21 09:33:39 2005 +0000
+++ b/doc/pkgsrc.txt    Mon Nov 21 09:40:30 2005 +0000
@@ -245,7 +245,8 @@
         15.4. Building the package
 
             15.4.1. CPP defines
-            15.4.2. Getting a list of CPP defines
+            15.4.2. Examples of CPP defines for some platforms
+            15.4.3. Getting a list of CPP defines
 
         15.5. Package specific actions
 
@@ -2280,7 +2281,8 @@
     15.4. Building the package
 
         15.4.1. CPP defines
-        15.4.2. Getting a list of CPP defines
+        15.4.2. Examples of CPP defines for some platforms
+        15.4.3. Getting a list of CPP defines
 
     15.5. Package specific actions
 
@@ -4387,7 +4389,8 @@
 15.4. Building the package
 
     15.4.1. CPP defines
-    15.4.2. Getting a list of CPP defines
+    15.4.2. Examples of CPP defines for some platforms
+    15.4.3. Getting a list of CPP defines
 
 15.5. Package specific actions
 
@@ -4947,9 +4950,9 @@
 
     #include <sys/param.h>
     #if (defined(BSD) && BSD >= 199306)
-      /* your BSD-specific code goes here */
+      /* BSD-specific code goes here */
     #else
-      /* non-BSD-specific code */
+      /* non-BSD-specific code goes here */
     #endif
 
 If this distinction is not fine enough, you can also use the following defines.
@@ -4960,7 +4963,7 @@
     Linux       linux, __linux, __linux__
     NetBSD      __NetBSD__
     OpenBSD     __OpenBSD__
-    Solaris     sun, __sun (GCC and SunPro), __sun__ (only GCC)
+    Solaris     sun, __sun
 
 15.4.1.2. CPP defines for CPUs
 
@@ -4971,15 +4974,36 @@
 15.4.1.3. CPP defines for compilers
 
     GCC         __GNUC__ (major version), __GNUC_MINOR__
-
-15.4.2. Getting a list of CPP defines
-
-When your system uses the GNU C Compiler, you can get a list of symbols that
-are defined by default, e.g. to identify the platform, with the following
-command:
+    SunPro      __SUNPRO_C (0x570 for version 5.7)
+
+15.4.2. Examples of CPP defines for some platforms
+
+The list of the CPP identification macros for hardware and operating system may
+depend on the compiler that is used. The following list contains some examples
+that may help you to choose the right ones. For example, if you want to
+conditionally compile code on Solaris, don't use __sun__, as the SunPro
+compiler does not define it. Use __sun instead.
+
+SunPro 5.7 + Solaris 8 + SPARC
+
+    __SVR4, __sparc, __sun, __unix, sparc, sun, unix.
+
+GCC 4 + Solaris 8 + SPARC
+
+    __ELF__, __sparc, __sparc__, __sun, __sun__, __SVR4, __svr4__, __unix,
+    __unix__, sparc, sun, unix.
+
+15.4.3. Getting a list of CPP defines
+
+If your system uses the GNU C Compiler, you can get a list of symbols that are
+defined by default, e.g. to identify the platform, with the following command:
 
     gcc -E -dM - < /dev/null
 
+On other systems you may get the list by using the system's syscall trace
+utility (ktrace, truss, strace) to have a look which arguments are passed to
+the actual compiler.
+
 15.5. Package specific actions
 
 15.5.1. User interaction
@@ -5643,8 +5667,8 @@
 $ pkglint
 looks fine.
 
-Depending on the supplied command line arguments (see pkglint(1)), more verbose
-checks will be performed. Use e.g. pkglint -v for a very verbose check.
+Depending on the supplied command line arguments (see pkglint(1)), more checks
+will be performed. Use e.g. pkglint -Call -Wall for a very thorough check.
 
 A.2. Steps for building, installing, packaging
 



Home | Main Index | Thread Index | Old Index