<html lang="en">
<head>
<title>Including Patterns - GNU Compiler Collection (GCC) Internals</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Compiler Collection (GCC) Internals">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Machine-Desc.html#Machine-Desc" title="Machine Desc">
<link rel="prev" href="Insn-Splitting.html#Insn-Splitting" title="Insn Splitting">
<link rel="next" href="Peephole-Definitions.html#Peephole-Definitions" title="Peephole Definitions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2015 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
``GNU Free Documentation License''.

(a) The FSF's Front-Cover Text is:

     A GNU Manual

(b) The FSF's Back-Cover Text is:

     You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Including-Patterns"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Peephole-Definitions.html#Peephole-Definitions">Peephole Definitions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Insn-Splitting.html#Insn-Splitting">Insn Splitting</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Machine-Desc.html#Machine-Desc">Machine Desc</a>
<hr>
</div>

<h3 class="section">16.17 Including Patterns in Machine Descriptions.</h3>

<p><a name="index-insn-includes-3706"></a>
<a name="index-include-3707"></a>The <code>include</code> pattern tells the compiler tools where to
look for patterns that are in files other than in the file
<samp><span class="file">.md</span></samp>.  This is used only at build time and there is no preprocessing allowed.

 <p>It looks like:

<pre class="smallexample">     
     (include
       <var>pathname</var>)
</pre>
 <p>For example:

<pre class="smallexample">     
     (include "filestuff")
     
</pre>
 <p>Where <var>pathname</var> is a string that specifies the location of the file,
specifies the include file to be in <samp><span class="file">gcc/config/target/filestuff</span></samp>.  The
directory <samp><span class="file">gcc/config/target</span></samp> is regarded as the default directory.

 <p>Machine descriptions may be split up into smaller more manageable subsections
and placed into subdirectories.

 <p>By specifying:

<pre class="smallexample">     
     (include "BOGUS/filestuff")
     
</pre>
 <p>the include file is specified to be in <samp><span class="file">gcc/config/</span><var>target</var><span class="file">/BOGUS/filestuff</span></samp>.

 <p>Specifying an absolute path for the include file such as;
<pre class="smallexample">     
     (include "/u2/BOGUS/filestuff")
     
</pre>
 <p>is permitted but is not encouraged.

<h4 class="subsection">16.17.1 RTL Generation Tool Options for Directory Search</h4>

<p><a name="index-directory-options-_002emd-3708"></a><a name="index-options_002c-directory-search-3709"></a><a name="index-search-options-3710"></a>
The <samp><span class="option">-I</span><var>dir</var></samp> option specifies directories to search for machine descriptions. 
For example:

<pre class="smallexample">     
     genrecog -I/p1/abc/proc1 -I/p2/abcd/pro2 target.md
     
</pre>
 <p>Add the directory <var>dir</var> to the head of the list of directories to be
searched for header files.  This can be used to override a system machine definition
file, substituting your own version, since these directories are
searched before the default machine description file directories.  If you use more than
one <samp><span class="option">-I</span></samp> option, the directories are scanned in left-to-right
order; the standard default directory come after.

 </body></html>