diff mbox series

[liburing] configure: Respect relative prefix path

Message ID 20240723232026.1444-1-krisman@suse.de (mailing list archive)
State New
Headers show
Series [liburing] configure: Respect relative prefix path | expand

Commit Message

Gabriel Krisman Bertazi July 23, 2024, 11:20 p.m. UTC
When the user passes a relative path, we end up splitting the
installation in multiple directories because it is relative to $CWD,
which changes when we recurse into subdirectories.

A common idiom I use is:

  ./configure --prefix=install ; make ; make install

and that currently results in part of the installation inside prefix
and part of it elsewhere:

 $ find . -type d  -name 'install'
  ./src/install
  ./install

Not biggy, but annoying.  Let's use the path where the configure command
was invoked as basedir, like other projects usually do.

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe July 24, 2024, 12:22 a.m. UTC | #1
On Tue, 23 Jul 2024 19:20:26 -0400, Gabriel Krisman Bertazi wrote:
> When the user passes a relative path, we end up splitting the
> installation in multiple directories because it is relative to $CWD,
> which changes when we recurse into subdirectories.
> 
> A common idiom I use is:
> 
>   ./configure --prefix=install ; make ; make install
> 
> [...]

Applied, thanks!

[1/1] configure: Respect relative prefix path
      commit: 476a6a9e92f390b16d12a3d66c046d456b5783e3

Best regards,
diff mbox series

Patch

diff --git a/configure b/configure
index f6b590b..21a9356 100755
--- a/configure
+++ b/configure
@@ -10,7 +10,7 @@  for opt do
   case "$opt" in
   --help|-h) show_help=yes
   ;;
-  --prefix=*) prefix="$optarg"
+  --prefix=*) prefix="$(realpath -s $optarg)"
   ;;
   --includedir=*) includedir="$optarg"
   ;;