]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: build fails to find platform_defs.h
authorDave Chinner <dchinner@redhat.com>
Thu, 30 Jul 2015 23:05:58 +0000 (09:05 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:05:58 +0000 (09:05 +1000)
Commit 2fe8a2 ("libxfs: restructure to match kernel layout") failed
to link plaftorm_defs.h into include/xfs, and so the system header
file is used instead if it exists. If it doesn't exist, the n the
build fails.

Classify platform_defs.h as a header file that is installed in the
xfsprogs package into /usr/include/xfs, and remove the special
one-off install rule that puts it into that directory. This also
ensures that a build will always find platform_defs.h in
./include/xfs rather than relying on the system includes to provide
it, hence also solving the build issue.

Also, to prevent errors in cleaning rules which may check for
dependencies in include/xfs, move the include subdir to the end of
the $SUBDIR list so that it is processed last and include/xfs is not
removed until the very last stage of the clean process runs.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Makefile
include/Makefile
libxfs/crc32.c

index d04f853b652e7bc3c3cf2062a21b5344e096cf3f..24b9e2e11c22a2f674ecc54d9de2be34a573c6a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,8 @@ LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
 TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
                mdrestore repair rtcp m4 man doc po debian
 
-SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
+# include is listed last so it is processed last in clean rules.
+SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) include
 
 default: include/builddefs include/platform_defs.h
 ifeq ($(HAVE_BUILDDEFS), no)
index 70e43a05be08d12c092fe7ba683bd865ffda39dd..6b9c7f0bfe713e69294923b179244265149fbaf2 100644 (file)
 TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
-QAHFILES = libxfs.h libxlog.h \
-       atomic.h bitops.h cache.h kmem.h list.h hlist.h parent.h radix-tree.h \
+QAHFILES = libxfs.h \
+       libxlog.h \
+       atomic.h \
+       bitops.h \
+       cache.h \
+       hlist.h \
+       kmem.h \
+       list.h \
+       parent.h \
+       radix-tree.h \
        swab.h \
        xfs_arch.h \
        xfs_btree_trace.h \
@@ -30,8 +38,13 @@ QAHFILES = libxfs.h libxlog.h \
        xfs_trace.h \
        xfs_trans.h
 
-HFILES = handle.h jdm.h xqm.h xfs.h
-HFILES += $(PKG_PLATFORM).h
+HFILES = handle.h \
+       jdm.h \
+       $(PKG_PLATFORM).h \
+       platform_defs.h \
+       xfs.h \
+       xqm.h
+
 PHFILES = darwin.h freebsd.h irix.h linux.h gnukfreebsd.h
 DKHFILES = volume.h fstyp.h dvh.h
 LIBHFILES = command.h input.h path.h project.h
@@ -62,7 +75,6 @@ include $(BUILDRULES)
 install-dev: default
        $(INSTALL) -m 755 -d $(PKG_INC_DIR)
        $(INSTALL) -m 644 $(HFILES) $(PKG_INC_DIR)
-       $(INSTALL) -m 644 platform_defs.h $(PKG_INC_DIR)
 
 install-qa: install-dev
        $(INSTALL) -m 644 $(QAHFILES) $(PKG_INC_DIR)
index 0a8d3093f155a599d47932381a71354a3436add2..bc1fc98952d1d50754b3f126428f531e9c321988 100644 (file)
  * match the hardware acceleration available on Intel CPUs.
  */
 
-//#include <libxfs.h>
-#include <xfs/platform_defs.h>
-#include <xfs/swab.h>
-#include <xfs/xfs_arch.h>
+#include "xfs/platform_defs.h"
+#include "xfs/swab.h"
+#include "xfs/xfs_arch.h"
 #include "crc32defs.h"
 
 /* types specifc to this file */