diff --git a/Makefile.am b/Makefile.am index 0aa33596..820e2e54 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,7 @@ debug: $(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG" .c.h: - scripts/MakeHeader.py $< + @srcdir@/scripts/MakeHeader.py $< cppcheck: cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py index 55eeed45..c0fdc851 100755 --- a/scripts/MakeHeader.py +++ b/scripts/MakeHeader.py @@ -28,8 +28,8 @@ selfheader = '#include "' + name + '.h"' out.write( "/* Do not edit this file. It was automatically generated. */" ) out.write( "" ) -out.write( "#ifndef HEADER_" + name ) -out.write( "#define HEADER_" + name ) +out.write( "#ifndef HEADER_" + os.path.basename(name) ) +out.write( "#define HEADER_" + os.path.basename(name) ) is_blank = False for line in file.readlines(): line = line[:-1]