0

私はソフトウェアプロジェクトを作成していて、autotoolsを使用してmakefileなどのスクリプトを生成したいと思っていました。Makefile.amファイルとconfigure.inファイルを手動で作成し、ここからautogen.shスクリプトを使用しています。別の「build」ディレクトリにプロジェクトをビルドしようとすると、問題が発生します。たとえば、次の場合に発生します。

mkdir build
cd build
../configure
make

構成手順は正常に機能しますが、makeを実行すると次のようになります。

make  all-recursive
Making all in src
/bin/sh: line 0: cd: src: No such file or directory
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

これを機能させるためのヒントはありますか?または、あきらめて、もっと単純な/別のことを試してみるべきです。私はこれをかなり単純なC++プロジェクトにすることを計画しており、私が計画している唯一の依存関係は、ブーストユニットテストフレームワークに依存し、EclipseIDEでほとんどの開発を行うことです。

4

1 に答える 1

1

src/Makefile.am行#17にバグがあります。

swin-adventure_SOURCES = src/main.cc

本当に読む必要があります:

swin-adventure_SOURCES = main.cc

すでにsrc/ディレクトリにいるので(src / src /サブフォルダがない場合)

_SOURCES variabesで特殊文字を使用しているため、別のバグがあります。swin-adventure_SOURCES禁止-文字があります。それを正規化してみてくださいswin_adventure_SOURCES

最後に、値をbin_PROGRAMS複数回(そして毎回同じ値)に割り当てようとしているので、それを避けてください。

何かのようなもの:

## Additional flags to pass to aclocal when it is invoked automatically at
## make time. The ${ACLOCAL_FLAGS} variable is picked up from the environment
## to provide a way for the user to supply additional arguments.
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

## Define an executable target "swin-adventure", which will be installed into the
## directory named by the predefined variable $(bindir).
bin_PROGRAMS = swin-adventure

## Define the list of source files for the "swin-adventure" target. The file 
## extension .cc is recognized by Automake, and causes it to produce rules 
## which invoke the C++ compiler to produce an object file (.o) from each 
## source file. The ## header files (.h) do not result in object files by 
## themselves, but will be included in distribution archives of the project.
swin_adventure_SOURCES = main.cc
于 2012-09-10T14:02:31.383 に答える