Possible to regenerate headers outside of srcdir

This commit is contained in:
Robert Rosengren 2013-11-29 13:27:53 +01:00
parent 76a715ee8c
commit 5aac1733a6
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ debug:
$(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG" $(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG"
.c.h: .c.h:
scripts/MakeHeader.py $< @srcdir@/scripts/MakeHeader.py $<
cppcheck: cppcheck:
cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS

View File

@ -28,8 +28,8 @@ selfheader = '#include "' + name + '.h"'
out.write( "/* Do not edit this file. It was automatically generated. */" ) out.write( "/* Do not edit this file. It was automatically generated. */" )
out.write( "" ) out.write( "" )
out.write( "#ifndef HEADER_" + name ) out.write( "#ifndef HEADER_" + os.path.basename(name) )
out.write( "#define HEADER_" + name ) out.write( "#define HEADER_" + os.path.basename(name) )
is_blank = False is_blank = False
for line in file.readlines(): for line in file.readlines():
line = line[:-1] line = line[:-1]