| 20 Feb 2025 |
John Ericson | * emily: we are trying to do the meson version of that | 19:06:23 |
John Ericson | with meson subprojects | 19:06:27 |
John Ericson | but it is designed to not require installing | 19:06:36 |
emily | perhaps you can use fs.copyfile to copy headers into an include/nix/* directory in the build tree and then have that be the include directory | 19:06:50 |
John Ericson | (installing is all side effects not ninja target direven, like most build systems) | 19:06:54 |
John Ericson | fs.copyFile will do it at configure time | 19:07:02 |
emily | I think that that should work and satisfy ^ strongly | 19:07:07 |
emily | it says "Copy a file from the source directory to the build directory at build time", is that inaccurate? | 19:07:18 |
John Ericson | which will kill the debug cycle | 19:07:19 |
emily | it returns a custom_target() | 19:07:22 |
emily | which would run at build time, afaik. | 19:07:27 |
John Ericson | oh woah | 19:07:29 |
John Ericson | ok sorry | 19:07:34 |
John Ericson | I didn't know any of the fs.* things were deferred actions | 19:07:45 |
emily | so you enumerate (or glob I guess if you have to) the headers from source ā that part would be configure time, I suppose ā fs.copyfile them to include/nix, and include in the build directory that can be the resulting library's include directory | 19:08:16 |
John Ericson | we already don't have glob (RIP) | 19:08:26 |
John Ericson | so making a bunch of separate build targets is OK | 19:08:35 |
emily | seems like a silly amount of ceremony but you can probably abstract it into the existing support thing. | 19:10:33 |
emily | and that at least ensures that downstream code only sees the include/ as it will be installed | 19:10:49 |
emily | regardless of source organization | 19:10:54 |
John Ericson | yes | 19:10:59 |
John Ericson | emily: I did the symlink wrong and broke git :D | 19:22:37 |
emily | still don't think you need an in-source symlink at all :P | 19:23:36 |
John Ericson | I don't but I think it is an easier first step in some respects | 19:24:41 |
John Ericson | * I don't either, but I think it is an easier first step in some respects | 19:24:46 |
emily | FWIW, from some digging it looks like apparently the requiring -Iā¦/nix thing dates back to 2.19⦠| 19:25:22 |
John Ericson | I think it is effectively older | 19:25:44 |
John Ericson | oh requiring | 19:25:49 |
John Ericson | some things came up because unit tests | 19:25:57 |
emily | if there's already a list of the header files in the source then it's only a few lines of Meson to loop over them to make an include/ in the build directory that can be used for both installation and downstream internal consumers, right? | 19:27:07 |