This is a small list of questions you might be wondering about...
Because I say so? It's not normal to use void main, so just don't. Read this and that for more information. And if you think I should change the behaviour of ccbuild, post a feature request.
Currently there is no way of finding out what autoconf/automake information to add. This means you will have to describe your dependencies in two files: the ccResolutions file and the autotools files. For the ccbuild project, we write a shell script that creates our Makefile.am and a hand-rolled configure.in.
Below is the shell script that will generate the Makefile.am using ccbuild's source MD5 listing. The key parts of this file are blue, everything around the blue parts is save to edit.
#!/bin/sh
## Generate Makefile.am using ccbuild
PSOURCE=src/metalink.cc
PNAME=`basename "${PSOURCE}" .cc`
echo "Generating Makefile.am from ccbuild"
SOURCES=`ccbuild md5 "${PSOURCE}" | sed -r 's/^[a-z0-9]+ //; s/ /\\ /' | tr '\n' ' '`
#Overwrite Makefile.am
cat > Makefile.am <<EOF
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = ${PNAME}
#Sources, generated list from ccbuild md5 output
${PNAME}_SOURCES = ${SOURCES}
${PNAME}_LDFLAGS = @LIBGCRYPT_LIBS@ -l@BOOST_REGEX_LIB@ -l@BOOST_PROGRAM_OPTIONS_LIB@ -l@BOOST_FILESYSTEM_LIB@
${PNAME}_CXXFLAGS = @LIBGCRYPT_CFLAGS@ -D_LARGEFILE_SOURCE
EOF
echo "Running autotools:"
##BOOTSTRAP
echo " aclocal"
aclocal -I /usr/share/autoconf-archive
echo " autoconf"
autoconf
echo " automake"
automake --add-missing
Currently there is no direct way to get ccbuild to run on anything else but GNU/Linux. I don't have Cygwin installed and I havn't yet tried it. My advise is: don't try it, just install something proper. Feel free to post a bugreport if you do not agree.
I commonly use the following commands:
ccbuild ccbuild --brute ccbuild distclean ccbuild --brute --loopThat's about it for me. The rest I use sometimes on specific problems (like --xof, dot, md5, deps etc.).