📄 ref.include-files.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_files</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="include_dir"HREF="ref.include-dir.html"><LINKREL="NEXT"TITLE="legal_values"HREF="ref.legal-values.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.include-dir.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="ref.legal-values.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="REF.INCLUDE-FILES"><SPANCLASS="PROPERTY">include_files</SPAN></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN4577"></A><H2>Name</H2>Property <SPANCLASS="PROPERTY">include_files</SPAN> -- List the header files that are exported by a package.</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN4581"><H2>Synopsis</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SYNOPSIS">cdl_package <name> { include_files <file1> … …}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4583"></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. Forpackages which do not follow these conventions, typically simple onesfor which a complicated sub-directory hierarchy is undesirable, therehas to be an alternative way of specifying which header file or filesdefine the public interface. The <SPANCLASS="PROPERTY">include_files</SPAN> property providessupport for this.</P><P>By default, if a package does not have an<TTCLASS="FILENAME">include</TT> subdirectory and itdoes not have an <SPANCLASS="PROPERTY">include_files</SPAN> property then all files with a suffixof <TTCLASS="LITERAL">.h</TT>, <TTCLASS="LITERAL">.hxx</TT>,<TTCLASS="LITERAL">.inl</TT> or <TTCLASS="LITERAL">.inc</TT> will be treated aspublic header files. However some of these may be private filescontaining implementation details. If there is an<SPANCLASS="PROPERTY">include_files</SPAN> property then only the files listed in that propertywill be exported.</P><P>If a package should not export any header files but does containprivate implementation headers, an <SPANCLASS="PROPERTY">include_files</SPAN> property with noarguments should be used.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4601"></A><H2>Example</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">cdl_package <SOME_PACKAGE> { … include_dir <some directory> include_files interface.h}cdl_package <ANOTHER_PACKAGE> { … include_files}</PRE></TD></TR></TABLE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4604"></A><H2>See Also</H2><P>Property <AHREF="ref.include-dir.html"><SPANCLASS="PROPERTY">include_dir</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.include-dir.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.legal-values.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><SPANCLASS="PROPERTY">include_dir</SPAN></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="reference.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><SPANCLASS="PROPERTY">legal_values</SPAN></TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -