LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   configure & make problem - autotools and version control (http://www.linuxquestions.org/questions/programming-9/configure-and-make-problem-autotools-and-version-control-862383/)

aero_z 02-13-2011 07:08 AM

configure & make problem - autotools and version control
 
Hello

I am developing a small game. I have my project under version control (subversion).
Yesterday I noticed that after checkout you can't just compile the game in the usual way:

./configure
make
(this doesn't work)

This is because install-sh and other files are missing in the repository. I have a ./bootstrap script that solves the problem, but I want the configure script to work right away. So I started adding files under version control. Now I have these autotools related files in svn:

Makefile.am
Makefile.in
aclocal.m4
bootstrap
config.h.in
configure
configure.in
depcomp
install-sh
missing
src/Makefile.am
src/Makefile.in

But it still doesnt work as expected:
Code:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
--- removed stuff ---
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands

$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/christian/Development/astrotest/missing --run autoconf
 cd . && /bin/bash /home/christian/Development/astrotest/missing --run automake-1.11 --foreign

/bin/bash ./config.status --recheck
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --no-create --no-recursion
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
--- removed several lines ---
configure: creating ./config.status
 /bin/bash ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/christian/Development/astrotest/missing --run autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory `/home/christian/Development/astrotest'
Making all in src
make[2]: Entering directory `/home/christian/Development/astrotest/src'
g++ -DHAVE_CONFIG_H -I. -I..    -g -O2 -MT Camera.o -MD -MP -MF .deps/Camera.Tpo -c -o Camera.o Camera.cpp
--- compiling ---

The configure script runs fine but when I run make, somehow the configure script is called again and some autotools like automake and autoconf are executed.
What can I do have the package build normally without having to run automake and others?
Which files do you have under version control?

Thank you very much!

aero_z 02-14-2011 09:15 AM

Is maybe a file not up to date? Why does it work without problems when I run ./bootstrap before? (aclocal, autoconf, automake, autoheader)

gnashley 02-14-2011 12:30 PM

"/bin/bash ./config.status --recheck" is what makes them get re-run.
Usually code from repos comes like you describe. They simply run a bootstrap or autonge.sh script which creates the needed file for a release tarball. You can often simply run 'autoreconf -if' to do what the autogen.sh script would do. One this is done in the sources, it makes the config files more version-dependent -for the autoconf/automake/libtool tools I mean.

aero_z 02-15-2011 04:49 PM

Actually I thought the user should be able to compile the code from the repository without having to use autotools. But I checked out some repositories of free projects (SDL, xmoto, gedit, wget) and none of them had a ready to use configure script.
It makes sense, since mostly you only use the repository if you are a developer.
I will remove the configure script from the repository too...
Thanks for the info.

gnashley 02-16-2011 02:07 AM

One thing more, even if you deliver a pre-configured tarball (I mean that has all the config files pre-generated), the 'recheck' option will cause them all to be regenerated when issuing 'make', so it would still requite your users to have automake/autoconf/libtool/m4/perl (and possibly intltool) installed.

aero_z 02-16-2011 03:08 AM

And how do I deactivate recheck?

ntubski 02-16-2011 10:32 AM

Quote:

Originally Posted by gnashley (Post 4259991)
One thing more, even if you deliver a pre-configured tarball (I mean that has all the config files pre-generated), the 'recheck' option will cause them all to be regenerated when issuing 'make', so it would still requite your users to have automake/autoconf/libtool/m4/perl (and possibly intltool) installed.

No, the recheck option reruns configure, autotools are not required.


All times are GMT -5. The time now is 01:00 AM.