makefile.4gl
Posted in 1994
Found this in my archieves this weekend and someone was asking about Makefiles
and limits using the Informix program compile.. (shame on you).
#############################################################################
#THIS program will take the contents fo a syspgm4gl.dbs and
#create simplified Makefiles based on the data in the tables. The
#The resulting Makefiles will be called <PROGRAM>.mk where PROGRAM
#is the program listed in your planned compile.
#
#To Compile: fglpc <thisfile>.4gl
#
#To run: fglgo <thisfile>.4go
#
#Note: I suggest you run this program in an empty directory with the
#directory where syspgm4gl.dbs is in your DBPATH.
#
#This program is very simplified and creates simplified makefiles, but it
#is a start if you are using Planned Compiled from within Informix.
# Also this is written only for people with RDS version of Informix.
# You will have to modify to handle the compiled version of Informix
# Or Ask me to go hunt my archieves for the copy
#
# Good Luck!
# Stuart Litel
# Internet: 75110.1120@compuserve.com
#
# P.S. - use at your own risk!! But since it does no writes to the database
# just run as I said above in an empty directory you should cause no
# problems.....
##############################################################################
database syspgm4gl
define progs char(2000)
main
define prog like source4gl.progname
define fgl like source4gl.fglsourcename
define str char(50)
declare mk_curs cursor for
select distinct progname from source4gl order by 1
let progs = NULL
foreach mk_curs into prog
let str = prog clipped, ".mk"
start report r_make to str
declare file_curs cursor for
select fglsourcename from source4gl where progname = prog
foreach file_curs into fgl
let progs = progs clipped, " ", fgl clipped, ".4go"
output to report r_make (prog,fgl)
end foreach
finish report r_make
end foreach
end main
report r_make(fgl,prog)
define fgl like source4gl.fglsourcename
define prog like source4gl.progname
output
top margin 0
left margin 0
bottom margin 0
format
first page header
print "all:\\t\\t", prog clipped, ".4gi"
skip 1 line
on every row
print fgl clipped, ".4go:\\t\\t",
fgl clipped, ".4gl"
print "\\t\\t\\t", "fglpc ", fgl clipped, ".4gl"
skip 1 line
on last row
print prog clipped, ".4gi:\\t\\t", progs clipped
print "\\t\\t\\tcat ", progs clipped, " > ", prog clipped, ".4gi"
skip 1 line
end report