Harmonize stages 0 and 2 kernel headers installation
[hvlinux.git] / stage0 / pkg / kernel-headers
diff --git a/stage0/pkg/kernel-headers b/stage0/pkg/kernel-headers
new file mode 100644 (file)
index 0000000..6a67dad
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+hvbuild()
+{
+    # Install headers
+    cd ${LFS_TMP}/${PACKAGE}
+
+    local DESTDIR=${TOOLS_DIR}/include
+    install -dv ${DESTDIR}
+
+    ${HVMAKE} mrproper
+    ${HVMAKE} ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install
+    cp -rv dest/include/* ${DESTDIR}
+    find ${DESTDIR} -name .install -or -name ..install.cmd | xargs rm -fv
+}