⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.texi

📁 早期freebsd实现
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@item Rename @file{Makefile} to @file{Makefile.in}@end tableAt this point you should have a program that can be configured usingCygnus @code{configure}.@node Hosts and Targets, Sites, Programs, Porting@section Adding hosts and targetsTo add a host or target to a program that already uses Cygnusconfigure, do the following.@itemize @bullet@itemMake sure the new configuration name is represented in@file{config.sub}.  If not, add it.  For more details, see the commentsin the shell script @file{config.sub}.@itemIf you are adding a host configuration, look in @file{configure.in}, inthe per-host section.  Make sure that your configuration name isrepresented in the mapping from host configuration names toconfiguration files.  If not, add it.  Also see @ref{configure.in}.@itemIf you are adding a target configuration, look in @file{configure.in},in the per-target section.  Make sure that your configuration name isrepresented in the mapping from target configuration names toconfiguration files.  If not, add it.  Also see @ref{configure.in}.@itemLook in @file{configure.in} for the variables @samp{files},@samp{links}, @samp{host_makefile_frag}, and@samp{target_makefile_frag}.  The values assigned to these variables arethe names of the configuration files, relative to @code{srcdir} that theprogram uses.  Make sure that copies of the files exist for your host.If not, create them.  See also @ref{Configure Variables}.@end itemizeThis should be enough to configure for a new host or targetconfiguration name.  Getting the program to compile and run properlyremains the hard work of the port.@node Sites,  , Hosts and Targets, Porting@section Adding site infoIf some of the Makefile defaults are not right for your site, you canbuild site specific Makefile fragments.  To do this, do the following.@itemize @bullet@itemChoose a name for your site.  It must be less than eleven characters fornow.@itemIf the program source does not have a @file{./config} directory, create it.@itemCreate a file called @file{./config/ms-@var{site}} where @var{site} isthe name of your site.  In it, set whatever Makefile variables you needto override to match your site's conventions.@itemConfigure the program with:@exampleconfigure @dots{} +site=@var{site}@end example@end itemize@node Reference, Known Bugs, Porting, top@chapter Gory details described@cindex BackendsHere we describe the backend support.@menu* Makefile Extensions::		Extensions to the @sc{gnu} coding standards* configure.in::		The format of the configure.in file* config.status::		config.status* Makefile Fragments::		Makefile Fragments@end menu@node Makefile Extensions, configure.in, Reference, Reference@section Extensions to the @sc{gnu} coding standards@cindex Makefile extensions@cindex Cygnus extensionsThe following additions to the @sc{gnu} coding standards are requiredfor Cygnus configure to work properly.@itemize @bullet@itemThe Makefile must contain exactly one line starting with @code{####}.This line should follow any default macro definitions but precede anyrules.  Host, target, and site specific Makefile fragments will beinserted immediately after this line.  If the line is missing, thefragments will not be inserted.@end itemizeCygnus adds the following targets to our Makefiles.  Their existence isnot required for Cygnus configure, but they are documented here forcompleteness.@table @code@kindex info@item infoBuild all info files from texinfo source.@kindex install-info@item install-infoInstall all info files.@kindex clean-info@item clean-infoRemove all info files and any intermediate files that can be generatedfrom texinfo source.@kindex stage1@item stage1@kindex stage2@itemx stage2@kindex stage3@itemx stage3@kindex stage4@itemx stage4@kindex de-stage1@itemx de-stage1@kindex de-stage2@itemx de-stage2@kindex de-stage3@itemx de-stage3@kindex de-stage4@itemx de-stage4@kindex bootstrap@itemx bootstrap@kindex comparison@itemx comparison@kindex Makefile@itemx MakefileThese targets are in transition and may be removed shortly.@end tableIn addition, the following Makefile targets have revised semantics:@table @code@kindex install@item installShould @emph{not} depend on the target @code{all}.  If the program isnot already built, @code{make install} should fail.  This allows youto install programs even when @code{make} would otherwise determinethem to be out of date.  This can happen when the result of a @code{makeall} is transported via tape to another machine for installation aswell as in a number of other cases.@kindex clean@item cleanShould remove any file that can be regenerated by the Makefile,excepting only the Makefile itself, and any links created by configure.That is, @code{make all clean} should return all directories to theiroriginal condition.  If this is not done, then:@exampleconfigure @var{host1} ; make all clean ; configure @var{host2} ; make all@end example@noindentwill fail because of intermediate files intended for @var{host1}.@end tableCygnus adds the following macros to all @file{Makefile.in} files, butyou are not required to use them to run Cygnus configure.@table @code@kindex docdir@item docdirThe directory in which to install any documentation that is not either aman page or an info file.  For man pages, see mandir, for info, seeinfodir.@kindex includedir@item includedirThe directory in which to install any headers files that should be madeavailable to users.  This is distinct from the @code{gcc} includedirectory which is intended for @code{gcc} only.  Files in@code{includedir} may be used by @code{cc} as well.@end tableIn addition, the following macros have revised semantics.  Most of themdescribe installation directories; see also @ref{Install Details,,Fulldescription of all installation subdirectories}.@table @code@kindex manext@item manextis not used.  The intended usage is not clear.  For example, if you have a@file{foo.man} and a @file{bar.man}, and @file{foo.man} is destined for@file{/usr/local/lib/man/man1/foo.1} while @file{bar.man} is destinedfor @file{/usr/local/lib/man/man5/bar.5}, then what is the desired valueof @code{manext}?@kindex datadir@item datadiris used for host independent data files.@kindex mandir@item mandirThe default path for @code{mandir} depends on @code{prefix}.@kindex infodir@item infodirThe default path for @code{infodir} depends on @code{prefix}.@kindex BISON@item BISONis assumed to have a @code{yacc} calling convention.  To  use@code{bison}, use @code{BISON=bison -y}.@end tableCygnus Makefiles also conform to one additional restriction:@itemize @bullet@itemWhen libraries are installed, the line containing the call to@code{INSTALL_DATA} should always be followed by a line containing acall to @code{RANLIB} on the installed library.  This is to accomodatesystems that use @code{ranlib}.  Systems that do not use @code{ranlib}can set @code{RANLIB} to @code{echo} in a host specific Makefilefragment.@end itemize@node configure.in, config.status, Makefile Extensions, Reference@section The format of the @file{configure.in} file@kindex configure.inA @file{configure.in} file for Cygnus configure consists of a@dfn{per-invocation} section, followed by a @dfn{per-host} section,followed by a @dfn{per-target} section, optionally followed by a@dfn{post-target} section.  Each section is a shell script fragment,which is sourced by the configure shell script at an appropriate time.Values are passed among configure and the shell fragments through aset of shell variables.  When each section is being interpreted(sourced) by the shell, the shell's current directory is the builddirectory, and any files created by the section (or referred to by thesection) will be relative to the build directory.  To reference filesin other places (such as the source directory), prepend a shellvariable such as @code{srcdir} to the desired file name.@cindex Per-invocation sectionThe beginning of the @file{configure.in} file begins the per-invocationsection.@cindex Per-host sectionA line beginning with @code{# Per-host:} begins the per-host section.@cindex Per-target sectionA line beginning with @code{# Per-target:} begins the per-targetsection.@cindex Post-target sectionIf it exists, the post-target section begins with @code{# Per-target:}.@menu* Minimal::			A minimal configure.in* Configure Variables::		Variables available to configure.in* Declarations::		For each invocation* Per-host::			For each host* Per-target::			For each target* Post-target::			After each target* Example::			An example configure.in@end menu@node Minimal, Configure Variables, configure.in, configure.in@subsection A minimal @file{configure.in}@cindex Minimal @file{configure.in} exampleA minimal @file{configure.in} consists of four lines.@examplesrctrigger=foo.csrcname="source for the foo program"# Per-host:# Per-target:@end exampleThe @samp{Per-host} and @samp{Per-target} lines divide the file into thethree required sections.  The @samp{srctrigger} line names a file.@code{configure} checks to see that this file exists in the sourcedirectory before configuring.  If the @samp{srctrigger} file does notexist, @code{configure} uses the value of @samp{srcname} to print anerror message about not finding the source.This particular example uses no links, and only the default host,target, and site specific Makefile fragments if they exist.@node Configure Variables, Declarations, Minimal, configure.in@subsection Variables available to configure.in@cindex @file{configure.in} interfaceThe following variables pass information between the standard parts of@code{configure} and the shell-script fragments in @file{configure.in}:@defvar{srctrigger}Contains the name of a source file that is expected to live in thesource directory.  You must usually set this in the per-invocationsection of @file{configure.in}.  Configure tests to see that this fileexists.  If the file does not exist, configure prints an error message.This is used as a sanity check that configure.in matches the sourcedirectory.@end defvar@defvar{srcname}Contains the name of the source collection contained in the sourcedirectory.  You must usually set this in the per-invocation section of@file{configure.in}.  If the file named in @code{srctrigger} does notexist, configure uses the value of this variable when it prints theerror message.@end defvar@defvar{configdirs}Contains the names of any subdirectories where @code{configure} shouldrecur.  You must usually set this in the per-invocation section of@file{configure.in}.If @file{Makefile.in} contains a line starting with @code{SUBDIRS =},then it will be replaced with an assignment to @code{SUBDIRS} usingthe value of @code{configdirs} (if @code{subdirs} is empty).  This canbe used to determine which directories to configure and build dependingon the host and target configurations.@c Most other matching makefile/config vars use the same name.  Why not@c this? (FIXME).@c Can we get rid of SUBDIRS-substitution?  It doesn't work well with subdirs.Use @code{configdirs} (instead of the @code{subdirs} variabledescribed below) if you want to be able to partition thesub-directories, or use independent Makefile fragments.Each sub-directory can be independent, and independently re-configured.@end defvar

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -