]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - debian/rules.d/3-binary-indep.mk
UBUNTU: [debian] Document binary-indep dependency chain
[mirror_ubuntu-zesty-kernel.git] / debian / rules.d / 3-binary-indep.mk
index e4f7d7b1eb20fa230a3ac3b971ed033a44452b47..5cfdfe6d14cdf55fa25a5db0b1d6ab082a13bce8 100644 (file)
@@ -1,6 +1,33 @@
 build-indep:
        @echo Debug: $@
 
+# The binary-indep dependency chain is:
+#
+# install-headers <- install-doc <- install-source <- install-tools <- install-indep <- binary-indep
+# install-headers <- binary-headers
+#
+indep_hdrpkg = $(hdrs_pkg_name)
+indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
+install-headers:
+       @echo Debug: $@
+       dh_testdir
+       dh_testroot
+       dh_prep
+
+ifeq ($(do_flavour_header_package),true)
+       install -d $(indep_hdrdir)
+       find . -path './debian' -prune -o -path './$(DEBIAN)' -prune \
+         -o -path './include/*' -prune \
+         -o -path './scripts/*' -prune -o -type f \
+         \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
+            -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
+         -print | cpio -pd --preserve-modification-time $(indep_hdrdir)
+       cp -a scripts include $(indep_hdrdir)
+       (find arch -name include -type d -print | \
+               xargs -n1 -i: find : -type f) | \
+               cpio -pd --preserve-modification-time $(indep_hdrdir)
+endif
+
 docpkg = $(doc_pkg_name)
 docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
 install-doc: install-headers
@@ -8,7 +35,6 @@ install-doc: install-headers
 ifeq ($(do_doc_package),true)
        dh_testdir
        dh_testroot
-       dh_clean -k -p$(docpkg)
 
        install -d $(docdir)
 ifeq ($(do_doc_package_content),true)
@@ -27,40 +53,12 @@ endif
        find $(docdir) -name .gitignore | xargs rm -f
 endif
 
-indep_hdrpkg = $(hdrs_pkg_name)
-indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
-install-headers:
-       @echo Debug: $@
-ifeq ($(do_flavour_header_package),true)
-       dh_testdir
-       dh_testroot
-       dh_clean -k -p$(indep_hdrpkg)
-
-       install -d $(indep_hdrdir)
-       find . -path './debian' -prune -o -path './$(DEBIAN)' -prune \
-         -o -path './include/*' -prune \
-         -o -path './scripts/*' -prune -o -type f \
-         \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
-            -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
-         -print | cpio -pd --preserve-modification-time $(indep_hdrdir)
-       cp -a drivers/media/dvb/dvb-core/*.h $(indep_hdrdir)/drivers/media/dvb/dvb-core
-       cp -a drivers/media/video/*.h $(indep_hdrdir)/drivers/media/video
-       cp -a drivers/media/dvb/frontends/*.h $(indep_hdrdir)/drivers/media/dvb/frontends
-       cp -a scripts include $(indep_hdrdir)
-       (find arch -name include -type d -print | \
-               xargs -n1 -i: find : -type f) | \
-               cpio -pd --preserve-modification-time $(indep_hdrdir)
-endif
-
 srcpkg = $(src_pkg_name)-source-$(release)
 srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
 balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
 install-source: install-doc
        @echo Debug: $@
 ifeq ($(do_source_package),true)
-       dh_testdir
-       dh_testroot
-       dh_clean -k -p$(srcpkg)
 
        install -d $(srcdir)
 ifeq ($(do_source_package_content),true)
@@ -90,9 +88,6 @@ install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man
 install-tools: install-source $(stampdir)/stamp-build-perarch
        @echo Debug: $@
 ifeq ($(do_tools),true)
-       dh_testdir
-       dh_testroot
-       dh_clean -k -p$(toolspkg)
 
        install -d $(toolsbin)
        install -d $(toolsman)/man1
@@ -133,8 +128,6 @@ install-indep: install-tools
 # binary-indep target during builds.
 binary-headers: install-headers
        @echo Debug: $@
-       dh_testdir
-       dh_testroot
        dh_installchangelogs -p$(indep_hdrpkg)
        dh_installdocs -p$(indep_hdrpkg)
        dh_compress -p$(indep_hdrpkg)
@@ -146,8 +139,6 @@ binary-headers: install-headers
 
 binary-indep: install-indep
        @echo Debug: $@
-       dh_testdir
-       dh_testroot
 
        dh_installchangelogs -i
        dh_installdocs -i