tldm-universe/Ardent/UV/APP.PROGS/GCI.NTMAKL.B
2024-09-09 17:51:08 -04:00

114 lines
3.9 KiB
Plaintext
Executable File

*****************************************************************************
*
* GCI.NTMAKL.B - create a GCI library, Windows NT version
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenance log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 04/01/96 18026 PGW Module created by adapting MAKE.NEW.UV.
*
*******************************************************************************
*
* This program builds a new GCI library automatically. It is normally run
* from the GCI.ADMIN menu, but you can run it by hand as follows:
*
* RUN APP.PROGS GCI.NTMAKL.B file.name
*
* where 'file.name' is the name of a GCI Definition file.
*
* The steps required are:
*
* 1. Catalog the GCI subroutines as required (CATLG.GCI)
*
* 2. Create a makefile (GCI.NTMAKF.B)
*
* 3. Generate the conversion module (GEN.GCI)
*
* 4. Run the makefile to build the new library.
*
*******************************************************************************
*
$OPTIONS DEFAULT
PROGRAM GCI.NTMAKL.B
ID = "@(#)%M% %I%"
$INCLUDE UNIVERSE.INCLUDE FILENAMES.H
$INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
*
EQUATE bell TO CHAR(7)
PROMPT ""
cl = @(-4)
cl.err = @(0,23):cl
err = cl.err:bell
msg10 = err:PROD.NAMEU:' General Calling Interface is not installed.'
OPEN '','DATA.TYPES' TO file.data.types ELSE
PRINT msg10:
INPUT q: ; PRINT cl.err: ; STOP
END
* You can specify the definition file by putting its name on the
* command line, otherwise it defaults to "GCI"
cmd = CONVERT(" ", @FM, TRIM(@SENTENCE))
def.file.name = cmd<4>
IF def.file.name = "" THEN def.file.name = "GCI"
sccsid = DOWNCASE(def.file.name)
conv.module = sccsid : ".c"
dll.name = sccsid : ".dll"
makefile.name = sccsid : ".mak"
PRINT @( -1 )
PRINT @( 0, 0 ):"General Calling Interface Administration" : @( 67, 0 ) : "GCI.NTMAKL.B":
PRINT @( 17, 1): 'Generate a GCI Library from GCI Definition File "':def.file.name:'"':
PRINT @( 0, 2 ): STR( "-", 79 ):
PRINT @( 0, 4 ):
PRINT 'This procedure will generate a conversion module in ':conv.module
PRINT 'and generate a ':PROD.NAMEU:' GCI library called ':dll.name:'.'
PRINT 'It will also catalog any subroutines which require cataloging.'
PRINT
PRINT 'Are you sure you want to continue? (Y/N)':
INPUT ans
ans = UPCASE(ans)
IF ans <> "Y" THEN STOP
* 1. Catalog the GCI subroutines as required (CATLG.GCI)
PERFORM 'RUN APP.PROGS CATLG.GCI ' : def.file.name
IF @SYSTEM.RETURN.CODE < 0 THEN STOP
* 2. Create a makefile (GCI.NTMAKF.B)
PERFORM 'RUN APP.PROGS GCI.NTMAKF.B ' : def.file.name
IF @SYSTEM.RETURN.CODE < 0 THEN STOP
* 3. Generate the conversion module (GEN.GCI)
PERFORM 'RUN APP.PROGS GEN.GCI ' : def.file.name
IF @SYSTEM.RETURN.CODE < 0 THEN STOP
* 4. Run the makefile to build the new library.
PRINT @( -1 )
PRINT @( 0, 0 ):"General Calling Interface Administration" : @( 68, 0 ) : "GCI.NTMAKL.B":
PRINT @( 17, 1): 'Build a new "':dll.name:'" in ':UV.GCI:"."
PRINT @( 0, 2 ): STR( "-", 79 ):
PRINT @( 0, 4 ):
xcmd = OS.EXEC:' "':UV.GCI:"\gcimake ":makefile.name:" ":dll.name:'"'
* PRINT "xcmd = '":xcmd:"'"
EXECUTE xcmd
* Done
STOP
END