What to check into repository?

2007-12-03 Thread Hongliang Wang

Hello all,

My company decides to make part of our software source code open-sourced.
For this part, we will use automake  autoconf tools to generate the 
installation package (.tar.gz).

However, the current problem is that we cannot decide what to check into our 
own software repository. The .c and .h files will  definitely be needed to 
check in, but what about the Makefile.am configure.ac, and even the executable 
files like missing, compile, autogen.sh, aclocal.m4, autom4te.cache/ ?

Would anybody give me some suggestions?

Thanks in advance!
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx




Re: What to check into repository?

2007-12-03 Thread Jason Curl

Hongliang Wang wrote:

Hello all,

My company decides to make part of our software source code open-sourced.
For this part, we will use automake  autoconf tools to generate the 
installation package (.tar.gz).

However, the current problem is that we cannot decide what to check into our 
own software repository. The .c and .h files will  definitely be needed to 
check in, but what about the Makefile.am configure.ac, and even the executable 
files like missing, compile, autogen.sh, aclocal.m4, autom4te.cache/ ?

Would anybody give me some suggestions?
  
Any source is usually stored in the repository, configure.ac, 
Makefile.am constitutes as source. Derived objects as part of a build 
are generally not.


The generated files, such as Makefile.in, configure, may or may not be. 
Most projects tend to at least keep configure, but other projects have a 
bootstrap script that generates these for you. When you do a make 
dist, all necessary files are part of the tar.gz. Check that it works 
with make distcheck before you release.


It depends on the type of source configuration tool you're using as 
well. Personally, I include the configure and Makefile.in so that 
users checking the repository out (as guest) do not need to have the 
autoconf tools available.


Regards,
Jason.




Re: What to check into repository?

2007-12-03 Thread Bob Proulx
Hongliang Wang wrote:
 My company decides to make part of our software source code
 open-sourced.  For this part, we will use automake  autoconf tools
 to generate the installation package (.tar.gz).

That sounds wonderful!

 However, the current problem is that we cannot decide what to check
 into our own software repository. The .c and .h files will
 definitely be needed to check in, but what about the Makefile.am
 configure.ac, and even the executable files like missing, compile,
 autogen.sh, aclocal.m4, autom4te.cache/ ?

If you wrote the file by hand then check it in.  If the file was
generated by a tool then don't.  This means that configure.ac and
Makefile.am files should definitely get checked in since they are
source files.  But generated files such as autom4te.cache should
definitely not get checked in.

There is debate about some files such as the ./configure script.  I
strongly do not like it checked in because it is generated and a large
number of spurious differences in version control ensues.  But a
counter argument is when it requires a special bootstrap to generate.
In that case having a seed version in version control would enable
someone to use it to bootstrap things along.

In any case the process that you are looking for is to be able to do a
pristine checkout from version control and then to rebuild
everything.  You did not say what version control system so I will
simply assume one without loss of generality.  The flow would go like
this:

  git clone git://git.example.com/project
  cd project
  autoreconf --install
  ./configure
  make
  make distcheck

Bob