***************************************************************************** * * Add the names of the object modules to the Makefile * * 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. * ******************************************************************************* * * Maintenence log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 07/14/93 11822 PVW Onsite linking * 09/22/89 6314 DTW New file * ******************************************************************************* * $OPTIONS DEFAULT * $INCLUDE UNIVERSE.INCLUDE FILENAMES.H $INCLUDE UNIVERSE.INCLUDE MACHINE.NAME * prompt "" CL = @(-4) CL.ERR = @(0,23):CL EQU BELL TO CHAR(7) 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 print @( -1 ) print @( 0, 0 ):"General Calling Interface Administration" : @( 67, 0 ) : "GCI.MAKEFILE": print @( 17, 1): 'Update the GCI Makefile "':UV.GCI:'/Makefile"': print @( 0, 2 ): str( "-", 79 ): print @( 0, 4 ): PRINTER RESET ************************************************************************** * * This program adds the names of the required GCI object modules * to the Makefile in the GCI directory. It peruses the DATA.TYPES * file and GCI file to find the file names and replaces the * "GCILIB =" line in the Makefile. If the Make.gci has been modified * so that "GCILIB =" does not exist or if Make.gci does not exist, * this program displays error messages and gives up. * ************************************************************************** * * EQU TAB1 TO CHAR(9) EQU TAB2 TO CHAR(9):CHAR(9) EQU TAB3 TO CHAR(9):CHAR(9):CHAR(9) * * open the makefile model. if the open fails print out messages * and quit. * PATH=UV.GCI:'/Make.gci' OPENSEQ PATH TO GCI.MODEL ELSE * * opening the makefile model failed * PRINT "Failed to open the file '":PATH:"'." PRINT "This file must exist and be 'readable' to complete the Makefile Update." PRINT "If the file does not exist, it may be necessary to re-install it from" PRINT "the original installation tape." STOP END * * open the Makefile and truncate. if open fails, print out messages * and quit * PATH=UV.GCI:'/Makefile' OPENSEQ PATH TO GCIMAKE THEN WEOFSEQ GCIMAKE END ELSE WRITESEQ '' ON GCIMAKE ELSE GOTO 910 END 100 READSEQ line FROM GCI.MODEL ELSE PRINT "Cannot find the GCILIB definition in the file ":UV.GCI:"/Make.gci." PRINT "The Makefile Update process has failed." STOP END IF SUBSTRINGS(line, 0, 6) <> "GCILIB" THEN WRITESEQ line ON GCIMAKE ELSE GOTO 910 GOTO 100 END line = "GCILIB = " SELECT FILE.DATA.TYPES len = 0 totlen = 8 parts = 1 200 READNEXT id ELSE GOTO 210 READ rec FROM FILE.DATA.TYPES,id ELSE PRINT "Cannot read '" : id : "'from the file DATA.TYPES." PRINT "Makefile Update has failed." STOP END module = rec<6,1> module = TRIM(module) : ".o " len = LEN(module) IF len <= 3 THEN GOTO 200 * * if there is a module name, check to see if we have already * included it in line. If line is too long, break it into * pieces (marked by value marks), end each piece with a backslash. * FINDSTR " " : module IN line SETTING fmc THEN GOTO 200 ELSE IF totlen + len > 60 THEN line = line : "\" : @VM : module : " " totlen = 1 parts += 1 END ELSE totlen += len line = line : module : " " END END GOTO 200 210 CLOSE FILE.DATA.TYPES OPEN '','GCI' TO FILE.GCI ELSE PRINT "Cannot open file GCI. Update will continue, but" PRINT "no user functions will be included in the Makefile." GOTO 310 END SELECT FILE.GCI 300 READNEXT id ELSE GOTO 305 READ rec FROM FILE.GCI,id ELSE PRINT "Cannot read '" : id : "'from the file GCI." PRINT "Makefile Update has failed." STOP END module = rec<7,1> module = TRIM(module) : ".o " len = LEN(module) IF len <= 3 THEN GOTO 300 * * if there is a module name, check to see if we have already * included it in line. If line is too long, break it into * pieces (marked by value marks), end each piece with a backslash. * FINDSTR " " : module IN line SETTING fmc THEN GOTO 300 ELSE IF totlen + len > 60 THEN line = line : "\" : @VM : module : " " totlen = 1 parts += 1 END ELSE totlen += len line = line : module : " " END END GOTO 300 * * write the list of modules into the makefile, each vm marks one * part of the line * 305 CLOSE FILE.GCI 310 FOR x = 1 TO parts WRITESEQ line<1, x> ON GCIMAKE ELSE GOTO 910 next x 400 READSEQ line FROM GCI.MODEL ELSE PRINT "Makefile Update Completed." STOP END WRITESEQ line ON GCIMAKE ELSE GOTO 910 GOTO 400 * * unable to write to the new makefile * 910 PRINT 'Unable to write to ':UV.GCI :"/Makefile." PRINT "This file and directory must be 'writable' to complete the Makefile Update." STOP END