Skip to content

include file content dependent on installed program versions

Notifications You must be signed in to change notification settings

dffischer/waf-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

waftool for program version dependent inclusion

This tool teaches Waf to pre-process files dependent on program versions. During configuration, the versions of installed programs can be queried. When building, files can then be marked up to include or leave out spans of their content according to these version numbers. This is, for example, useful

  • to adapt configuration files to dynamically use features only available from a certain version on,
  • adapt wrappers to arguments that were added, removed or modified,
  • adapt to API changes introduced with a dedicated version or
  • work around bugs only present in old versions.

Usage

The included example shows how to use it in a wafscript.

The tool can readily be loaded as long as it is found by the python module import mechanism. This is normally done by prepending the directory it resides in to the PYTHONPATH environment variable. So the following command build a waf executable from git including this tool.

git clone https://github.com/waf-project/waf
cd waf
git clone https://github.com/dffischer/waf-version
./waf-light configure --prefix=/usr \
  build --make-waf --tools='waf-version/gse.py'

About

include file content dependent on installed program versions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages