#!/usr/local/rexx/rxx /* * rxqbld - program to build the rxqueue application that illustrates * uni-REXX Interprocess Communication (IPC) * * Syntax: rxqbld [-h] * * * Without operands, rxqbld prompts for the location of required header * files and libraries and builds the rxqueue application. * * Operands: -h help (see the subroutine named "help") * * * Modification History: * * 23 Mar 94 pjt Initial implementation * * */ signal on halt signal on novalue parse arg flag if flag = '-h' then call help /* if the user asked for help, give it */ call setup /* get directory information for required files */ say '' say 'Ignore any warning messages that may appear below' say '' say 'If error messages appear, contact TWG technical support for assistance' say '' say '' address unix 'make -f mkrxq' /* do the build */ exit setup: /* * subroutine to prompt for and validate existence and permissions of * directories for source files, header files, and archive library */ 'clear' ok = 1 say '' say 'Directory name where rxqueue source file resides?' say ' Default is current working directory' say '' parse pull reply if reply = '' then sampdir = getcwd() else sampdir = reply say '' say 'Directory name where irx.h, librx.a, and librxi.a files reside?' say ' Default is /usr/local/bin' say '' parse pull reply if reply = '' then libdir = '/usr/local/bin' else libdir = reply address unix 'test -d' sampdir if rc \= 0 then do say 'Directory:' sampdir 'does not exist' ok = 0 end else do address unix 'test -w' sampdir if rc \= 0 then do say 'Directory:' sampdir 'does not have write permission' ok = 0 end end address unix 'test -d' libdir if rc \= 0 then do say 'Directory:' libdir 'does not exist' ok = 0 end else do address unix 'test -r' libdir if rc \= 0 then do say 'Directory:' libdir 'does not have read permission' ok = 0 end end if \ok then do /* if problems with directories, print messages */ say '' /* and exit */ say 'Please verify directory names and/or permissions before running' say 'rxqbld again.' say '' say 'Exiting now.' exit end else do /* otherwise */ call putenv 'RXQSRC='sampdir /* set environment variables */ call putenv 'REXXLIB='libdir first_time = 0 /* say "We've been here" */ end /* and return */ return help: /* * subroutine to display help information on the use of the rxqbld * program */ 'clear' say '' say 'Syntax: rxqbld -h View this help information' say ' rxqbld Generate the rxqueue application' say '' say '' say 'This program prompts you for the location of the source files required' say 'to build the rxqueue application. You must have write permission for' say 'this directory.' say '' say 'It also prompts you for the location of the header file irx.h and the' say 'archive libraries librx.a and librxi.a on your system. You must have' say 'read permission for this directory.' say '' say 'In both cases, it tells you the default directory that will be used.' say '' say 'Press Enter to accept the default' say '' say 'Type the full directory path name to change the default' say '' say '' say 'To build rxqueue now: Press Enter' say 'To exit this program: Type Q' say '' pull reply if reply = 'Q' then exit return halt: say '' say 'Program interrupted by halt signal - probably ctl-C' say 'Terminating now' exit novalue: say '' say 'Uninitialized variable detected at line' sigl say 'Contact TWG Technical Support for assistance' exit