~ubuntu-branches/ubuntu/precise/gccgo-4.7/precise

« back to all changes in this revision

Viewing changes to debian/rules.d/binary-cxx.mk

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-11 19:37:32 UTC
  • Revision ID: package-import@ubuntu.com-20120311193732-ty08ntcphseuouao
Tags: 4.7.0~rc1-0ubuntu1
* Build standalone gccgo-4.7 packages.
* libgo: Work around parse error of struct timex_ on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32) $(biarchhf) $(biarchsf)))
 
2
  arch_binaries  := $(arch_binaries) cxx-multi
 
3
endif
 
4
arch_binaries  := $(arch_binaries) cxx
 
5
 
 
6
dirs_cxx = \
 
7
        $(docdir)/$(p_base)/C++ \
 
8
        $(PF)/bin \
 
9
        $(PF)/share/info \
 
10
        $(gcc_lexec_dir) \
 
11
        $(PF)/share/man/man1
 
12
files_cxx = \
 
13
        $(PF)/bin/$(cmd_prefix)g++$(pkg_ver) \
 
14
        $(gcc_lexec_dir)/cc1plus
 
15
 
 
16
ifneq ($(GFDL_INVARIANT_FREE),yes)
 
17
  files_cxx += \
 
18
        $(PF)/share/man/man1/$(cmd_prefix)g++$(pkg_ver).1
 
19
endif
 
20
 
 
21
p_cxx_m = g++$(pkg_ver)-multilib$(cross_bin_arch)
 
22
d_cxx_m = debian/$(p_cxx_m)
 
23
 
 
24
# ----------------------------------------------------------------------
 
25
$(binary_stamp)-cxx: $(install_stamp)
 
26
        dh_testdir
 
27
        dh_testroot
 
28
        mv $(install_stamp) $(install_stamp)-tmp
 
29
 
 
30
        rm -rf $(d_cxx)
 
31
        dh_installdirs -p$(p_cxx) $(dirs_cxx)
 
32
        DH_COMPAT=2 dh_movefiles -p$(p_cxx) $(files_cxx)
 
33
 
 
34
ifneq ($(DEB_CROSS),yes)
 
35
        ln -sf g++$(pkg_ver) \
 
36
            $(d_cxx)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver)
 
37
        ln -sf g++$(pkg_ver) \
 
38
            $(d_cxx)/$(PF)/bin/$(TARGET_ALIAS)-g++$(pkg_ver)
 
39
endif
 
40
 
 
41
ifneq ($(GFDL_INVARIANT_FREE),yes)
 
42
# g++ man page is a .so link
 
43
        rm -f $(d_cxx)/$(PF)/share/man/man1/$(cmd_prefix)g++$(pkg_ver).1
 
44
        ln -sf $(cmd_prefix)gcc$(pkg_ver).1.gz \
 
45
                $(d_cxx)/$(PF)/share/man/man1/$(cmd_prefix)g++$(pkg_ver).1.gz
 
46
  ifneq ($(DEB_CROSS),yes)
 
47
        ln -sf g++$(pkg_ver).1.gz \
 
48
            $(d_cxx)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver).1.gz
 
49
        ln -sf g++$(pkg_ver).1.gz \
 
50
            $(d_cxx)/$(PF)/share/man/man1/$(TARGET_ALIAS)-g++$(pkg_ver).1.gz
 
51
  endif
 
52
endif
 
53
 
 
54
        debian/dh_doclink -p$(p_cxx) $(p_base)
 
55
        cp -p debian/README.C++ $(d_cxx)/$(docdir)/$(p_base)/C++/
 
56
        cp -p $(srcdir)/gcc/cp/ChangeLog \
 
57
                $(d_cxx)/$(docdir)/$(p_base)/C++/changelog
 
58
        debian/dh_rmemptydirs -p$(p_cxx)
 
59
 
 
60
        mkdir -p $(d_cxx)/$(docdir)/$(p_base)/test-summaries
 
61
        echo "TEST COMPARE BEGIN"
 
62
ifeq ($(with_check),yes)
 
