src = ''
for section in sections:
+ # CTF writer is not part of the Babeltrace library
if 'ctf' in section.title.lower():
continue
src += '/* {} */\n'.format(section.title)
+ lines = []
for filename in sorted(section.filenames):
- src += '#include <{}>\n'.format(filename)
+ # not part of the API
+ if 'func-status' in filename:
+ continue
+ lines.append('#include <{}>\n'.format(filename))
+
+ lines.sort()
+ src += ''.join(lines)
src += '\n'
return src[:-1]
with open('include/Makefile.am') as f:
sections = _get_sections(f)
- print('''#ifndef BABELTRACE_BABELTRACE_H
-#define BABELTRACE_BABELTRACE_H
+ print('''#ifndef BABELTRACE2_BABELTRACE_H
+#define BABELTRACE2_BABELTRACE_H
/*
* Babeltrace API
*/
''')
print(_c_includes_from_sections(sections))
- print('#endif /* BABELTRACE_BABELTRACE_H */')
+ print('#endif /* BABELTRACE2_BABELTRACE_H */')
+
if __name__ == '__main__':
_main()