$! File: SET_PYTHON_IDENT.COM $! $! This procedure is used to set the IDENTIFICATION line in a linker $! option file for PYTHON. $! $! The version level is read from PRJ_INCLUDE:PATCHLEVEL.H $! $! P1 = Output for linker option file. $! P2 = VMS specific release suffix. $! $! 12-May-2002 J. Malmberg $! $!============================================================================ $! $! $! Template file must be present $!------------------------------- $if p1 .eqs. "" $then $ write sys$output "Output file ''p1' was not specified." $ exit 44 $endif $! $! First find out what the Python patchlevel is $!--------------------------------------------- $! $open/read/error=plf_loop_end plf PRJ_INCLUDE:PATCHLEVEL.H $! $plf_loop: $! $ read/end=plf_loop_end plf line_in $! $! Ignore anything except #defines $!--------------------------------- $ if line_in .eqs. "" then goto plf_loop $ if f$extract(0,7,line_in) .nes. "#define" then goto plf_loop $! $ line_len = f$length(line_in) $! $! If the line has a continuation line in it, ignore $!--------------------------------------------------- $ if f$locate("\",line_in) .lt. line_len then goto plf_loop $! $! $ line_in = f$edit(line_in,"COMPRESS,TRIM") - """" - """" $! $ key = f$element(1, " ", line_in) $ value = f$element(2, " ", line_in) $! $! $! If this is a symbol, substitute $!---------------------------------- $ if f$type(value) .EQS. "STRING" $ then $ code = f$extract(0,1,value) $ if f$type(code) .eqs. "STRING" $ then $ value = &value $ endif $ endif $! $ 'key' == "''value'" $! $ goto plf_loop $! $plf_loop_end: $close plf $! $py_ident = py_version + "-" + py_release_level $if p2 .nes. "" $then $ py_ident = py_ident + "-" + p2 $endif $! $set noon $create 'p1' $open/append pyo 'p1' $write pyo "identification = ""''py_ident'""" $close pyo