#NEWLINE# def PDFTeXLaTeXFunction( target = None , source = None , env = None ) : #NEWLINE# #INDENT# 'A builder for TeX and LaTeX that scans the source file to\n    decide the "flavor" of the source and then executes the appropriate\n    program.' #NEWLINE# basedir = os . path . split ( str ( source [ 0 ] ) ) [ 0 ] #NEWLINE# abspath = os . path . abspath ( basedir ) #NEWLINE# if SCons . Tool . tex . is_LaTeX ( source , env , abspath ) : #NEWLINE# #INDENT# result = PDFLaTeXAuxAction ( basedir , source , env ) #NEWLINE# if ( result != 0 ) : #NEWLINE# #INDENT# SCons . Tool . tex . check_file_error_message ( env [ 'PDFLATEX' ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# result = PDFTeXAction ( target , source , env ) #NEWLINE# if ( result != 0 ) : #NEWLINE# #INDENT# SCons . Tool . tex . check_file_error_message ( env [ 'PDFTEX' ] ) #NEWLINE# #UNINDENT# #UNINDENT# return result