- ifndef_name = cpp_util.GenerateIfndefName(self._namespace.source_file_dir,
- self._target_namespace)
+ # Hack: for the purpose of gyp the header file will always be the source
+ # file with its file extension replaced by '.h'. Assume so.
+ output_file = os.path.splitext(self._namespace.source_file)[0] + '.h'
+ ifndef_name = cpp_util.GenerateIfndefName(output_file)
+