Gaudi Framework, version v22r4

Home   Generated: Fri Sep 2 2011
Functions

createProjVersHeader Namespace Reference

Functions

def main

Function Documentation

def createProjVersHeader::main (  )

Definition at line 1 of file createProjVersHeader.py.

00002           :
00003     import os, sys, re
00004     if len(sys.argv) != 4:
00005         print "ERROR: Usage %s <project> <version> <outputfile>"%sys.argv[0]
00006         exit(1)
00007     
00008     project, version, outputfile = sys.argv[1:]
00009     print "Creating %s for %s %s"%(outputfile, project, version) 
00010     
00011     m = re.match("(v|([A-Za-z]+\-))(?P<maj_ver>[0-9]+)(r|\-)(?P<min_ver>[0-9]+)(?:(p|\-)(?P<pat_ver>[0-9]+))?",version)
00012     majver = int(m.groupdict()['maj_ver'])
00013     minver = int(m.groupdict()['min_ver'])
00014     
00015     outdir = os.path.dirname(outputfile)
00016     if not os.path.exists(outdir):
00017         print "Creating directory", outdir
00018         os.makedirs(outdir)
00019     
00020     open(outputfile,"w").write(
00021     """#ifndef %(proj)s_VERSION
00022 /* Automatically generated file: do not modify! */
00023 #ifndef CALC_GAUDI_VERSION
00024 #define CALC_GAUDI_VERSION(maj,min) (((maj) << 16) + (min))
00025 #endif
00026 #define %(proj)s_MAJOR_VERSION %(maj)d
00027 #define %(proj)s_MINOR_VERSION %(min)d
00028 #define %(proj)s_VERSION CALC_GAUDI_VERSION(%(proj)s_MAJOR_VERSION,%(proj)s_MINOR_VERSION)
00029 #endif
00030 """%{ 'proj': project.upper(), 'min': minver, 'maj': majver })

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Fri Sep 2 2011 16:25:52 for Gaudi Framework, version v22r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004