IBM / ibmi-bob

A build system for creating IBM i-native objects using GNU Make.
https://ibm.github.io/ibmi-bob
Apache License 2.0
48 stars 21 forks source link

Change DFRWRT to *NO in DSPF compilation #337

Open bmcpherson-srlife opened 4 months ago

bmcpherson-srlife commented 4 months ago

I've scoured through the documentation and examples, but I cannot determine if it possible in the in either the Rules.mk file or in the project level to change how certain display file options are set. In this case, I need to change Defer Write (DFRWRT) to NO so that the screen will automatically refresh. Below is where I can see the CRTDSPF command being run with the option listed as YES.

/QOpenSys/pkgs/bin/make -k BUILDVARSMKPATH="/tmp/tmpn65qbob5" -k BOB="/QOpenSys/pkgs/lib/bob" -f "/QOpenSys/pkgs/lib/bob/src/mk/Makefile" all make: Warning: File '/home/BMCPHERSON/builds/progress-bar/qddssrc/progbarfm.dspf' has modification time 71 s in the future === Creating DSPF [progbarfm.dspf] in bmcpherson /QOpenSys/pkgs/lib/bob/src/scripts/crtfrmstmf --ccsid JOB -f /home/BMCPHERSON/builds/progress-bar/qddssrc/progbarfm.dspf -o PROGBARFM -l bmcpherson -c CRTDSPF -p ENHDSP(YES) RSTDSP(YES) DFRWRT(YES) AUT() OPTION(EVENTF SRC *LIST) TEXT('Progress Bar Service Program') ✓ PROGBARFM.FILE was created successfully!

Please let me know if I am simply overlooking a feature of Bob. As always, I greatly appreciate the work you all do!

edmundreinhardt commented 3 weeks ago

Excellent question: It should be handleable by specifying

PROGMANFM.FILE: progmanfm.dspf
PROGMANFM.FILE: DFRWRT = *NO

But I see that the DFRWRT is hardcoded at https://github.com/IBM/ibmi-bob/blob/9455c1dc0ded5e46729bcf17acc219c2dfe52f8d/src/mk/def_rules.mk#L404 It should have been handled like ther $RSTDSP with an overwritable variable.

This is an enhancement that is pretty straightforward

edmundreinhardt commented 3 weeks ago

@SanjulaGanepola if you book my calendar, I can walk you through how to do this, but it is simply pattern matching on $RSTDSP

edmundreinhardt commented 3 weeks ago

Note @bmcpherson-srlife this could be a good first issue to attempt to fix.