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
47 stars 20 forks source link

Log files not generated for recipes using extractAndLaunch #320

Closed irfanshar closed 2 months ago

irfanshar commented 3 months ago

Spool files are not generated for any recipes that use extractAndLaunch.sh, but the joblog.json shows that they exit

irfanshar commented 2 months ago

https://github.com/IBM/ibmi-bob/blob/d741050ea70c32474d58a5f0897ab0056d9a611e/src/mk/def_rules.mk#L1381

https://github.com/IBM/ibmi-bob/blob/d741050ea70c32474d58a5f0897ab0056d9a611e/src/mk/def_rules.mk#L1391

The problem is here. Recipes that use extractAndLaunch are still outputting to output.log instead of their own log files. The fix is easy, just change from using $(LOGFILE) to $(logfile).

However, this now brings to light a pre-existing problem. In https://github.com/IBM/bob-recursive-example we have QCLSRC/PAR201.CLLE and QILESRC/PAR201.ILEPGM. If we make the change, both will generate a PAR201.splf, and whichever object is built more recently will overwrite the previous one.

@edmundreinhardt if two files have the same name, but in different directories, what behaviour do you think makes sense for our splf.

I was thinking of updating our logic to object.extension.splf.

So in our example we would have PAR201.CLLE.splf and PAR201.ILEPGM.splf.

What do you think?

edmundreinhardt commented 2 months ago

This is an excellent question.
I suppose the only way to be absolutely sure we are not conflicting is to use the path as well. i.e. QCLSRC_PAR201_CLLLE.splf QILESRC_PAR201._ILEPGM.splf

I am using _ because we get into trouble sometimes with the . when code is parsing for file extensions