@ -90,7 +90,7 @@ def patch_makefile_am(protoname):
output = io . StringIO ( )
with open ( " src/Makefile.am " ) as infile :
for line in infile :
if line . startswith( " app-layer-template. c " ) :
if line . lstrip( ) . startswith( " app-layer-template. " ) :
output . write ( line . replace ( " template " , protoname . lower ( ) ) )
output . write ( line )
open ( " src/Makefile.am " , " w " ) . write ( output . getvalue ( ) )
@ -277,7 +277,7 @@ def logger_patch_makefile_am(protoname):
output = io . StringIO ( )
with open ( filename ) as infile :
for line in infile :
if line . startswith( " output-json-template. c " ) :
if line . lstrip( ) . startswith( " output-json-template. " ) :
output . write ( line . replace ( " template " , protoname . lower ( ) ) )
output . write ( line )
open ( filename , " w " ) . write ( output . getvalue ( ) )
@ -337,7 +337,7 @@ def detect_patch_makefile_am(protoname, buffername):
output = io . StringIO ( )
with open ( filename ) as infile :
for line in infile :
if line . startswith( " detect-template-buffer. c " ) :
if line . lstrip( ) . startswith( " detect-template-buffer. " ) :
new = line . replace ( " template-buffer " , " %s - %s " % (
protoname . lower ( ) , buffername . lower ( ) ) )
output . write ( new )
@ -397,8 +397,8 @@ just one or the other use the --parser or --logger command line flags.
Examples :
% ( progname ) s DNP3
% ( progname ) s Gopher
% ( progname ) s - - logger DNP3
% ( progname ) s - - parser Gopher
This script can also setup a detect buffer . This is a separate
operation that must be done after creating the parser .
@ -545,7 +545,7 @@ The following files have been created and linked into the build:
if parser or logger :
print ( """
Suricata should now build cleanly . Try running " make" .
Suricata should now build cleanly . Try running " ./configure" and " make" .
""" )
if __name__ == " __main__ " :