Commit da30d031 authored by R.K.Garcia's avatar R.K.Garcia
Browse files

add generation time to generated f90 code

parent 042cf564
......@@ -23,6 +23,7 @@ __docformat__ = 'reStructuredText'
import os, sys
import logging, unittest, argparse
from functools import reduce
from datetime import datetime
from pycparser import c_ast, parse_file
LOG = logging.getLogger(__name__)
......@@ -172,7 +173,7 @@ def f9x_structs(ast):
return txt
HSD_STRUCTS = """! AUTOGENERATED using fortify.py on C APIS! DO NOT EDIT
HSD_STRUCTS = """! AUTOGENERATED %sZ using fortify.py on C APIS! DO NOT EDIT
module hsd_structs
use iso_c_binding
implicit none
......@@ -185,7 +186,8 @@ end module hsd_structs
def f9x_structs_module(ast):
txt = '\n'.join(f9x_structs(ast))
return HSD_STRUCTS % txt
now = datetime.utcnow().isoformat()
return HSD_STRUCTS % (now, txt)
HSD_FUNC = """ interface
......@@ -199,7 +201,7 @@ HSD_FUNC = """ interface
"""
HSD_FUNCS = """! AUTOGENERATED using fortify.py on C APIs! DO NOT EDIT
HSD_FUNCS = """! AUTOGENERATED %sZ using fortify.py on C APIs! DO NOT EDIT
module hsd_scene
implicit none
......@@ -258,7 +260,8 @@ def f9x_funcs(ast):
def f9x_funcs_module(ast):
txt = '\n'.join(f9x_funcs(ast))
return HSD_FUNCS % txt
now = datetime.utcnow().isoformat()
return HSD_FUNCS % (now, txt)
class tests(unittest.TestCase):
......
! AUTOGENERATED using fortify.py on C APIs! DO NOT EDIT
! AUTOGENERATED 2017-10-13T18:21:09.525384Z using fortify.py on C APIs! DO NOT EDIT
module hsd_scene
implicit none
......
! AUTOGENERATED using fortify.py on C APIS! DO NOT EDIT
! AUTOGENERATED 2017-10-13T18:21:09.524446Z using fortify.py on C APIS! DO NOT EDIT
module hsd_structs
use iso_c_binding
implicit none
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment