diff options
author | David Robillard <d@drobilla.net> | 2018-09-15 14:48:03 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-15 14:50:46 +0200 |
commit | 982416b8a6c6728e200243e1be3ab60435c08830 (patch) | |
tree | ff0760d5f3f0e994413c8c1dff7a4fed37914bee /extras | |
parent | 9eb0cf856c394d9354a15c606107ca294db406bb (diff) | |
download | autowaf-982416b8a6c6728e200243e1be3ab60435c08830.tar.gz autowaf-982416b8a6c6728e200243e1be3ab60435c08830.tar.bz2 autowaf-982416b8a6c6728e200243e1be3ab60435c08830.zip |
Fix version definition for projects with special characters
Diffstat (limited to 'extras')
-rw-r--r-- | extras/autowaf.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py index 6fec248..a4a06ba 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -310,7 +310,8 @@ def configure(conf): # Define version in configuration appname = getattr(Context.g_module, Context.APPNAME, 'noname') version = getattr(Context.g_module, Context.VERSION, '0.0.0') - define(conf, appname.upper() + '_VERSION', version) + defname = appname.upper().replace('-', '_').replace('.', '_') + define(conf, defname + '_VERSION', version) conf.env.prepend_value('CFLAGS', '-I' + os.path.abspath('.')) conf.env.prepend_value('CXXFLAGS', '-I' + os.path.abspath('.')) |