Include all headers regardless of depth
The previous hack for this was to move headers 3 levels deep in to the top level include dir and headers 4 levels deep in to sys. Obviously this was fairly limiting and missed two important headers. ./zfs/include/sys/fm/fs/zfs.h ./zfs/include/sys/fs/zfs.h This patch updates the code to be smarter and installs all the headers to the correct location regardless of depth. Each header will have its leading 3 path args stripped (i.e. ./zfs/include/) and replaced with the correct install destination. All path information past the first three levels will be preserved.
This commit is contained in:
parent
835a21a54a
commit
3a9850385c
|
@ -23,12 +23,8 @@ modules_install:
|
|||
# Install the required headers in to the kernel source
|
||||
destname=zfs-@ZFS_META_VERSION@/@LINUX_VERSION@; \
|
||||
instdest=$(DESTDIR)/@prefix@/src/$$destname; \
|
||||
(mkdir -p $$instdest && \
|
||||
find . -mindepth 3 -maxdepth 3 -name '*.h' | \
|
||||
xargs cp -t $$instdest) || exit 1; \
|
||||
(mkdir -p $$instdest/sys && \
|
||||
find . -mindepth 4 -maxdepth 4 -name '*.h' | \
|
||||
xargs cp -t $$instdest/sys) || exit 1;
|
||||
(find . -mindepth 3 -name '*.h' | xargs -Ihdr sh -c \
|
||||
"DEST=hdr && install -D hdr $$instdest/\$${DEST#*/*/*/}") || exit 1
|
||||
|
||||
distdir:
|
||||
distfiles=`find . -name '*.c' -o -name '*.h'`; \
|
||||
|
|
Loading…
Reference in New Issue