801 # prepend beremiz include to configuration header |
801 # prepend beremiz include to configuration header |
802 H_files = [fname for fname in result.splitlines() if fname[-2:] == ".h" or fname[-2:] == ".H"] |
802 H_files = [fname for fname in result.splitlines() if fname[-2:] == ".h" or fname[-2:] == ".H"] |
803 H_files.remove("LOCATED_VARIABLES.h") |
803 H_files.remove("LOCATED_VARIABLES.h") |
804 H_files = map(lambda filename: os.path.join(buildpath, filename), H_files) |
804 H_files = map(lambda filename: os.path.join(buildpath, filename), H_files) |
805 for H_file in H_files: |
805 for H_file in H_files: |
806 with file(H_file, 'r') as original: data = original.read() |
806 with file(H_file, 'r') as original: |
807 with file(H_file, 'w') as modified: modified.write('#include "beremiz.h"\n' + data) |
807 data = original.read() |
|
808 with file(H_file, 'w') as modified: |
|
809 modified.write('#include "beremiz.h"\n' + data) |
808 |
810 |
809 self.logger.write(_("Extracting Located Variables...\n")) |
811 self.logger.write(_("Extracting Located Variables...\n")) |
810 # Keep track of generated located variables for later use by self._Generate_C |
812 # Keep track of generated located variables for later use by self._Generate_C |
811 self.PLCGeneratedLocatedVars = self.GetLocations() |
813 self.PLCGeneratedLocatedVars = self.GetLocations() |
812 # Keep track of generated C files for later use by self.CTNGenerate_C |
814 # Keep track of generated C files for later use by self.CTNGenerate_C |