~ubuntu-branches/ubuntu/quantal/initramfs-tools/quantal

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Colin Watson
  • Date: 2012-03-31 00:34:41 UTC
  • Revision ID: cjwatson@canonical.com-20120331003441-0vrxjajf6i6pidjb
Fix cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
%:
4
4
        dh $@
5
5
 
 
6
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
7
DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
8
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 
9
CROSS :=
 
10
else
 
11
CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
 
12
endif
 
13
 
6
14
override_dh_auto_build:
7
 
        make -C src
 
15
        make -C src $(CROSS)
8
16
 
9
17
override_dh_auto_clean:
10
18
        make -C src clean