Rationalize Makefile.am source groups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Moonshot Trust-Router |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Makefile.am defines several groups of source files (common_srcs, tid_srcs, trp_srcs) which are intended to collect related collections of code for easy inclusion in the various binaries in the project. Currently, these are interdependent and must either all be included or none. To fix this bug, either these should be separated into groups that can be individually (or all) included in a binary build specification, or this illusory separation should be eliminated.
It is probably ok if both tid_srcs and trp_srcs depend on common_srcs.
This problem occurs at least because tr_msg.c contains code for encoding/decoding both TRP and TID messages. This could be eliminated by abstracting the encoder/decoder interface and moving the actual encoder/decoder functions into the TRP and TID code. This is unquestionably the clean solution, though it is unclear if it is a worthwhile investment of effort since it is unlikely we will add additional protocols that might benefit from the work/additional complexity.
Formerly, TID-related code was built into a library, libtr_tid.la. A simple attempt to create a parallel libtr_trp.la library failed due to the libraries repeating code common to the two. Another option may be to reintroduce a library housing both TID and TRP code. It's not clear whether this offers meaningful benefits without further reorganization of the project.
Changed in moonshot-tr: | |
status: | New → Triaged |