~ubuntu-branches/ubuntu/saucy/logrotate/saucy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-12-01 01:24:57 UTC
  • Revision ID: package-import@ubuntu.com-20121201012457-dw307tkxjx5on1eh
Tags: 3.8.3-3ubuntu2
* Use correct compiler when cross-building.
* Honour DEB_BUILD_OPTIONS=nocheck.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
  endif
13
13
endif
14
14
 
 
15
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
16
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
17
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 
18
  CROSS :=
 
19
else
 
20
  CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
 
21
endif
 
22
 
15
23
%:
16
24
        dh $@
17
25
 
18
26
override_dh_auto_build:
19
27
ifeq ($(DEB_HOST_ARCH_OS),linux)
20
 
        $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)" WITH_SELINUX="yes" WITH_ACL="yes"
 
28
        $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)" WITH_SELINUX="yes" WITH_ACL="yes" \
 
29
                $(CROSS)
21
30
else
22
 
        $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)"
 
31
        $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)" $(CROSS)
23
32
endif
24
33
 
25
34
override_dh_auto_install:
32
41
 
33
42
# ACL tests will fail if we're not building with ACL
34
43
override_dh_auto_test:
35
 
ifeq ($(DEB_HOST_ARCH_OS),linux)
 
44
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 
45
  ifeq ($(DEB_HOST_ARCH_OS),linux)
36
46
        cd test ; ./test
 
47
  endif
37
48
endif