#NEWLINE# def _ReadMakefileAm( self ) : #NEWLINE# #INDENT# 'Reads Makefile.am to initialize the project information.' #NEWLINE# if ( not self . library_name ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Missing library name' ) #NEWLINE# #UNINDENT# file_object = open ( 'Makefile.am' , 'rb' ) #NEWLINE# if ( not file_object ) : #NEWLINE# #INDENT# raise IOError ( 'Unable to open: Makefile.am' ) #NEWLINE# #UNINDENT# found_subdirs = False #NEWLINE# for line in file_object . readlines ( ) : #NEWLINE# #INDENT# line = line . strip ( ) #NEWLINE# if self : #NEWLINE# #INDENT# ( library_name , _ , _ ) = line . partition ( b' ' ) #NEWLINE# if ( sys . version_info [ 0 ] >= 3 ) : #NEWLINE# #INDENT# library_name = library_name . decode ( 'ascii' ) #NEWLINE# #UNINDENT# self . include_directories . append ( library_name ) #NEWLINE# if library_name . startswith ( 'lib' ) : #NEWLINE# #INDENT# self . library_names . append ( library_name ) #NEWLINE# #UNINDENT# if ( library_name == self . library_name ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if line . startswith ( b'SUBDIRS' ) : #NEWLINE# #INDENT# found_subdirs = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# file_object . close ( ) #NEWLINE# if ( ( not self . include_directories ) or ( not self . library_names ) ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Unable to find include directories and library names in: Makefile.am' )