~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Colin Watson
  • Date: 2010-01-05 14:58:49 UTC
  • Revision ID: cjwatson@canonical.com-20100105145849-2nd06zjox4s71egc
* Use host compiler when cross-building (patch from Neil Williams in
  Debian #465248).
* Don't run 'make test' when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
20
20
DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
21
21
 
 
22
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
23
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
24
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 
25
CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
 
26
MAKE_TEST=:
 
27
else
 
28
CROSS=CC=$(CC)
 
29
MAKE_TEST=make test
 
30
endif
 
31
 
22
32
CONFARGS  = --prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 zlib  enable-tlsext no-sslv2
23
33
OPT_alpha = ev4 ev5
24
34
OPT_i386  = i486 i586 i686/cmov
43
53
#       perl util/ssldir.pl /usr/lib/ssl
44
54
#       chmod +x debian/libtool
45
55
        ./Configure no-shared $(CONFARGS) debian-$(DEB_HOST_ARCH)
46
 
        make -f Makefile all
47
 
        make test
 
56
        make $(CROSS) -f Makefile all
 
57
        $(MAKE_TEST)
48
58
        mv libcrypto.a libcrypto.static
49
59
        mv libssl.a libssl.static
50
60
        make -f Makefile clean
52
62
        do \
53
63
                set -xe; \
54
64
                ./Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH)-$$opt; \
55
 
                make -f Makefile all; \
56
 
                make test; \
 
65
                make $(CROSS) -f Makefile all; \
 
66
                $(MAKE_TEST); \
57
67
                mkdir -p $$opt; \
58
68
                mv libcrypto.so* libssl.so* $$opt/; \
59
69
                make -f Makefile clean; \
60
70
        done
61
71
        ./Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH)
62
 
        #make -f Makefile depend
 
72
        #make $(CROSS) -f Makefile depend
63
73
        ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
64
 
#       make -f Makefile linux-shared
65
 
        make -f Makefile all
66
 
        make test
 
74
#       make $(CROSS) -f Makefile linux-shared
 
75
        make $(CROSS) -f Makefile all
 
76
        $(MAKE_TEST)
67
77
#       strip apps/openssl
68
78
#       make -f Makefile clean
69
79
#       ./Configure --prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 debian-$(DEB_HOST_ARCH)
70
 
#       make -f Makefile all
 
80
#       make $(CROSS) -f Makefile all
71
81
        touch build
72
82
 
73
83
clean: clean-patched unpatch