[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed] Fix hardcoded path in configure



Hi,

The configure script generates a Makefile containing:
...
srcdir:=$(shell pwd -P)/../src
...
which assumes that the sources are located in a $build/../src directory.

Fix this by getting the source path using the path to the configure script.

Committed to trunk.

Thanks,
- Tom

Fix hardcoded path in configure

2019-07-02  Tom de Vries  <tdevries@suse.de>

	PR dwz/24755
	* configure: Don't assume sources are in $build/../src.

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 92a02e7..24f3fd2 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,8 @@
 #!/bin/sh
+srcdir=$(cd $(dirname $0); pwd -P)
 
 cat > Makefile <<EOF
-srcdir:=\$(shell pwd -P)/../src
+srcdir:=$srcdir
 
 default:
 	\$(MAKE) -f \$(srcdir)/Makefile srcdir=\$(srcdir)