diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -36,10 +36,11 @@ env.ParseConfig('pkg-config --cflags --libs gthread-2.0') def build_ui(target, source, env): f = open(str(target[0]), 'w') - f.write('#ifndef _WALLS_UI_H_\n') - f.write('#define _WALLS_UI_H_\n') + uiname = str(target[0]).rsplit('.', 1)[0] + f.write('#ifndef _%s_H_\n' % uiname.upper()) + f.write('#define _%s_H_\n' % uiname.upper()) f.write('#include <gtk/gtk.h>\n') - f.write('gchar *%s_string = \n' % str(target[0]).rsplit('.', 1)[0]) + f.write('gchar *%s_string = \n' % uiname) for line in open(str(source[0]), 'r'): f.write('"%s"\n' % line.replace('"', '\\"').strip()) f.write(';\n') @@ -50,6 +51,7 @@ ui_builder = Builder(action = build_ui) env['BUILDERS']['walls_ui'] = ui_builder env.walls_ui('walls_ui.h', 'walls.ui') env.walls_ui('tags_ui.h', 'tags.ui') +env.walls_ui('config_ui.h', 'config.ui') walls = env.Program('walls', Glob('*.c')) destdir = ARGUMENTS.get('DESTDIR', '') |