📄 ref.include-dir.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>include_dir</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="The eCos Component Writer's Guide"HREF="cdl-guide.html"><LINKREL="UP"TITLE="CDL Language Specification"HREF="reference.html"><LINKREL="PREVIOUS"TITLE="implements"HREF="ref.implements.html"><LINKREL="NEXT"TITLE="include_files"HREF="ref.include-files.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The <SPANCLASS="APPLICATION">eCos</SPAN> Component Writer's Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="ref.implements.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ref.include-files.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="REF.INCLUDE-DIR"><SPANCLASS="PROPERTY">include_dir</SPAN></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN4534"></A><H2>Name</H2>Property <SPANCLASS="PROPERTY">include_dir</SPAN> -- Specify the desired location of a package's exportedheader files in the install tree.</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN4538"><H2>Synopsis</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SYNOPSIS">cdl_package <name> { include_dir <sub-directory> …}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4540"></A><H2>Description</H2><P>Most packages export one or more header files defining their publicinterface. For example the C library exports header files such as<TTCLASS="FILENAME">stdio.h</TT> and<TTCLASS="FILENAME">ctype.h</TT>. If the package follows the <AHREF="package.html#PACKAGE.HIERARCHY">directorylayout conventions</A> then the exported header files will normallybe found in the package's<TTCLASS="FILENAME">include</TT> sub-directory.Alternatively the <SPANCLASS="PROPERTY">include_files</SPAN> property can be used to specifywhich header files should be exported.</P><P>By default a package's exported header files will be copied tothe <TTCLASS="FILENAME">include</TT> sub-directory ofthe install tree. This is correct for packages like the C librarybecause that is the correct location for files such as<TTCLASS="FILENAME">stdio.h</TT>. However to reduce theprobability of name clashes it is desirable for packages to usedifferent sub-directories, for example infrastructure header files getcopied to <TTCLASS="FILENAME">include/cyg/infra</TT>rather than to the top-level<TTCLASS="FILENAME">include</TT> directory itself.</P><P>It would be possible to replicate these sub-directories in eachpackage's source tree, such that the infrastructure header filesources lived in<TTCLASS="FILENAME">include/cyg/infra</TT> in the sourcetree as well as in the install tree. This would make things moredifficult for the package developers. Instead it is possible tospecify the desired install tree sub-directory using an <SPANCLASS="PROPERTY">include_dir</SPAN>property, for example <TTCLASS="LITERAL">include_dir cyg/infra</TT>.</P><P>The <SPANCLASS="PROPERTY">include_dir</SPAN> property can only be used in the body of a<TTCLASS="LITERAL">cdl_package</TT> command, since it applies to all of the header filesexported by a package, and only one <SPANCLASS="PROPERTY">include_dir</SPAN> property can beused. If there is no <SPANCLASS="PROPERTY">include_dir</SPAN> property then exported header fileswill end up in the top-level <TTCLASS="FILENAME">include</TT>directory of the install tree.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4563"></A><H2>Example</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_package CYGPKG_INFRA { display "Infrastructure" include_dir cyg/infra description " Common types and useful macros. Tracing and assertion facilities. Package startup options." …}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4566"></A><H2>See Also</H2><P>Property <AHREF="ref.include-files.html"><SPANCLASS="PROPERTY">include_files</SPAN></A>, andcommand <AHREF="ref.cdl-package.html"><TTCLASS="LITERAL">cdl_package</TT></A>.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="ref.implements.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="cdl-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="ref.include-files.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><SPANCLASS="PROPERTY">implements</SPAN></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="reference.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><SPANCLASS="PROPERTY">include_files</SPAN></TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -