/* Create 'bldlevel.lnk' Wmake linker option file */

/* Author: Rob Hamerling */

/* (c) Copyright 2008..2013. Rob Hamerling. All rights reserved. */


parse arg v s m .

if m = '' then do
  say 'Usage: BUILDLEVEL <version> <subversion> <minor>'
  return 1
end

BLD_HOST = value('HOSTNAME',,'OS2ENVIRONMENT')
BLD_VEND = 'Rob Hamerling'
BLD_VERS = v'.'s
BLD_SUB  = m
BLD_DATE = '20'date('O') time('N')
BLD_DESC = 'Part of GPutils'
BLD_OPTS = '##1##' BLD_DATE '____ 'BLD_HOST'::EN::'BLD_SUB'::@@'
BLDLEVEL = '@#'BLD_VEND':'BLD_VERS'#@'BLD_OPTS||BLD_DESC

lnk = 'bldlevel.lnk'
if stream(lnk,'c','Query Exists') \= '' then
  '@erase' lnk
call stream  lnk, "C", "Open Write"
call lineout lnk, "Option Description '"BLDLEVEL"'"
call stream  lnk, "C", "Close"

return 0

