Configure and config.status targets are really important, and usually if you have a good knowledge on those you'll be able to troubleshoot problems in an easier way. Config.status target depends obviously from configure and contains all commands that should be executed in a proper configuration. In debian/rules case, the default field is set to:


./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" 

Every developer can decide to configure the package using his own variables after ./configure command, to be able to decide where the package will install manpages, documents, binary files and so on. Other commands listed above can be used too. Common example is related to a "permission denied" error (adding a configure target with chmod a+x as command wont solve this problem) that happens while, during the build, rules file call for configure rule. In our case we are able to add "chmod a+x ./configure" just above the execution of ./configure itself, -under- "# Add here commands to configure the package." line. The configure and config.status variables only matter for a limited number of compiled programs and debian/rules file is one of them.

すべての開発者は、./configureコマンドの実行後にその変数を使ってパッケージを設定することもできますし、manページやドキュメント、バイナリファイルなどをどこにインストールすべきかを決めることもできます。前に並べた他のコマンドも利用することができます。よくある例としては、ビルド、ルールファイルがconfigureルールを呼び出すときに生じる、"permission denied"エラーです(configureターゲットに、コマンドとしてchmod a+xを追加してもこの問題は解決できません)。今回の例だと、./configureの実行の前、"# Add here commands to configure the package."と書かれた行の「下に」"chmod a+x ./configure"を追加してください。configureとconfig.status変数はプログラムをコンパイルする上で、限られた場合にのみ重要になります、debian/rulesファイルはそのうちの一つです。






UbuntuJapaneseWiki: UbuntuPackagingGuideJa/ch04s03 (last edited 2012-01-10 11:49:20 by anonymous)