[PATCH BlueZ] Fix out-of-tree build with absolute source path

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

 



When running out-of-tree build using /abs/path/to/bluez/configure, the
generated Makefile uses /abs/path/to/bluez as VPATH.
Using ../configure, VPATH is set to ..

The first case generates incorrect symlinks in the lib/bluetooth
directory inside the build dir, because the rule prepended
abs_top_builddir to the absolute target path.

For example, with sources in "/home/dev/bluez" and a build in
"/home/dev/bluez build", it generates the following incorrect symlink:
    'bluez build/lib/bluetooth/bluetooth.h'
    -> '/home/dev/bluez build//home/dev/bluez/lib/bluetooth.h'

To handle both absolute and relative source dir, use abspath on the
make prerequisite.

Also-by: Loïc Yhuel <loic.yhuel@xxxxxxxxxxxxxx>
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 84e67a42c..237b05d78 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -494,7 +494,7 @@ $(lib_libbluetooth_la_OBJECTS): $(local_headers)
 
 lib/bluetooth/%.h: lib/%.h
 	$(AM_V_at)$(MKDIR_P) lib/bluetooth
-	$(AM_V_GEN)$(LN_S) -f "$(abs_top_builddir)"/$< $@
+	$(AM_V_GEN)$(LN_S) -f "$(abspath $<)" $@
 
 if COVERAGE
 clean-coverage:
-- 
2.13.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux