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

📄 configure.texi

📁 早期freebsd实现
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
			  subdirectories@end menu@node prefix, exec_prefix, Install Locations, Install Locations@subsection Changing the default install directory@cindex Changing the default install directory@cindex Prefix directoryIn the default configuration, all files are installed in subdirectoriesof @file{/usr/local}.  The location is determined by the value ofthe @code{configure} variable @code{prefix}; in turn, this determines thevalue of the Makefile variable of the same name (@code{prefix}).You can also set the value of the Makefile variable @code{prefix}explicitly each time you invoke @code{make} if you are so inclined; butbecause many programs have this location compiled in, you must specifythe @code{prefix} value consistently on each invocation of @code{make},or you will end up with a broken installation.To make this easier, the value of the @code{configure} variable@code{prefix} can be set on the command line to @code{configure}using the option @code{-prefix=}.  @node exec_prefix, Install Details, prefix, Install Locations@subsection Installing for multiple hosts@cindex Configuring for multiple hosts@cindex Sharing host independent files@cindex The @file{exec_prefix} directory@cindex Installing host independent filesBy default, host dependent files are installed in subdirectories of@file{@var{exec_prefix}}.  The location is determined by the value of the@code{configure} variable @code{exec_prefix}, which determines the value ofthe Makefile variable @code{exec_prefix}.  This makes it simpler to installfor a single host, and simplifies changing the default location for theinstall tree; but the default doesn't allow for multiple hosts toeffectively share host independent files.To configure so that multiple hosts can share common files, usesomething like:@exampleconfigure @var{host1} -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host1make all info install install-info cleanconfigure @var{host2} -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host2make all info install install-info@end exampleThe first line configures the source for @var{host1} to place hostspecific programs in subdirectories of @file{/usr/gnu/H-@var{host1}}.  The second line builds and installs all programs for @var{host1},including both host independent and host specific files.The third line reconfigures the source for @var{host2} to place hostspecific programs in subdirectories of @file{/usr/gnu/H-@var{host2}}.The fourth line builds and installs all programs for @var{host2}.  Hostspecific files are installed in new directories, but the hostindependent files are installed @emph{on top of} the hostindependent files installed for @var{host1}.  This results in a singlecopy of the host independent files, suitable for use by both hosts.@node Install Details,  , exec_prefix, Install Locations@subsection Full descriptions of all installation subdirectoriesDuring any install, a number of standard directories are created.  Theirnames are determined by Makefile variables.  Some of thedefaults for Makefile variables can be changed at configure time usingcommand line options to @code{configure}.  For more information on thestandard directories or the Makefile variables, please refer to@cite{standards.text}.Note that @code{configure} does not create the directory @code{srcdir}at any time.  @code{srcdir} is not an installation directory.You can override all makefile variables on the command line to@code{make}.  (See @ref{Overriding, Overriding Variables, OverridingVariables, make, Make}.)  If you do so, you will need to specify thevalue precisely the same way for each invocation of @code{make}, or yourisk ending up with a broken installation.  This is because manyprograms have the locations of other programs or files compiled intothem.  If you find yourself overriding any of the variables frequently,you should consider site dependent Makefile fragments.  See also@ref{Sites}.During @code{make install}, a number of standard directories arecreated and populated.  The following Makefile variables define them.Those whose defaults are set by corresponding @code{configure} variablesare marked ``Makefile and configure''.@vindex prefix@defvr {Makefile and configure} prefixThe root of the installation tree.  You can setits Makefile default with the @code{-prefix=} command line option to@code{configure}.  (@ref{Invoking}.)  The default value for@code{prefix} is @file{/usr/local}.@end defvr@vindex bindir@defvr Makefile bindirA directory for binary programs that users can run.The default value for @code{bindir} depends on @code{prefix};@code{bindir} is normally changed only indirectly through @code{prefix}.The default value for @code{bindir} is @file{$(prefix)/bin}.@end defvr@vindex exec_prefix@defvr {Makefile and configure} exec_prefixA directory for host dependent files.  You can specify the Makefiledefault value by using the @code{-exec_prefix=} option to @code{configure}.(See also @ref{Invoking}.)  The default value for @code{exec_prefix} is@file{$(prefix)}.@end defvr@vindex libdir@defvr Makefile libdirA directory for libraries and support programs.  The default value for@code{libdir} depends on @code{prefix}; @code{libdir} is normallychanged only indirectly through @code{prefix}.  The default value for@code{libdir} is @file{$(prefix)/lib}.@end defvr@vindex mandir@defvr Makefile mandirA directory for @code{man} format documentation (``man pages'').  Thedefault value for @code{mandir} depends on @code{prefix};@code{mandir} is normally changed only indirectly through @code{prefix}.The default value for @code{mandir} is @file{$(prefix)/man}.@end defvr@vindex man@var{N}dir@defvr Makefile man@var{N}dirThere are eight variables named @code{man1dir}, @code{man2dir}, etc.They name the specific directories for each man page section.  Forexample, @code{man1dir} holds @file{emacs.1} (the man page for the emacsprogram), while @code{man5dir} holds @file{rcsfile.5} (the man pagedescribing the @code{rcs} data file format).  The default value for anyof the @code{man@var{N}dir} variables depends indirectly on@code{prefix}, and is normally changed only through @code{prefix}.  Thedefault value for @code{man@var{N}dir} is@file{$(mandir)/man@var{N}}.@end defvr@vindex manext@defvr Makefile manext@emph{Not supported by @code{configure}}.  The @sc{gnu} coding standardsdo not call for @code{man1ext}, @code{man2ext}, so the intended use for@code{manext} is apparently not parallel to @code{mandir}.  Its use isnot clear.  (See also @ref{Makefile Extensions}.)@end defvr@vindex infodir@defvr Makefile infodirA directory for @emph{info} format documentation.  The default value for@code{infodir} depends indirectly on @code{prefix}; @code{infodir} isnormally changed only through @code{prefix}.  The default value for@code{infodir} is @file{$(prefix)/info}.@end defvr@vindex docdir@defvr Makefile docdirA directory for any documentation that is in a format other than thoseused by @code{info} or @code{man}.  The default value for @code{docdir}depends indirectly on @code{prefix}; @code{docdir} is normally changed onlythrough @code{prefix}.  The default value for @code{docdir}is @file{$(datadir)/doc}.  @emph{This variable is an extension tothe @sc{gnu} coding standards}.  (See also @ref{Makefile Extensions}.)@end defvr@vindex includedir@defvr Makefile includedirA directory for the header files accompanying the libraries installed in@code{libdir}.  The default value for @code{includedir} depends on@code{prefix}; @code{includedir} is normally changed only indirectlythrough @code{prefix}.  The default value for @code{includedir} is@file{$(prefix)/include}.@end defvr@node Build Directories, Host, Install Locations, Using Configure@section Build Directories@cindex Build directories@kindex objdir@cindex Object directories@kindex subdirs@cindex Building for multiple hosts@cindex Building for multiple targetsNormally, @code{configure} builds a @file{Makefile} and symbolic linksin the same directory as the source files.  This is the typical@sc{un*x} way to build programs, but it has limitations.  For instance,using this approach, you can only build for one host at a time.We refer to the directories where @code{configure} builds aMakefile as the @emph{build directories} or sometimes as@emph{objdir} because these are the directories in which @code{make}will build object files, among other things.The default build directory is the same as the source directory.You can use a different build directory with a sequence like the following:@examplemkdir @var{builddir}cd @var{builddir}configure @var{host} -srcdir=@var{sourcedirectory}@end example@noindentwhere @var{builddir} is the directory where you wish to build,@var{host} is the host for which you want to build, and@var{sourcedirectory} is the directory containing the source files.If you were to do this twice with different values for @var{builddir}and @var{host}, then you could @code{make} for both at the same time.@node Host, Target, Build Directories, Using Configure@section HostThe arguments to @code{configure} are @emph{hosts}.  By @emph{host} wemean the environment in which the source will be compiled.  This neednot necessarily be the same as the  physical machine involved,although it usually is.For example, if some obscure machine running an operating system otherthan @sc{un*x}  had the @sc{gnu} @sc{posix} emulation librariesavailable, it would be possible to configure most @sc{gnu} source for a@sc{posix} system and build it on the obscure host.For more on this topic, see @ref{Host Environments, , Host Environments,cfg-paper, On Configuring Development Tools}.@node Target, Local Conventions, Host, Using Configure@section TargetFor building native development tools, or most of the other @sc{gnu}tools, you need not worry about the target.  The @emph{target} of aconfiguration defaults to the same as the @emph{host}.For building cross development tools, please see @ref{BuildingDevelopment Environments, , Building Development Environments,cfg-paper, On Configuring Development Tools}.@node Local Conventions,  , Target, Using Configure@section Local ConventionsIf you find that a tool does not get configured to your liking, or if@code{configure}'s conventions differ from your local conventions, youshould probably consider site specific Makefile fragments.  See also@ref{Sites}.These are probably not the right choice for options that can be set fromthe @code{configure} command line or for differences that are host ortarget dependent.@node Porting, Reference, Using Configure, top@chapter Porting with Configure@cindex PortingThis section explains how to add programs, host and target configurationnames, and site-specific information to Cygnus configure.@menu* Programs::			Adding configure to new programs* Hosts and Targets::		Adding hosts and targets* Sites::			Adding site info@end menu@node Programs, Hosts and Targets, Porting, Porting@section Adding Configure To New ProgramsIf you are writing a new program, you probably shouldn't worry aboutporting issues or configure until it is running reasonably on some host.Then refer back to this section.If the program in question currently has a configure script that meetsthe criteria set out by @cite{standards.text}, please do not add Cygnusconfigure.  It should be possible to add this program without change toa Cygnus configure style source tree.If the program is not target dependent, please consider using@code{autoconf} instead of Cygnus configure.  @code{autoconf} willbe available soon from the @sc{fsf}.To add Cygnus configure to an existing program, do the following:@table @asis@item Make sure the Makefile conforms to @sc{gnu} standardThe coding standard for @sc{gnu} Makefiles is described in@cite{standards.text}.@item Add Cygnus extensions to the MakefileThese are described in @ref{Makefile Extensions}.@item Move host support from Makefile to fragmentsThis usually involves finding sections of the Makefile that say thingslike ``uncomment these lines for host foo'' and moving them to a newfile called @file{./config/mh-foo}. For more information, see @ref{Hostsand Targets}.@item Choose defaultsIf the program has compile time options that determine the way theprogram should behave, chose reasonable defaults and make these Makefilevariables.  Be sure the variables are assigned their default valuesbefore the @code{####} line so that site specific Makefile fragments canoverride them (@pxref{Makefile Extensions,,Extensions to the @sc{gnu}coding standards}).@item Locate configuration filesIf there is configuration information in header files or source files,separate it in such a way that the files have a generic name.  Then movethe specific instances of those files into the @file{./config}directory.@item Separate host and target informationSome programs already have this information separated.  If yours doesnot, you will need to separate these two kinds of configurationinformation.  @dfn{Host specific} information is the information needed tocompile the program.  @dfn{Target specific} information is information on theformat of data files that the program will read or write.  Thisinformation should live in separate files in the @file{./config}directory with names that reflect the configuration for which they areintended.At this point you might skip this step and simply move on.  If you do,you should end up with a program that can be configured only to buildnative tools, that is, tools for which the host system is also thetarget system.  Later, you could attempt to build a cross tool andseparate out the target specific information by figuring out what wentwrong.  This is often simpler than combing through all of the sourcecode.@item Write @code{configure.in}Usually this involves writing shell script fragments to map fromcanonical configuration names into the names of the configuration files.These files will then be linked at configure time from the specificinstances of those files in @file{./config} to file in the builddirectory with more generic names.  (see also @ref{Build Directories}).The format of configure.in is described in @ref{configure.in}.

⌨️ 快捷键说明

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