On 4/30/2014 11:48 AM, Jim Oberholtzer wrote:
Buck,
All valid points. My definition of a development environment includes the
debugging and other utilities included with Rational. I agree that an ant
like feature and the build deploy features would be nice, but clearly IBM
and the other tool vendors have chosen to put those into other products,
Rational Jazz and such.
Honestly, I don't hold it against IBM that this was the choice they
made. It's kind of crazy that in our market space managers expect to
budget exactly zero for development tooling that will be used to produce
software that powers a multi-million dollar company.
I don't *want* to use make but my point was that we don't even have
*that*. Although 5799-PTL provides GMAKE:
http://www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/pw_com_porting_tools_index
I noodled with it, and I can get it to brute force compile but it's
nothing like a 'real' makefile:
srclib = opensource
objlib = $(srclib)
objpath = /qsys.lib/$(objlib).lib
modules = $(objpath)/envvar.module $(objpath)/unix.srvpgm
all: $(modules)
$(objpath)/unix.srvpgm:
system "gmake '-f unix.mak'" > null
/qsys.lib/$(objlib).lib/envvar.module:
system "CRTRPGMOD MODULE($(objlib)/envvar)\
SRCFILE($(srclib)/QRPGLESRC)\
SRCMBR(envvar)\
REPLACE(*YES)\
DBGVIEW(*LIST)" > null
.PHONY: clean
clean:
-system "dltmod $(objlib)/envvar" > null
An interesting project would be to see if we could build an ant environment
that would work for IBM i projects. True the source would move to the IFS
but big whoop there, I'll bet with some thought we could do it.
David Morris had an ANT command in his iSeries Toolkit.
http://iseries-toolkit.sourceforge.net/ I have a makefile for that:
srclib = opensource
objlib = $(srclib)
objpath = /qsys.lib/$(objlib).lib
modules = $(objpath)/msgtkt.srvpgm $(objpath)/exccmd.srvpgm
$(objpath)/jobtkt.srvpgm\
$(objpath)/ant.module $(objpath)/ant.pgm $(objpath)/ant.cmd
all: $(modules)
$(objpath)/msgtkt.srvpgm:
system "gmake '-f msgtkt.mak'" > null
$(objpath)/exccmd.srvpgm:
system "gmake '-f exccmd.mak'" > null
$(objpath)/jobtkt.srvpgm:
system "gmake '-f jobtkt.mak'" > null
/qsys.lib/$(objlib).lib/ant.module:
/qsys.lib/$(objlib).lib/ant.module:
system "CRTRPGMOD MODULE($(objlib)/ant)\
SRCFILE($(srclib)/QRPGLESRC)\
SRCMBR(ant)\
REPLACE(*YES)\
DBGVIEW(*LIST)" > null
$(objpath)/ant.pgm:
system "CRTPGM PGM($(objlib)/ANT)\
BNDDIR($(objlib)/ISTKT)\
ACTGRP(QILE) OPTION(*DUPPROC)" > null
$(objpath)/ant.cmd:
system "CRTCMD CMD($(objlib)/ANT)\
PGM($(objlib)/ANT)\
SRCFILE($(srclib)/QCMDSRC)\
PRDLIB($(objlib))" > null
.PHONY: clean
clean:
-system "dltmod $(objlib)/ant" > null
-system "dltpgm $(objlib)/ant" > null
Having built that part of the toolkit, here's an ant.xml file that will
generate David's MSGTKT:
<?xml version="1.0" encoding="iso-8859-1"?>
<project basedir="." default="main" name="main">
<property name="srclib" value="OPENSOURCE"/>
<property name="objlib" value="OPENSOURCE"/>
<taskdef name="os400Command"
classname="org.iseriestoolkit.ant.OS400Command"/>
<target name="main">
<echo>Creating service program MSGTKT</echo>
<echo>${os.name}</echo>
<echo>Source library is ${srclib}</echo>
<echo>Destination library is ${objlib}</echo>
<os400Command
command="CRTRPGMOD MODULE(QTEMP/MSGTKT)
SRCFILE(${srclib}/QRPGLESRC)
SRCMBR(MSGTKT)
REPLACE(*YES) DBGVIEW(*LIST)">
</os400Command>
<os400Command
command="CRTSRVPGM SRVPGM(QTEMP/MSGTKT)
MODULE(QTEMP/MSGTKT)
SRCFILE(${srclib}/QSRVSRC)
BNDDIR(${srclib}/ISTKT QC2LE)
OPTION(*DUPPROC)
ALWLIBUPD(*YES)"/>
</target>
</project>
A topic of conversation for "Ask the Experts" night at the COMMON Annual
Meeting next week.
I'd love to be a fly on the wall...
--buck
As an Amazon Associate we earn from qualifying purchases.