63
        cp -p $$(find $(builddir) -mindepth 3 -name '*.sum') \
 
64
                $(d_cxx)/$(docdir)/$(p_base)/test-summaries/
 
65
  ifeq (0,1)
 
66
        cd $(builddir); \
 
67
        for i in $(CURDIR)/$(d_cxx)/$(docdir)/$(p_base)/test-summaries/*.sum; do \
 
68
          b=$$(basename $$i); \
 
69
          if [ -f /usr/share/doc/$(p_base)/test-summaries/$$b.gz ]; then \
 
70
            zcat /usr/share/doc/$(p_base)/test-summaries/$$b.gz > /tmp/$$b; \
 
71
            if sh $(srcdir)/contrib/test_summary /tmp/$$b $$i; then \
 
72
              echo "$$b: OK"; \
 
73
            else \
 
74
              echo "$$b: FAILURES"; \
 
75
            fi; \
 
76
            rm -f /tmp/$$b; \
 
77
          else \
 
78
            echo "Test summary for $$b is not available"; \
 
79
          fi; \
 
80
        done
 
81
  endif
 
82
else
 
83
        echo "Nothing to compare (testsuite not run)"
 
84
endif   
 
85
        echo "TEST COMPARE END"
 
86
 
 
87
        dh_strip -p$(p_cxx)
 
88
        dh_compress -p$(p_cxx)
 
89
        dh_fixperms -p$(p_cxx)
 
90
        dh_shlibdeps -p$(p_cxx)
 
91
        dh_gencontrol -p$(p_cxx) -- -v$(DEB_VERSION) $(common_substvars)
 
92
        dh_installdeb -p$(p_cxx)
 
93
        dh_md5sums -p$(p_cxx)
 
94
        dh_builddeb -p$(p_cxx)
 
95
 
 
96
        trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
 
97
 
 
98
# ----------------------------------------------------------------------
 
99
define do_cxx
 
100
        dh_installdirs -p$(p_cxx_m) $(gcc_lib_dir($1))
 
101
        mv $(d)/$(usr_lib$(1))/lib*c++*.{a,so} $(d)/$(gcc_lib_dir$(1))/.
 
102
        DH_COMPAT=2 dh_movefiles -p$(p_cxx_m) \
 
103
                $(gcc_lib_dir$(1))/libstdc++.{a,so} \
 
104
                $(gcc_lib_dir$(1))/libsupc++.a \
 
105
                $(gcc_lib_dir$(1))/libstdc++_pic.a
 
106
        dh_link -p$(p_cxx_m) \
 
107
                /$(usr_lib$(1))/libstdc++.so.$(CXX_SONAME) \
 
108
                /$(gcc_lib_dir$(1))/libstdc++.so
 
109
 
 
110
endef
 
111
 
 
112
$(binary_stamp)-cxx-multi: $(install_stamp)
 
113
        dh_testdir
 
114
        dh_testroot
 
115
        mv $(install_stamp) $(install_stamp)-tmp
 
116
 
 
117
        rm -rf $(d_cxx_m)
 
118
        dh_installdirs -p$(p_cxx_m) \
 
119
                $(docdir)
 
120
 
 
121
        $(foreach flavour,$(flavours), \
 
122
                $(call do_cxx,$(flavour)))
 
123
 
 
124
        debian/dh_doclink -p$(p_cxx_m) $(p_base)
 
125
        debian/dh_rmemptydirs -p$(p_cxx_m)
 
126
 
 
127
        dh_strip -p$(p_cxx_m)
 
128
        dh_compress -p$(p_cxx_m)
 
129
        dh_fixperms -p$(p_cxx_m)
 
130
        dh_shlibdeps -p$(p_cxx_m)
 
131
        dh_gencontrol -p$(p_cxx_m) -- -v$(DEB_VERSION) $(common_substvars)
 
132
        dh_installdeb -p$(p_cxx_m)
 
133
        dh_md5sums -p$(p_cxx_m)
 
134
        dh_builddeb -p$(p_cxx_m)
 
135
 
 
136
        trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)