Skip to content

Conversation

@worksofliam
Copy link
Member

@worksofliam worksofliam commented Jun 26, 2025

@SanjulaGanepola found a bug in ibmi-company_system where the makefile targets were missing POPEMP and POPDEPT causing an error in the build:

image

I confirmed that:

$(PREPATH)/DEPTS.PGM: $(PREPATH)/EMPLOYEES.PGM $(PREPATH)/NEWEMP.PGM $(PREPATH)/DEPARTMENT.FILE $(PREPATH)/DEPTS.FILE
$(PREPATH)/EMPDET.SRVPGM: $(PREPATH)/EMPDET.MODULE
$(PREPATH)/EMPDET.MODULE: $(PREPATH)/EMPLOYEE.FILE $(PREPATH)/DEPARTMENT.FILE
$(PREPATH)/EMPLOYEES.PGM: $(PREPATH)/APP.BNDDIR $(PREPATH)/EMPLOYEE.FILE $(PREPATH)/EMPS.FILE
$(PREPATH)/NEWEMP.PGM: $(PREPATH)/EMPLOYEE.FILE $(PREPATH)/NEMP.FILE
$(PREPATH)/TEMPDET.MODULE: $(PREPATH)/EMPLOYEE.FILE $(PREPATH)/DEPARTMENT.FILE $(PREPATH)/EMPDET.SRVPGM
$(PREPATH)/APP.BNDDIR: $(PREPATH)/EMPDET.SRVPGM

This was due to some logic in how we interpret the Rules.mk files when building the makefile. We were letting those rules override the dependencies that were found by SO. Here is how the rules were setup for those objects:

POPDEPT.PGM: popdept.sqlprc
POPEMP.PGM: popemp.sqlprc

Additionally, a bug has been fixed where the incorrect command was being generated in the makefile. This was due to a new feature that was added for 'steps' (not yet out) and was being included as part of the makefile by default. This caused incorrect commands to be used when actions.json existed, causing a break in existing builds.


This fix, instead of removing the existing rules, combines them with the rules defined in Rules.mk. Also, fixes a small bug with adding dependencies from SQL sources.

Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
@worksofliam worksofliam changed the title Fix Rules.mk blanking out dependencies Fix Rules.mk blanking out dependencies, fix incorrect actions.json usage Jun 26, 2025
Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@worksofliam worksofliam merged commit 5b5a455 into main Jun 26, 2025
3 of 5 checks passed
@worksofliam worksofliam deleted the fix/makefile_rules_override branch June 26, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants