-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: path to root directory and root relative #225
Comments
Put this in your top-level
If you use lua, use this in
Now wherever you use this variable it will be expanded to relative path between place of use and tup-level folder of project. For example like that:
Additionally - aren't you trying to do something that is accomplished by |
As I remember I tried to fix it that way, but TUP_CWD were always expanded to '.'. My sources are placed in 'src' directory with multiple subdirectories. I have separate Tupfile for each of them. |
This (the variable $(TOP) or whatever you call it) HAS TO be put in top-level |
So, trick with TOP variable works, but I still need path relative from root directory to current directory (lets call it TUP_RWD). Let me explain why:
As you can see I'm using one variant named debug.
As you can seed 'DW_AT_comp_dir' points to virtual directory, and as a result GDB can't find source file. I think when I run gcc with option '-fdebug-prefix-map=.=$(TUP_RWD)' it will point to correct directory. |
As I suspected (; Add |
Anyway - it would be an interesting option to actually make your original proposal work, because compilation in chroot on Linux is ~2x slower than normal compilation ); It would be a nice workaround for GCC (; |
Thanks for reply, I will try ^c flag later. But I already implemented it here: #226 |
I don't think it makes sense to add variables like TUP_ROOT, since the root of the project may vary (eg: if a user runs 'tup init' at one level higher, or your project is used as a submodule of another project, etc). This is why making relative roots in Tuprules.tup with $(TUP_CWD) was designed the way it is. I'd like to fix the gdb-with-variants issue (as well as the variants-on-windows issue) by using explicit variants rather than the FUSE overlay instead. |
Big problem with this is that
And the homebrew tup package does not have CONFIG_TUP_SUDO_SUID as an option Update: I looked into adding that option to the brew recipe, and it is unlikely that a patch implementing that would ever by accepted by homebrew because it would require root privileges during the installation of tup. The only way to produce debug binaries in Mac OS X is to manually set the tup binary suid root. You also get massively degraded performance for your trouble. It would be really nice if tup could expose the |
Hi,
I need one variable with path to root directory and one with relative path from root directory to RUNNING directory (with currently parsed Tupfile). I need this to force GCC to emit proper file locations to source files for GDB.
GDB needs relative path from binary to to source file, currently with one Tupfile per directory this path get lost.
Is it possible to get directory where tup was initialized?
Is it possible to get directory from tup's root to current Tupfile?
If not, I'd like to suggest adding them :)
If think I can add these variables (TUP_ROOT and TUP_RWD maybe?), but I need your green light.
So, Is it OK to add them?
Are you going to add them?
The text was updated successfully, but these errors were encountered: