| @@ -187,27 +187,27 @@ builds) | | | @@ -187,27 +187,27 @@ builds) |
187 | <dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt> | | 187 | <dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt> |
188 | </dl></dd> | | 188 | </dl></dd> |
189 | <dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt> | | 189 | <dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt> |
190 | <dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt> | | 190 | <dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt> |
191 | </dl></dd> | | 191 | </dl></dd> |
192 | <dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt> | | 192 | <dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt> |
193 | <dd><dl> | | 193 | <dd><dl> |
194 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> | | 194 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> |
195 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> | | 195 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> |
196 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> | | 196 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> |
197 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> | | 197 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> |
198 | <dd><dl> | | 198 | <dd><dl> |
199 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> | | 199 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> |
200 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exacty as-is</a></span></dt> | | 200 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exactly as-is</a></span></dt> |
201 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> | | 201 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> |
202 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> | | 202 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> |
203 | </dl></dd> | | 203 | </dl></dd> |
204 | </dl></dd> | | 204 | </dl></dd> |
205 | <dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> | | 205 | <dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> |
206 | <dd><dl> | | 206 | <dd><dl> |
207 | <dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> | | 207 | <dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> |
208 | <dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> | | 208 | <dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> |
209 | <dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt> | | 209 | <dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt> |
210 | <dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> | | 210 | <dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> |
211 | <dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> | | 211 | <dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> |
212 | <dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> | | 212 | <dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> |
213 | <dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> | | 213 | <dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> |
| @@ -2801,27 +2801,27 @@ anymore, you can remove that file and ru | | | @@ -2801,27 +2801,27 @@ anymore, you can remove that file and ru |
2801 | <dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt> | | 2801 | <dt><span class="sect2"><a href="#components.optional.none">11.5.3. Files affecting nothing at all</a></span></dt> |
2802 | </dl></dd> | | 2802 | </dl></dd> |
2803 | <dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt> | | 2803 | <dt><span class="sect1"><a href="#work-dir">11.6. <code class="filename">work*</code></a></span></dt> |
2804 | <dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt> | | 2804 | <dt><span class="sect1"><a href="#files-dir">11.7. <code class="filename">files/*</code></a></span></dt> |
2805 | </dl></dd> | | 2805 | </dl></dd> |
2806 | <dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt> | | 2806 | <dt><span class="chapter"><a href="#makefile">12. Programming in <code class="filename">Makefile</code>s</a></span></dt> |
2807 | <dd><dl> | | 2807 | <dd><dl> |
2808 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> | | 2808 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> |
2809 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> | | 2809 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> |
2810 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> | | 2810 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> |
2811 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> | | 2811 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> |
2812 | <dd><dl> | | 2812 | <dd><dl> |
2813 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> | | 2813 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> |
2814 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exacty as-is</a></span></dt> | | 2814 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exactly as-is</a></span></dt> |
2815 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> | | 2815 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> |
2816 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> | | 2816 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> |
2817 | </dl></dd> | | 2817 | </dl></dd> |
2818 | </dl></dd> | | 2818 | </dl></dd> |
2819 | <dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> | | 2819 | <dt><span class="chapter"><a href="#plist">13. PLIST issues</a></span></dt> |
2820 | <dd><dl> | | 2820 | <dd><dl> |
2821 | <dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> | | 2821 | <dt><span class="sect1"><a href="#rcs-id">13.1. RCS ID</a></span></dt> |
2822 | <dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> | | 2822 | <dt><span class="sect1"><a href="#automatic-plist-generation">13.2. Semi-automatic <code class="filename">PLIST</code> generation</a></span></dt> |
2823 | <dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt> | | 2823 | <dt><span class="sect1"><a href="#print-PLIST">13.3. Tweaking output of <span class="command"><strong>make print-PLIST</strong></span></a></span></dt> |
2824 | <dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> | | 2824 | <dt><span class="sect1"><a href="#plist.misc">13.4. Variable substitution in PLIST</a></span></dt> |
2825 | <dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> | | 2825 | <dt><span class="sect1"><a href="#manpage-compression">13.5. Man page compression</a></span></dt> |
2826 | <dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> | | 2826 | <dt><span class="sect1"><a href="#using-PLIST_SRC">13.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></a></span></dt> |
2827 | <dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> | | 2827 | <dt><span class="sect1"><a href="#platform-specific-plist">13.7. Platform-specific and differing PLISTs</a></span></dt> |
| @@ -4004,27 +4004,27 @@ FILESDIR=${.CURDIR}/../xemacs/files | | | @@ -4004,27 +4004,27 @@ FILESDIR=${.CURDIR}/../xemacs/files |
4004 | </div> | | 4004 | </div> |
4005 | <div class="chapter"> | | 4005 | <div class="chapter"> |
4006 | <div class="titlepage"><div><div><h2 class="title"> | | 4006 | <div class="titlepage"><div><div><h2 class="title"> |
4007 | <a name="makefile"></a>Chapter 12. Programming in <code class="filename">Makefile</code>s</h2></div></div></div> | | 4007 | <a name="makefile"></a>Chapter 12. Programming in <code class="filename">Makefile</code>s</h2></div></div></div> |
4008 | <div class="toc"> | | 4008 | <div class="toc"> |
4009 | <p><b>Table of Contents</b></p> | | 4009 | <p><b>Table of Contents</b></p> |
4010 | <dl class="toc"> | | 4010 | <dl class="toc"> |
4011 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> | | 4011 | <dt><span class="sect1"><a href="#makefile.style">12.1. Caveats</a></span></dt> |
4012 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> | | 4012 | <dt><span class="sect1"><a href="#makefile.variables">12.2. <code class="filename">Makefile</code> variables</a></span></dt> |
4013 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> | | 4013 | <dd><dl><dt><span class="sect2"><a href="#makefile.variables.names">12.2.1. Naming conventions</a></span></dt></dl></dd> |
4014 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> | | 4014 | <dt><span class="sect1"><a href="#makefile.code">12.3. Code snippets</a></span></dt> |
4015 | <dd><dl> | | 4015 | <dd><dl> |
4016 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> | | 4016 | <dt><span class="sect2"><a href="#adding-to-list">12.3.1. Adding things to a list</a></span></dt> |
4017 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exacty as-is</a></span></dt> | | 4017 | <dt><span class="sect2"><a href="#echo-literal">12.3.2. Echoing a string exactly as-is</a></span></dt> |
4018 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> | | 4018 | <dt><span class="sect2"><a href="#cflags-gnu-configure">12.3.3. Passing <code class="varname">CFLAGS</code> to GNU configure scripts</a></span></dt> |
4019 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> | | 4019 | <dt><span class="sect2"><a href="#empty-variables">12.3.4. Handling possibly empty variables</a></span></dt> |
4020 | </dl></dd> | | 4020 | </dl></dd> |
4021 | </dl> | | 4021 | </dl> |
4022 | </div> | | 4022 | </div> |
4023 | <p>Pkgsrc consists of many <code class="filename">Makefile</code> fragments, | | 4023 | <p>Pkgsrc consists of many <code class="filename">Makefile</code> fragments, |
4024 | each of which forms a well-defined part of the pkgsrc system. Using | | 4024 | each of which forms a well-defined part of the pkgsrc system. Using |
4025 | 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> system as a programming language for a big system | | 4025 | 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> system as a programming language for a big system |
4026 | like pkgsrc requires some discipline to keep the code correct and | | 4026 | like pkgsrc requires some discipline to keep the code correct and |
4027 | understandable.</p> | | 4027 | understandable.</p> |
4028 | <p>The basic ingredients for <code class="filename">Makefile</code> | | 4028 | <p>The basic ingredients for <code class="filename">Makefile</code> |
4029 | programming are variables (which are actually macros) and shell | | 4029 | programming are variables (which are actually macros) and shell |
4030 | commands. Among these shell commands may even be more complex ones | | 4030 | commands. Among these shell commands may even be more complex ones |
| @@ -4144,27 +4144,27 @@ modifier. | | | @@ -4144,27 +4144,27 @@ modifier. |
4144 | <p>When adding another list to a list (example 2), it must not be | | 4144 | <p>When adding another list to a list (example 2), it must not be |
4145 | quoted, since its elements are already quoted.</p> | | 4145 | quoted, since its elements are already quoted.</p> |
4146 | <pre class="programlisting"> | | 4146 | <pre class="programlisting"> |
4147 | STRING= foo * bar `date` | | 4147 | STRING= foo * bar `date` |
4148 | LIST= # empty | | 4148 | LIST= # empty |
4149 | ANOTHER_LIST= a=b c=d | | 4149 | ANOTHER_LIST= a=b c=d |
4150 | | | 4150 | |
4151 | LIST+= ${STRING:Q} # 1 | | 4151 | LIST+= ${STRING:Q} # 1 |
4152 | LIST+= ${ANOTHER_LIST} # 2 | | 4152 | LIST+= ${ANOTHER_LIST} # 2 |
4153 | </pre> | | 4153 | </pre> |
4154 | </div> | | 4154 | </div> |
4155 | <div class="sect2"> | | 4155 | <div class="sect2"> |
4156 | <div class="titlepage"><div><div><h3 class="title"> | | 4156 | <div class="titlepage"><div><div><h3 class="title"> |
4157 | <a name="echo-literal"></a>12.3.2. Echoing a string exacty as-is</h3></div></div></div> | | 4157 | <a name="echo-literal"></a>12.3.2. Echoing a string exactly as-is</h3></div></div></div> |
4158 | <p>Echoing a string containing special characters needs special | | 4158 | <p>Echoing a string containing special characters needs special |
4159 | work.</p> | | 4159 | work.</p> |
4160 | <pre class="programlisting"> | | 4160 | <pre class="programlisting"> |
4161 | STRING= foo bar < > * `date` $$HOME ' " | | 4161 | STRING= foo bar < > * `date` $$HOME ' " |
4162 | EXAMPLE_ENV= string=${STRING:Q} x=multiple\ quoted\ words | | 4162 | EXAMPLE_ENV= string=${STRING:Q} x=multiple\ quoted\ words |
4163 | | | 4163 | |
4164 | all: | | 4164 | all: |
4165 | echo ${STRING} # 1 | | 4165 | echo ${STRING} # 1 |
4166 | echo ${STRING:Q} # 2 | | 4166 | echo ${STRING:Q} # 2 |
4167 | printf '%s\n' ${STRING:Q}'' # 3 | | 4167 | printf '%s\n' ${STRING:Q}'' # 3 |
4168 | env ${EXAMPLE_ENV} sh -c 'echo "$$string"; echo "$$x"' # 4 | | 4168 | env ${EXAMPLE_ENV} sh -c 'echo "$$string"; echo "$$x"' # 4 |
4169 | </pre> | | 4169 | </pre> |
4170 | <p>Example 1 leads to a syntax error in the shell, as the characters | | 4170 | <p>Example 1 leads to a syntax error in the shell, as the characters |