Changeset 4e9aaf5 in mainline for tools/config.py
- Timestamp:
- 2010-03-19T18:30:12Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8023571, b535aeb, e2b73d4f
- Parents:
- 3c80f2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
r3c80f2b r4e9aaf5 43 43 MAKEFILE = 'Makefile.config' 44 44 MACROS = 'config.h' 45 DEFS = 'config.defs'46 45 PRECONF = 'defaults' 47 46 … … 225 224 return True 226 225 227 def create_output(mkname, mcname, d fname, defaults, ask_names):226 def create_output(mkname, mcname, defaults, ask_names): 228 227 "Create output configuration" 229 228 … … 249 248 outmk = file(mkname, 'w') 250 249 outmc = file(mcname, 'w') 251 outdf = file(dfname, 'w')252 250 253 251 outmk.write('#########################################\n') … … 259 257 outmc.write(' ***************************************/\n\n') 260 258 261 outdf.write('#########################################\n') 262 outdf.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n') 263 outdf.write('#########################################\n\n') 264 outdf.write('CONFIG_DEFS =') 259 defs = 'CONFIG_DEFS =' 265 260 266 261 for varname, vartype, name, choices, cond in ask_names: … … 280 275 if (default == "y"): 281 276 outmc.write('/* %s */\n#define %s\n\n' % (name, varname)) 282 outdf.write(' -D%s' % varname)277 defs += ' -D%s' % varname 283 278 else: 284 279 outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, default, varname, default)) 285 outdf.write(' -D%s=%s -D%s_%s' % (varname, default, varname, default))280 defs += ' -D%s=%s -D%s_%s' % (varname, default, varname, default) 286 281 287 282 if (revision is not None): 288 283 outmk.write('REVISION = %s\n' % revision) 289 284 outmc.write('#define REVISION %s\n' % revision) 290 outdf.write(' "-DREVISION=%s"' % revision)285 defs += ' "-DREVISION=%s"' % revision 291 286 292 287 outmk.write('TIMESTAMP = %s\n' % timestamp) 293 288 outmc.write('#define TIMESTAMP %s\n' % timestamp) 294 outdf.write(' "-DTIMESTAMP=%s"\n' % timestamp) 289 defs += ' "-DTIMESTAMP=%s"\n' % timestamp 290 291 outmk.write(defs) 295 292 296 293 outmk.close() 297 294 outmc.close() 298 outdf.close()299 295 300 296 def sorted_dir(root): … … 355 351 if ((len(sys.argv) >= 3) and (sys.argv[2] == 'default')): 356 352 if (check_choices(defaults, ask_names)): 357 create_output(MAKEFILE, MACROS, DEFS,defaults, ask_names)353 create_output(MAKEFILE, MACROS, defaults, ask_names) 358 354 return 0 359 355 … … 473 469 xtui.screen_done(screen) 474 470 475 create_output(MAKEFILE, MACROS, DEFS,defaults, ask_names)471 create_output(MAKEFILE, MACROS, defaults, ask_names) 476 472 return 0 477 473
Note:
See TracChangeset
for help on using the changeset viewer.