开发者

Autotools local destination directory

When I run my autotools-generated Makefile with "make" it gen开发者_如何学Cerates the files in the current directory. I would prefer it to not "pollute" my directory but move the programs to "bin/" (since the source is in "src/")

Is this possible with autotools? (Using autoconf and automake - Not libtool)


mkdir builddir
cd builddir
../foobar-1.2.3/configure --my --options   (or)
/path/to/foobar-1.2.3/configure --my --options
make
make foobar
make check
make install

What I usually end up whith when building manually is something like

cd foobar-1.2.3
(mkdir _b && cd _b && ../configure --prefix=$PWD/../_i)
make -C _b all check install installcheck
./_i/bin/foobar
vi foo.c bar.c foobar.h
gimp icons/foobar-moo.png
make -C _b install && ./_i/bin/foobar

Then I have the whole stuff related to the foobar program inside one directory foobar-1.2.3, including source code, built files, and a test installation.

The built files in foobar-1.2.3/_b are easily removed with rm -rf _b, and the test installation with rm -rf _i, in the course of editing the source tree from a shell with current working directory foobar-1.2.3.

Of course, you can use a variant of that and move the build/install dirs up one directory: foobar-1.2.3--b and foobar-1.2.3--i alongside foobar-1.2.3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