diff options
author | John Rigby <john.rigby@linaro.org> | 2011-09-12 13:09:22 -0600 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-08-16 00:28:43 -0600 |
commit | 1688776d0e03cb3f41e488440e9ee217c02aa399 (patch) | |
tree | b1aa928a14df8cecb791957d7dd958adebc34d9a | |
parent | c39f481254b86e6b09f238a283ffbf71f3b19e83 (diff) |
LINARO: Conditionally use KBUILD_SCRIPTROOT to crossbuild scripts
Only do so if KBUILD_SCRIPTROOT is used in the script makefiles
so the build is not broken for trees lacking the sauce that
adds the script crossbuild support.
Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r-- | debian/rules.d/2-binary-arch.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 90fbce34c08..f285da053a3 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -9,6 +9,9 @@ else build_cd = build_O = O=$(builddir)/build-$* endif +crossbuildscripts=$(shell grep KBUILD_SCRIPTROOT $(DROOT)/scripts/Makefile.build && echo "true") + +kbsr = $(builddir)/build-$* $(stampdir)/stamp-prepare-%: config-prepare-check-% @echo Debug: $@ @@ -198,7 +201,11 @@ endif sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \ $(hdrdir)/.config chmod 644 $(hdrdir)/.config +ifeq ($(crossbuildscripts),true) + $(kmake) HOSTCC=$(CROSS_COMPILE)gcc KBUILD_SCRIPTROOT=$(kbsr) O=$(hdrdir) -j1 silentoldconfig prepare scripts +else $(kmake) O=$(hdrdir) -j1 silentoldconfig prepare scripts +endif # We'll symlink this stuff rm -f $(hdrdir)/Makefile rm -rf $(hdrdir)/include2 @@ -342,6 +349,9 @@ binary-%: install-% dh_installchangelogs -p$(pkghdr) dh_installdocs -p$(pkghdr) +ifeq ($(crossbuildscripts),true) + dh_strip -p$(pkghdr) +endif dh_compress -p$(pkghdr) dh_fixperms -p$(pkghdr) dh_shlibdeps -p$(pkghdr) |