Diff for /wikisrc/pkgsrc/mk.conf.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:28:27 version 1.2, 2019/04/05 22:05:37
Line 1 Line 1
 **This article is a stub. You can help by editing it.**  
   
 The file **mk.conf** is the central configuration file for everything that has to do with building software. It is used by the BSD-style *Makefiles* in */usr/share/mk* and especially by [[pkgsrc/pkgsrc]]. Usually, it is found in the */etc* directory. If it doesn't exist there, feel free to create it.  
   
 Because all configuration takes place in a single file, there are some variables so the user can choose different configurations based on whether he is building the base system or packages from pkgsrc. These variables are:  
   
 * BSD_PKG_MK: Defined when a pkgsrc package is built.  
 * BUILDING_HTDOCS: Defined when the NetBSD web site is built.  
 * None of the above: When the base system is built. The file /usr/share/mk/bsd.README is a good place to start in this case.  
   
 A typical **mk.conf** file would look like this:  
 <pre><code>  
 # This is /etc/mk.conf  
 #  
   
 .if defined(BSD_PKG_MK) || defined(BUILDING_HTDOCS)  
 # The following lines apply to both pkgsrc and htdocs.  
   
 #...  
 LOCALBASE=          /usr/pkg  
 #...  
   
 .else  
 # The following lines apply to the base system.  
   
 WARNS= 4  
   
 .endif  
 </code></pre>  
   
   
   The file `mk.conf` is the central configuration file for everything that has to do with building software. It is used by the BSD-style `Makefiles` in `/usr/share/mk` and especially by pkgsrc. Usually, it is found in the `/etc` directory. If it doesn't exist there, feel free to create it.
   
   Because all configuration takes place in a single file, there are some variables so the user can choose different configurations based on whether he is building the base system or packages from pkgsrc. These variables are:
   
   * `BSD_PKG_MK`: Defined when a pkgsrc package is built.
   * `BUILDING_HTDOCS`: Defined when the NetBSD web site is built.
   * None of the above: When the base system is built. The file /usr/share/mk/bsd.README is a good place to start in this case. 
   
   A typical `mk.conf` file would look like this:
   <pre><code>
   # This is /etc/mk.conf
   #
   
   .if defined(BSD_PKG_MK) || defined(BUILDING_HTDOCS)
   # The following lines apply to both pkgsrc and htdocs.
   
   #...
   LOCALBASE=          /usr/pkg
   #...
   
   .else
   # The following lines apply to the base system.
   
   WARNS= 4
   
   .endif
   </code></pre>

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb