Yabs history

The most recent changes are at the end of this file.

Fri Mar 12 2004: release version 1.

Added yabs.make2().

Added rule-change-detection to yabs3's compilation rule.

Added special handling of semi-prerequisite None - forces rebuild of target.

Added generic rule-change-detection to yabs2.

yabs.make() now runs commands as soon as prerequisites are up to date, instead of generating the entire rule-tree and running it seperately. This allows one rule to unpack a tar file and make files available for use by other rules.

Wed Mar 17 2004: version 2.

Documentation improvements - added rough comparisons with make and scons.

Improved code formatting.

Mon Mar 22 2004: version 3.

Added support for msvc builds to yabs3, which use the microsoft cl command-line compiler.

Added test for changes to command-files.

Added hooks for controlling whether rules have an implicit root directory. This allows Yabs programmes to be imported into other Yabs programmes in different directories without breaking the rules or their commands. The test programme has been updated to verify this behaviour.

Fixed use of non-absolute filenames in command of yabs2's pattern rules. Added test6 for this change.

Cleaned up phony rule for preprocessing/compiling individual files.

Sat Mar 27 2004: version 4.

Clarified various absolute-path issues.

Added support for adding addional prereqs after existing prereqs have been created.

Added default target to yabs2.appmake() and yabs2.appmakeexit().

In yabs3, added fns that modify a gcc command to make it generate dynamic dependency info, handling gcc-2.x and gcc-3.x differently. Similarly for preprocessing.

changed return type of yabs.make() to return a tree structure when no rule exists to make a target. Output this data in a nice nested format when a top-level target fails.

Information about rule functions can include backtrace/module information when diagnostics are high. added lots of checking of types supplied by client code. Error messages about failed targets are much improved.

Minor mods to get yabs and yabs2 work on Windows.

Wed Jan 19 2005: version 5.

mkdir -p is not prefixed to commands under windows.

yabs uses os.makedirs() to ensure target parent dir is always present prior to running all commands.

Wed Jan 19 2005: version 6.

Fixed incorrect version numbers in documentation.

Cleaned up some docs. Removed some old unused functions. Added example build files to readme.

Fixed bug in yabs.ensure_directory() - didn't flush mtime cache, resulting in errors.

Thu Jan 20 2005: version 7.

yabs2 pattern rules: if command is a function, it is now given an extra 4th parameter, the Yabs state.

Commands are run in subdirectory when rule is defined with a root directory.

Various fixes for win32.

Wed Jan 26 2005: version 8.

yabs now grabs stdout+stderr, instead of just stdout, when running commands.

Thu Jan 27 2005: version 9.

Fixed -n behaviour - marks targets as updated so subsequent rules work.

Added yabs2.split_dir() - useful for some rules involving build directories.

Added default_params to yabs2.appmake() and yabs2.appmakeexit() - allows for example '-d -s' to be default when user doesn't specify any flags.

Thu Jan 27 2005: version 10.

Fixed bug where first default param was missed.

Altered behaviour of least-priority rule that looks for existance of a file. This rule is ignored if any other rules have failed due to failed prerequisites. This prevents odd behaviour where a build succeeds if the target exists, even if the rules that are usually use to make the target, have failed.

Fri Jan 28 2005: version 11.

Outputs diagnsotics about top-level targets that are already up-to-date.

Added cmdfile param to yabs.add_rule(). Automatically stores commands used to create target file in a file with the specified suffix, and ensures that targets are remade when rules are updated, even if target is newer than its prerequisites.

Sun Jan 30 2005: version 12.

Added support for outputing filenames relative to current directory - see yabs2.appmakeexit()'s --cwd param.

Mon Jan 31 2005: version 13.

Fixed error where return code from external commands was ignored. The fix uses popen2.popen4, which works only for Unix. win32 still uses os.popen4, which appears to work. added test12, to test that commands that return errors are detected properly.

Added internal yabs.Rule class.

Renamed yabs.add_rule()'s cmdfile param to autocmds.

Added new Autodeps system. Added test11 and test13 to test autodeps. Autodeps work on openbsd and linux. yabs adds the .so to the prerequisites returned by a rule that uses autodeps, and the .so is built with a standard yabs rule, . added test13, which uses simple compilation/link rules with autodeps, and checks that the autodeps system works properly.

semi-prerequisites can be list or function returning lists, and recursion is now supported.

Have changed the handling of semi-prerequisites so that a non-existant semi-prerequisite forces a rebuild of the target. Previously, deleting a semi-prerequisite would have no effect, which was wrong.

