Ticket #37679

Use $(realpath) more in VPATH builds

Open Date: 2017-11-19 01:28 Last Update: 2021-06-26 07:54

5 - Medium


Currently, the Automake files for parasite packages that copy things from the parent and each other, are a mess. GNU for inscrutable reasons of its own wants to push us into supporting VPATH builds, with source and object files in separate directories, and so make distcheck does at least two VPATH builds and complains if the results aren't perfect. Some of our parasite packages want to copy around source files, which puts the resulting copied files in a difficult status - "source" if you are building the parasite from its own distribution or within-tree, and "object" (because generated by the Makefile) if you are building in a VPATH environment. We have a system (the $(mvp) hack) for dealing with these issues, but as of right now (packaging the 0.10 release, which is currently half a day late) it operates on the assumption VPATH is absolute, which turns out not to be the case in some of the builds done by make distcheck. I was up half the night trying to debug the resulting problems one file at a time and I've been throwing in ad hoc solutions for each failed build, some of them with conditionals built in, some by copying the files from source to object directories during build, and so on. The result will end up good enough to release for 0.10, but there should be a more general solution before 0.11. It *may* be enough or nearly enough to include a $(realpath) function in the definition of $(mvp) to force it to absolute; if so, it'll also be appropriate to remove all the miscellaneous hacks I added last night.

Ticket History (2/2 Histories)

2017-11-19 01:28 Updated by: mskala
  • New Ticket "Use $(realpath) more in VPATH builds" created
2021-06-26 07:54 Updated by: mskala
  • Status Update from Open to Closed
  • Resolution Update from None to Fixed

Using "realpath" (or "abspath", which is similar) doesn't seem like a good plan because Automake's "make distcheck" wants to not only set the VPATH to a relative path, but also depends on patch constructed using it staying relative. If we force our mvp variable to be absolute, it ends up being used in pathnames that Automake's scripting will look at, and it all goes pear-shaped.

I've checked in some changes that clean up this stuff as far as I think is reasonable, mostly by adding targets to force copying of files that need it, when building in parasite mode, even if the current build doesn't actually use them. This way we can build a valid standalone package within a complete Tsukurimashou tree by doing config enable-parasite=yes, make clean make, config enable parasite=no, make distcheck. Some hacks may remain but it makes sense to fix them as they come up, rather than (after years of development) trying to go back and change things that are currently working pretty well.

Attachment File List

No attachments


You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login