Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#51 closed defect (fixed)

kBuild: incorrect expansion during template inheritance

Reported by: bird Owned by: bird
Priority: major Milestone: 0.1.5
Component: kBuild Version: 0.1.4
Keywords: Cc:


src/VBox/Main/webservices/Makefile.kmk in VirtualBox? exposes a problem where the simple vboxwebsrv_INCS := ... assignment causes the template INCS to be expanded at inherit time. The problem is that PATH_TOOL_VCC80AMD64_ATLMFC_INC isn't defined at that point. Changing the assignment to a recursive one vboxwebsrv_INCS = ... works around the problem.

Change History (4)

comment:1 Changed 12 years ago by bird

Status: newassigned

/utils/Makefile.kmk also seems to suffer from this wrt. to a prop that includes some DXSDK paths. It gets expanded before the SDK is loaded.

comment:2 Changed 12 years ago by bird

Resolution: fixed
Status: assignedclosed

(In [2007]) footer.kmk,tests: Convert simple variables into recursive ones by means of a helper variable during inheritance. This fixes the problem with forward references in a template when the target defined the property(.keyword) using a simple assignmnet. Fixes #51.

comment:3 Changed 12 years ago by bird

Just a little side note, the fix increases the time spent doing template expansion (or template->target inheritance if you like). This is a prime candidate for a new helper function since it will certainly save a whole bunch of variable lookups and the need to use a helper variable to convert from simple to recursive flavor.

comment:4 Changed 12 years ago by bird

Fixed the template expansion penalty introduced here by rewriting it in C, the result is a 10x speedup of this operation. Neath.

Note: See TracTickets for help on using tickets.