0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GNU Autotools で make distで作成したアーカイブに所望のファイルが含まれないときの対処

Last updated at Posted at 2020-02-14

GNU Autotoolsでmake distで作成されるtar.gzファイルに中身が足りない

Autotool(automake)で、make distで生成される~~~.tar.gzファイルにどのようなファイルが含まれるかは、依存関係を自動的に察してくれるようになっているが、必要なものが含まれていない場合がたまにある。

例えばbinサブディレクトリにシェルスクリプトファイルを置いて、Makefile.am

bin/Makefile.am
bin_SCRIPTS = a.sh b.sh c.sh

と記述されている場合には、これらのファイルには生成されるアーカイブファイルに含めない挙動のようである。たとえば、'configure.ac'のAC_CONFIG_FILESに含まれている場合(./configureで、a.sh.inからa.shが生成されるような場合)には、生成元の~~.inはアーカイブに含める挙動になっているので問題にならないが、そうでない場合には問題になる。

解決策

make変数のEXTRA_DIST定義し、そこにも追加する。

Makefile.am
bin_SCRIPTS = a.sh b.sh c.sh

EXTRA_DIST = a.sh b.sh c.sh
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?