From: Dave Chinner Date: Thu, 30 Jul 2015 23:05:58 +0000 (+1000) Subject: xfsprogs: build fails to find platform_defs.h X-Git-Tag: v4.2.0-rc1~4^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cebd3912f0a40b5f5727309929227309fa770ef2;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: build fails to find platform_defs.h 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 Signed-off-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/Makefile b/Makefile index d04f853b6..24b9e2e11 100644 --- 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) diff --git a/include/Makefile b/include/Makefile index 70e43a05b..6b9c7f0bf 100644 --- a/include/Makefile +++ b/include/Makefile @@ -18,8 +18,16 @@ 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) diff --git a/libxfs/crc32.c b/libxfs/crc32.c index 0a8d3093f..bc1fc9895 100644 --- a/libxfs/crc32.c +++ b/libxfs/crc32.c @@ -33,10 +33,9 @@ * match the hardware acceleration available on Intel CPUs. */ -//#include -#include -#include -#include +#include "xfs/platform_defs.h" +#include "xfs/swab.h" +#include "xfs/xfs_arch.h" #include "crc32defs.h" /* types specifc to this file */