Skip to content
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

@top_srcdir@ not absolute beside the documentation #16

Closed
bapt opened this issue Feb 28, 2015 · 5 comments
Closed

@top_srcdir@ not absolute beside the documentation #16

bapt opened this issue Feb 28, 2015 · 5 comments
Assignees

Comments

@bapt
Copy link

bapt commented Feb 28, 2015

I use @top_srcdir@ in compat/Makefile.in like this SRCDIR= @top_srcdir@/something and I end up with ./something instead of an absolute path (note that . is not even correct, it should be .. for relative)

@msteveb
Copy link
Owner

msteveb commented Feb 28, 2015

Thanks for the report. Are you able to create a comparative test case with autoconf? I don't see any suggestion that top_srcdir is supposed to be absolute, so in this regard autosetup is misleading.

There seems to be abs_top_srcdir. Should autosetup add support for this variable?

@msteveb
Copy link
Owner

msteveb commented Feb 28, 2015

BTW. Why do you want to use @top_srcdir@ rather than @SrcDir@? make-template carefully arranges for @SrcDir@ to be the relative path to the top of the source, which is normally what you want.

@bapt
Copy link
Author

bapt commented Feb 28, 2015

It does not
here is my test:

compat/Makefile.in:
s = @SrcDir@
ts = @top_srcdir@

With autosetup the generated Makefile is:
s = .
ts = .

with autoconf, the generated Makefile is:
s = .
ts = ..

Note that is works for both as I expect when build outsource
mkdir /tmp/build
~/test/configure
cat compat/Makefile

With autoconf:
s = /home/bapt/test/compat
ts = /home/bapt/test

with autosetup
s = /home/bapt/test/compat
ts = /home/bapt/test

Also works when outdir is inside the sourcedir
mkdir build
../configure

with autoconf:
cat compat/Makefile
s = ../compat
ts = ..

with autosetup
cat compat/Makefile
s = ../compat
ts = ..

@msteveb
Copy link
Owner

msteveb commented Feb 28, 2015

Can you try this fix and let me know if you agree it is correct?

https://gist.github.com/msteveb/ff4830198312181a8e2c

@msteveb msteveb self-assigned this Mar 1, 2015
@bapt
Copy link
Author

bapt commented Mar 1, 2015

tested with success, thank you !

@msteveb msteveb closed this as completed Mar 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants