DEPENDENCY_TRACKING 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. DEPENDENCY TRACKING AND REDUCE
  2. Use of "make" to build everything carries with it some sort of expectation
  3. that when one of the source files is changed there will be a way to track the
  4. (potential) consequences of the change so the next rebuild will re-make the
  5. minimum set of components to propagate consequences of the change.
  6. Doing this for all of REDUCE has both technical and practical awkwardnesses.
  7. I will concentrate on the latter.
  8. REDUCE is a layered system. I will discuss it here in the context of the
  9. CSL-based variant, but similar issues (but perhaps less severe?) arise in the
  10. PSL case.
  11. The CSL based build of the whole of REDUCE from scratch involves the following
  12. steps
  13. compile the FOX GUI toolkit
  14. compile CSL sources to make a "bootstrapreduce" executable
  15. use that to process the reduce sources to create "bootstrapreduce.img"
  16. run all REDUCE tests to create profile information
  17. using the profile information compile some scattered REDUCE sources
  18. into C code
  19. compile that C and link with bits of CSL to make the "reduce" executable
  20. Using that create "reduce.img"
  21. When nothing has ever been built before all of the above steps are required.
  22. That means that each step should logically be recorded as having a dependency
  23. on the previous ones.
  24. The effect of treating all those dependencies strictly would be that making
  25. the smallest alteration anywhere in the FOX library (or for slightly curious
  26. reasons in any of the scripts used to direct anything) would lead to a heavy
  27. handed recompilation of the whole of REDUCE. However in general changes in the
  28. GUI support are really not at all liable to have any effect on what ends up
  29. in the REDUCE image files and this tedious re-build would be both frustrating
  30. and a waste.
  31. At the next level up SOME changes in the CSL kernel will indeed lead to the
  32. need for rebuilding image files, but many (perhaps most?) can be expected just
  33. to lead to a desire to re-compile the executables. If a header file in CSL is
  34. edited to add a new declaration that can often force ALL of the sources to be
  35. re-built even though the change is irrelevant to most of them.
  36. Running the profiling step is expensive, but the procedures that make use of
  37. the profile information have been designed so that there is no significant harm
  38. if it is slightly out of date. Re-compilation of parts of REDUCE into C should
  39. only be necessary rarely, even though for safety and perfection it should be
  40. done every time anything in the bootstrap world alters even slightly.
  41. My response to this has been to try to set up an incomplete set of dependencies
  42. such that rebuilding work balances safety against cost. The current scheme is
  43. that FOX is only automatically built or rebuilt if it is not initially present
  44. at all. So anybody who makes changes in that part of the tree may need to
  45. advise everybody either to delete their build versions of everything and do a
  46. full clean build or to re-make in the FOX directory by hand.
  47. Similarly I make the profiling step something that is only triggered manually,
  48. and I provide an initial sample set of profile output that should serve well
  49. enough for most purposes.
  50. The rest of the rebuilding is set up more cautiously, but on a fast current
  51. computer the full recompilation process that is the worst that it can trigger
  52. only takes a minute or so, which I hope will be found to be tolerable.
  53. Arthur Norman. July 2008