# HG changeset patch # User wbell # Date 1205448579 0 # Node ID 6718f9a5c1f1d52e330f2926f54f185135eb5124 # Parent 3fa47d2052a0f3c72e5f547646f1f7e9ee8a3f92 Applying Thomas Mueller's patch for the autoreconf command. Closes #59 diff --git a/bitten/build/ctools.py b/bitten/build/ctools.py --- a/bitten/build/ctools.py +++ b/bitten/build/ctools.py @@ -60,6 +60,40 @@ if returncode != 0: ctxt.error('configure failed (%s)' % returncode) +def autoreconf(ctxt, file_='configure', force=None, install=None, symlink=None, + warnings=None, prepend_include=None, include =None): + """Run the autotoll ``autoreconf``. + + :param ctxt: the build context + :type ctxt: `Context` + :param force: consider all files obsolete + :param install: copy missing auxiliary files + :param symlink: install symbolic links instead of copies + :param warnings: report the warnings falling in CATEGORY + :prepend_include: prepend directories to search path + :include: append directories to search path + + """ + args = [] + if install: + args.append('--install') + if symlink: + args.append('--symlink') + if force: + args.append('--force') + if warnings: + args.append('--warnings=%s' % warnings) + + if include: + args += ['--include=%s' % inc for inc in include.split()] + if prepend_include: + args += ['--prepend-include=%s' % pinc for pinc in prepend_include.split()] + + from bitten.build import shtools + returncode = shtools.execute(ctxt, 'autoreconf', args=args) + if returncode != 0: + ctxt.error('autoreconf failed (%s)' % returncode) + def make(ctxt, target=None, file_=None, keep_going=False): """Execute a Makefile target. diff --git a/doc/commands.txt b/doc/commands.txt --- a/doc/commands.txt +++ b/doc/commands.txt @@ -128,6 +128,52 @@ ----------------- +```` +----------------- + +Executes ths autotool autoreconf. + +Parameters +---------- + + :param force: consider all files obsolete + :param install: copy missing auxiliary files + :param symlink: install symbolic links instead of copies + :param warnings: report the warnings falling in CATEGORY + :prepend_include: prepend directories to search path + :include: append directories to search path + + ++--------------+-------------------------------------------------------------+ +| Name | Description | ++==============+=============================================================+ +| ``force`` | Consider all files obsolete | ++--------------+-------------------------------------------------------------+ +| ``install`` | Copy missing auxiliary files | ++--------------+-------------------------------------------------------------+ +| ``symlink`` | Install symbolic links instead of copies | ++--------------+-------------------------------------------------------------+ +| ``warnings`` | Report the warnings related to category (which can actually be a comma separated list) | ++--------------+-------------------------------------------------------------+ +| ``prepend_include`` | Prepend directories to search path | ++--------------+-------------------------------------------------------------+ +| ``include`` | Append directories to search path | ++--------------+-------------------------------------------------------------+ + +Examples +-------- + +.. code-block:: xml + + + +Runs the ``autoreconf`` tool in the base directory with the option: force, install +and 3 warning categories active: cross,syntax,error. This is equivalent to:: + + autoreconf --force --install --warnings=cross,syntax,error + + +----------------- ```` ----------------- diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -60,6 +60,7 @@ NS + 'sh#exec = bitten.build.shtools:exec_', NS + 'sh#pipe = bitten.build.shtools:pipe', NS + 'c#configure = bitten.build.ctools:configure', + NS + 'c#autoreconf = bitten.build.ctools:autoreconf', NS + 'c#cppunit = bitten.build.ctools:cppunit', NS + 'c#gcov = bitten.build.ctools:gcov', NS + 'c#make = bitten.build.ctools:make',