[hipl-commit] [tiny] Rev 3745: Added warning to files generated by process_modules.py.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 30 Mar 2010 18:23:17 +0300

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: 30/03/2010 at 18:23:17
Revision: 3745
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Added warning to files generated by process_modules.py.

Modified:
  M  process_modules.py

=== modified file 'process_modules.py'
--- process_modules.py  2010-03-30 13:00:14 +0000
+++ process_modules.py  2010-03-30 15:23:13 +0000
@@ -12,7 +12,8 @@
 HEADER_FILE_DIR    = MODULES_DIR
 HEADER_FILE_SUFFIX = '_modules.h'
 
-### Functions ###
+WARNING_STRING = 'WARNING This file was generated by process_modules.py - '
+WARNING_STRING += 'Do NOT edit!'
 
 # Parses the XML document at 'path' and returns a dictionary with module info
 def parse_module_info(path, applications, required_modules):
@@ -181,8 +182,8 @@
         try:
             hdr_file = open(hdr_file_path, 'w')
             try:
-                app_string = 'HIP_' + current_app.upper() + '_MODULES_H'
-
+                app_string = 'HIP_MODULES_' + current_app.upper() + 
'_MODULES_H'
+                hdr_file.write('/* ' + WARNING_STRING + ' */\n')
                 hdr_file.write('#ifndef ' + app_string + '\n')
                 hdr_file.write('#define ' + app_string + '\n')
 
@@ -252,6 +253,7 @@
 
     file_path = 'Makefile.modules'
     makefile_modules = open(file_path, 'w')
+    makefile_modules.write('# ' + WARNING_STRING + '\n')
 
     # Include Makefile.am's from modules
     for current in module_info.keys():

Other related posts:

  • » [hipl-commit] [tiny] Rev 3745: Added warning to files generated by process_modules.py. - Tim Just