[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pkgsrc/doc/guide/files/build.xml: 1.14 -> 1.16



以下のページの更新をしました。ツッコミをお願いします。

pkgsrc/doc/guide/files/build.xml: 1.14 -> 1.16

> revision 1.16
> date: 2005/11/03 19:29:54;  author: rillig;  state: Exp;  lines: +35 -18
> Added the default value of CONFIGURE_DIRS. Rewrote the ``build'' phase
> description to have the same structure as the ``configure'' phase
> description.
> ----------------------------
> revision 1.15
> date: 2005/11/03 19:06:50;  author: rillig;  state: Exp;  lines: +30 -27
> Documented the use of CONFIGURE_DIRS, as pkglint has got a new error
> diagnostic that need this explanation.

月曜日までに異議がなければ、 commit します。

以下、訳と原文それぞれの新旧の差分です。

--- build.xml.orig	2006-10-21 13:58:41.000000000 +0900
+++ build.xml	2006-10-21 13:58:41.000000000 +0900
@@ -1,6 +1,6 @@
-<!-- $NetBSD: build.xml,v 1.14 2005/11/03 18:15:47 rillig Exp $ -->
+<!-- $NetBSD: build.xml,v 1.16 2005/11/03 19:29:54 rillig Exp $ -->
 <!-- Based on english version: -->
-<!-- NetBSD: build.xml,v 1.14 2005/11/03 18:15:47 rillig Exp   -->
+<!-- NetBSD: build.xml,v 1.16 2005/11/03 19:29:54 rillig Exp   -->
 
 <chapter id="build">
 <title>構築の手順</title>
@@ -306,43 +306,71 @@
 <sect1 id="build.configure">
 <title><emphasis>configure</emphasis> 相</title>
 
-	  <para>ほとんどのソフトウェアは、&os;で利用できるヘッダーファイル、システムコー
-	    ル、およびライブラリールーチンについての情報を必要とします。これはコンフィ
-	    ギュレーションとして知られているプロセスであり、通常、自動化されています。
-	    大抵の場合、スクリプトがソースと一緒に提供され、それを実行することにより
-	    ヘッダーファイルやMakefile等が生成されます。</para>
-
-	  <para>もし、プログラムのdistfileが専用のconfigureスクリプトを含んでいる場合、
-	    <varname>HAS_CONFIGURE</varname>を設定することにより、実行することができます。もし、そのス
-	    クリプトがGNUのautoconfスクリプトである場合は、かわりに、<varname>GNU_CONFIGURE</varname>を
-	    指定してください。どちらの場合も、configureスクリプトの引数は、変数
-	    <varname>CONFIGURE_ARGS</varname>で指定されます。もし設定スクリプトの名前がデフォルトの
-	    <quote>configure</quote>でない場合は、その名前を<varname>CONFIGURE_SCRIPT</varname>に設定してください。
-	    <filename role="pkg">sysutils/top</filename> パッケージから抜粋した例を以下に掲げます。</para>
+<para>ほとんどのソフトウェアは、実行対象のプラットフォームで利用できるヘッダーファイル、
+システムコール、およびライブラリールーチンについての情報を必要とします。
+この情報の判断はコンフィギュレーションとして知られているプロセスであり、
+通常、自動化されています。
+大抵の場合、スクリプトが配布物と一緒に提供され、
+それを実行することによりヘッダーファイルやMakefile等が生成されます。</para>
+
+<para>パッケージが configure スクリプトを含んでいる場合、<varname>HAS_CONFIGURE</varname>
+を <quote>yes</quote> に設定することにより、実行することができます。
+もし、その configure スクリプトが GNU の autoconf スクリプトである場合は、
+かわりに、<varname>GNU_CONFIGURE</varname> を <quote>yes</quote> に指定してください。
+大雑把にいうと、<emphasis>configure</emphasis> 相では以下のようなことをしています。</para>
 
 <programlisting>
-    HAS_CONFIGURE=          yes
-    CONFIGURE_SCRIPT=       Configure
-    CONFIGURE_ARGS+=        netbsd13
+    .for d in ${CONFIGURE_DIRS}
+            cd ${WRKSRC} && cd ${d} && env ${CONFIGURE_ENV} \
+                ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
+    .endfor
 </programlisting>
 
-	  <para>もし、プログラムがコンフィギュレーションのためにImakefileを使用するので
-	    あれば、<varname>USE_IMAKE</varname>を<quote>YES</quote>に設定することにより、適切な手順が実行されます。
-	    (もし、<varname>$X11PREFIX</varname>にインストールされるパッケージが欲しいだけで、xmkmfを実
-	    行したくない場合、かわりに<varname>USE_X11BASE</varname>を使用してください!)</para>
+<para><varname>CONFIGURE_DIRS</varname> (標準では <quote>.</quote>) は、
+<varname>WRKSRC</varname> からの相対位置でのパス名を並べたリストです。
+この各ディレクトリー内で、環境変数 <varname>CONFIGURE_ENV</varname> および
+引数 <varname>CONFIGURE_ARGS</varname> を使って
+configure スクリプトが実行されます。
+<varname>CONFIGURE_ENV</varname>, <varname>CONFIGURE_SCRIPT</varname>
+(標準では <quote>./configure</quote>),
+<varname>CONFIGURE_ARGS</varname>
+の各変数は、いずれもパッケージ側で変更することができます。</para>
+
+<para>もし、プログラムがコンフィギュレーションのために <filename>Imakefile</filename> を使用するので
+あれば、<varname>USE_IMAKE</varname> を <quote>yes</quote> に設定することにより、適切な手順が実行されます。
+(もし、<varname>${X11PREFIX}</varname> にインストールされるパッケージが欲しいだけで、xmkmfを実
+行したくない場合、かわりに<varname>USE_X11BASE</varname>を使用してください。)</para>
 
 </sect1>
 
 <sect1 id="build.build">
 <title><emphasis>build</emphasis> 相</title>
 
-	  <para>コンフィギュレーションが終ったら、<varname>$MAKEFILE</varname>の中で、構築のターゲットとし
-	    て<varname>$BUILD_TARGET</varname>を指定し<varname>$MAKE_PROGRAM</varname>を起動することにより、ソフト
-	    ウェアを構築することができます。もし、<varname>USE_TOOLS</varname> に <quote>gmake</quote> が含まれていれば、デフォ
-	    ルトの<varname>MAKE_PROGRAM</varname>は<quote>gmake</quote>です。そうでなければ、<quote>make</quote>が使用されます。
-	    <varname>MAKEFILE</varname>にはデフォルトで<quote>Makefile</quote>が設定されます。そして、<varname>BUILD_TARGET</varname>のデフォ
-	    ルトは<quote>all</quote>です。デフォルトの構築手順を変更するために、パッケージの Makefile でこれらの変数を設定
-	    することができます。</para>
+<para>パッケージの構築は、大雑把にいえば、
+以下のコードを実行するのと同じことです。</para>
+
+<programlisting>
+    .for d in ${BUILD_DIRS}
+            cd ${WRKSRC} && cd ${d} && env ${MAKE_ENV} \
+                ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
+                    -f ${MAKEFILE} ${BUILD_TARGET}
+    .endfor
+</programlisting>
+
+<para><varname>BUILD_DIRS</varname> (標準では <quote>.</quote>) は、
+<varname>WRKSRC</varname> からの相対位置でのパス名を並べたリストです。
+この各ディレクトリー内で、環境変数 <varname>MAKE_ENV</varname> および
+引数 <varname>BUILD_MAKE_FLAGS</varname> を使って
+<varname>MAKE_PROGRAM</varname> が実行されます。
+<varname>MAKE_ENV</varname>, <varname>BUILD_MAKE_FLAGS</varname>,
+<varname>MAKEFILE</varname>, <varname>BUILD_TARGET</varname>
+の各変数は、いずれもパッケージ側で変更することができます。</para>
+
+<para><varname>MAKE_PROGRAM</varname> の標準の値は、
+<varname>USE_TOOLS</varname> に <quote>gmake</quote> が含まれている場合は
+<quote>gmake</quote>、含まれていない場合は <quote>make</quote> です。
+<varname>MAKEFILE</varname> の標準の値は <quote>Makefile</quote> であり、
+<varname>BUILD_TARGET</varname> の標準の値は <quote>all</quote> です。</para> 
 
 </sect1>
 
Index: build.xml
===================================================================
RCS file: /cvsroot/pkgsrc/doc/guide/files/build.xml,v
retrieving revision 1.14
retrieving revision 1.16
diff -u -r1.14 -r1.16
--- build.xml	3 Nov 2005 18:15:47 -0000	1.14
+++ build.xml	3 Nov 2005 19:29:54 -0000	1.16
@@ -1,4 +1,4 @@
-<!-- $NetBSD: build.xml,v 1.14 2005/11/03 18:15:47 rillig Exp $ -->
+<!-- $NetBSD: build.xml,v 1.16 2005/11/03 19:29:54 rillig Exp $ -->
 
 <chapter id="build">
 <title>The build process</title>
@@ -322,52 +322,72 @@
 <sect1 id="build.configure">
 <title>The <emphasis>configure</emphasis> phase</title>
 
-	  <para>Most pieces of software need information on the header files,
-	    system calls, and library routines which are available in &os;.
-	    This is the process known as configuration, and is usually
-	    automated.  In most cases, a script is supplied with the source,
-	    and its invocation results in generation of header files,
-	    Makefiles, etc.</para>
-
-	  <para>If the program's distfile contains its own configure
-	    script, this can be invoked by setting
-	    <varname>HAS_CONFIGURE</varname>. If the configure script
-	    is a GNU autoconf script, <varname>GNU_CONFIGURE</varname>
-	    should be specified instead. In either case, any arguments
-	    to the configure script can be specified in the
-	    <varname>CONFIGURE_ARGS</varname> variable, and the
-	    configure script's name can be set in
-	    <varname>CONFIGURE_SCRIPT</varname> if it differs from the
-	    default <quote>configure</quote>. Here's an example from
-	    the <filename role="pkg">sysutils/top</filename> package:</para>
+<para>Most pieces of software need information on the header files,
+system calls, and library routines which are available on the platform
+they run on. The process of determining this information is known as
+configuration, and is usually automated. In most cases, a script is
+supplied with the distfiles, and its invocation results in generation of
+header files, Makefiles, etc.</para>
+
+<para>If the package contains a configure script, this can be invoked by
+setting <varname>HAS_CONFIGURE</varname> to <quote>yes</quote>. If the
+configure script is a GNU autoconf script, you should set
+<varname>GNU_CONFIGURE</varname> to <quote>yes</quote> instead. What
+happens in the <emphasis>configure</emphasis> phase is roughly:</para>
 
 <programlisting>
-    HAS_CONFIGURE=          yes
-    CONFIGURE_SCRIPT=       Configure
-    CONFIGURE_ARGS+=        netbsd13
+    .for d in ${CONFIGURE_DIRS}
+            cd ${WRKSRC} && cd ${d} && env ${CONFIGURE_ENV} \
+                ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
+    .endfor
 </programlisting>
 
-	  <para>If the program uses an Imakefile for configuration, the appropriate
-	    steps can be invoked by setting <varname>USE_IMAKE</varname> to
-	    <quote>YES</quote>. (If you only want the package installed in
-	    <varname>$X11PREFIX</varname> but xmkmf not being run, set
-	    <varname>USE_X11BASE</varname> instead!)</para>
+<para><varname>CONFIGURE_DIRS</varname> (default: <quote>.</quote>) is a
+list of pathnames relative to <varname>WRKSRC</varname>. In each of
+these directories, the configure script is run with the environment
+<varname>CONFIGURE_ENV</varname> and arguments
+<varname>CONFIGURE_ARGS</varname>. The variables
+<varname>CONFIGURE_ENV</varname>, <varname>CONFIGURE_SCRIPT</varname>
+(default: <quote>./configure</quote>) and
+<varname>CONFIGURE_ARGS</varname> may all be changed by the
+package.</para>
+
+<para>If the program uses an <filename>Imakefile</filename> for
+configuration, the appropriate steps can be invoked by setting
+<varname>USE_IMAKE</varname> to <quote>yes</quote>. (If you only want
+the package installed in <varname>${X11PREFIX}</varname> but xmkmf not
+being run, set <varname>USE_X11BASE</varname> instead.)</para>
 
 </sect1>
 
 <sect1 id="build.build">
 <title>The <emphasis>build</emphasis> phase</title>
 
-	  <para>Once configuration has taken place, the software will be built 
-	    by invoking <varname>$MAKE_PROGRAM</varname> on
-	    <varname>$MAKEFILE</varname> with <varname>$BUILD_TARGET</varname> as
-	    the target to build.  The default <varname>MAKE_PROGRAM</varname> is
-	    <quote>gmake</quote> if <varname>USE_TOOLS</varname> contains <quote>gmake</quote>,
-	    <quote>make</quote> otherwise. <varname>MAKEFILE</varname> is set to
-	    <quote>Makefile</quote> by default, and <varname>BUILD_TARGET</varname>
-	    defaults to <quote>all</quote>.  Any of these variables
-	    can be set in the package's Makefile to change the default
-	    build process.</para> 
+<para>For building a package, a rough equivalent of the following code
+is executed.</para>
+
+<programlisting>
+    .for d in ${BUILD_DIRS}
+            cd ${WRKSRC} && cd ${d} && env ${MAKE_ENV} \
+                ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
+                    -f ${MAKEFILE} ${BUILD_TARGET}
+    .endfor
+</programlisting>
+
+<para><varname>BUILD_DIRS</varname> (default: <quote>.</quote>) is a
+list of pathnames relative to <varname>WRKSRC</varname>. In each of
+these directories, <varname>MAKE_PROGRAM</varname> is run with the
+environment <varname>MAKE_ENV</varname> and arguments
+<varname>BUILD_MAKE_FLAGS</varname>. The variables
+<varname>MAKE_ENV</varname>, <varname>BUILD_MAKE_FLAGS</varname>,
+<varname>MAKEFILE</varname> and <varname>BUILD_TARGET</varname> may all
+be changed by the package.</para>
+
+<para>The default value of <varname>MAKE_PROGRAM</varname> is
+<quote>gmake</quote> if <varname>USE_TOOLS</varname> contains
+<quote>gmake</quote>, <quote>make</quote> otherwise. The default value
+of <varname>MAKEFILE</varname> is <quote>Makefile</quote>, and
+<varname>BUILD_TARGET</varname> defaults to <quote>all</quote>.</para> 
 
 </sect1>