Changed yabs2's command-line parsing so that multiple single-hypen parameters can be specified together, e.g. -ds is expanded to -d -s.

Thu Feb 03 2005: version 14.

Minor fixes to allow use on python-2.2.

Thu Feb 03 2005: version 15.

changed behaviour of semi-prerequisites - yabs now tries to rebuild them. they are now treated in exactly same way as prerequisites except that a failure to rebuild them is not treated as an error, but instead forces a rebuild of the target.

(semi-)prerequisites can be function/list/recurse/generator.

autodeps_so outputs information about files that failed to open, as well as those that succeeded in being opened. Yabs treats these slightly differently from other semi-prerequisites. see docs for yabs.add_rule() for details.

added yabs2.add_rules() - automatically registers matching functions with yabs.add_rule().

updated some of the docs.

Fri Feb 11 2005: version 16.

Added -e option to yabs2.appmake() - turns off echoing of output text. modified error information to include command/echo info only if not already output.

Added yabs3.default_target(). fixed handling of .s files in yabs3 - gcc does not pre-process them.

Added support for .so - shared libraries - in yabs3.

Added --system option to yabs2.appmake() - forces use of os.system() when running commands, which seems to work better for commands that read from stdin.

Yet another change to the code for running commands. this time, we copy commands.getstatusoutput's use of vanilla os.popen with a shell redirection hack to get both stdout and stderr. Modified to read a line at at time, so that echoing to the screen works as the command runs.

Added internal parameter to yabs.add_rul()e; allows diagnostic levels for individual rules to be reduced.

Added --pty option, makes yabs use pty.fork to run commands, allowing proper handling of stdin/stdout/stderr like os.system, while still allowing control of echoing like os.popen. os.popen is still the default.

Added handling of exceptions raised by rule command functions.

Added support for internal param in yabs2.add_patternrule.

Added support for misc params to yabs3. Any substring of a .o or .exe starting with - will be added to the compiler/linker commands. E.g. ./make.py -b gcc,debug,-fprofile-arcs,-ftest-coverage foo.exe.

Added yabs2.appmake2 and changed yabs2.readparams, so that build programmes can call yabs2.readparams() at start, then define rules which will use the user's default build if specified, then call yabs2.appmake2().

Yabs3 links with gcc when no source filesnames end with .cpp. This is flakey - won't cope if libraries require g++ for example.

Yabs3: added support for making targets like _yabs/foo.exe and _yabs/bar.c.o. These will be copied from _yabs/foo,<build>.exe and _yabs/bar.c,<build>.o. See the rule-function _singlebuild in yabs3.py; this rule is not registered by default.

Added endtime parameter to yabs.subprocess(). Only supported by pty version.

Added yabs.fn() - compiles a string into an anonymous function. A sort of enhanced alternative to Python's lambda.

yabs.command_gettext() overrides sys.stdout and sys.stderr while calling a command-fn, so that yabs's -e flag hides command-fn output as well as normal command output.

Fri Dec 09 2005: version 17.

Sun Feb 5 18:12:24 GMT 2006: Added -k option - keep going as much as possible after errors. Fixed bug where yabs2.appmake() always returned None, even when there was an error.

Feb 16 2006: Changed order of items returned by rule functions to <commands> <prerequisites> <semi-prerequisites> ... Improved yabs.fn() to auto-detect caller's locals() and globals().

Sun Feb 19 2006: version 18.

Fri Apr 7 12:03:17 BST 2006: added --new, --changed and --unchanged.

Mon Apr 10 02:00:37 BST 2006: added --echo-prefix.

Added concurrency support (-j <N>).

Added -s, -S and -e options.

2007 June 16: version 19.

Various minor improvements.

2007 November 26: version 20.

2010 January 25: version 21.

Improved yabs3.add_custom_params().

Give error if yabs.add_toolcommand() is given bad gcc command.

2010 February 05: version 22.

Added support for controlling elements in yabs3's names.

Optimised relativepath().

Added optional 'categories' for rules.

Added -l option to spawn new threads according to current system load.

Allow things like '-j=7' - equivalent to '-j 7'.

Always remake zero-length .o and .exe files, in case gcc leaves behind a zero-length file.

Use gcc --hash-style=both when making releases to allow binaries to run on older systems.

Added support for ARM builds.

Added support for lock files.

Avoid duplicated output from failure of common preprequisite.

Improved handling of missing/ambiguous tools.

Improved exception-diagnostics.

Added yabs3.add_lib_o() for building partialy-linked libs.

2012 November 30: version 23.

2012 December 01: version 24.