Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 575591caf1e8972f765885679b76787ef92de77b Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Mon, 24 Apr 2017 04:24:10 -0400 |
| 4 | Subject: [PATCH] libntfs-3g/Makefile.am: fix install failed while host dir not exist |
| 5 | |
| 6 | While cross compiling, if the dir of "$(rootlibdir)" and "$(libdir)" |
| 7 | (such as "/usr/lib64") do not exist on host system, the do_instal failed. |
| 8 | ----------------------- |
| 9 | make[3]: Entering directory `tmp/work/core2-64-wrs-linux/ntfs-3g-ntfsprogs/2017.3.23-r0/build/libntfs-3g' |
| 10 | if [ ! "/usr/lib64" -ef "/usr/lib64" ]; then \ |
| 11 | mv -f "tmp/work/core2-64-wrs-linux/ntfs-3g-ntfsprogs/2017.3.23-r0/image//usr/lib64"/libntfs-3g.so* \ |
| 12 | "tmp/work/core2-64-wrs-linux/ntfs-3g-ntfsprogs/2017.3.23-r0/image//usr/lib64"; \ |
| 13 | fi |
| 14 | mv:...are the same file |
| 15 | ----------------------- |
| 16 | |
| 17 | Use `=' rather than `-ef' to compare them, the cross compile does not |
| 18 | care about host dir. |
| 19 | |
| 20 | Upstream-Status: Pending |
| 21 | |
| 22 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 23 | --- |
| 24 | libntfs-3g/Makefile.am | 6 +++--- |
| 25 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 26 | |
| 27 | diff --git a/libntfs-3g/Makefile.am b/libntfs-3g/Makefile.am |
| 28 | index d6b150e..806109d 100644 |
| 29 | --- a/libntfs-3g/Makefile.am |
| 30 | +++ b/libntfs-3g/Makefile.am |
| 31 | @@ -59,15 +59,15 @@ endif |
| 32 | # And create ldscript or symbolic link from /usr |
| 33 | install-exec-hook: install-rootlibLTLIBRARIES |
| 34 | if INSTALL_LIBRARY |
| 35 | - if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
| 36 | + if [ "$(rootlibdir)" != "$(libdir)" ]; then \ |
| 37 | $(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)"; \ |
| 38 | fi |
| 39 | if GENERATE_LDSCRIPT |
| 40 | - if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
| 41 | + if [ "$(rootlibdir)" != "$(libdir)" ]; then \ |
| 42 | $(install_sh_PROGRAM) "libntfs-3g.script.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \ |
| 43 | fi |
| 44 | else |
| 45 | - if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
| 46 | + if [ "$(rootlibdir)" != "$(libdir)" ]; then \ |
| 47 | $(LN_S) "$(rootlibdir)/libntfs-3g.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \ |
| 48 | fi |
| 49 | endif |
| 50 | -- |
| 51 | 2.8.1 |
| 52 | |