~ubuntu-branches/ubuntu/utopic/eglibc/utopic

« back to all changes in this revision

Viewing changes to timezone/Makefile

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-10-26 05:14:58 UTC
  • mfrom: (1.5.1) (4.4.22 experimental)
  • Revision ID: package-import@ubuntu.com-20121026051458-oryotr4i03ob5pab
Tags: 2.16-0ubuntu1
* Merge with unreleased 2.16 in Debian experimental, remaining changes:
  - Drop the Breaks line from libc6, which refers to a Debian transition
  - Remove the libc6 recommends on libc6-i686, which we don't build
  - Enable libc6{,-dev}-armel on armhf and libc6{-dev}-armhf on armel
  - Ship update-locale and validlocale in /usr/sbin in libc-bin
  - Don't build locales or locales-all in Ubuntu, we rely on langpacks
  - Heavily mangle the way we do service restarting on major upgrades
  - Use different MIN_KERNEL_SUPPORTED versions than Debian, due to
    buildd needs.  This should be universally bumped to 3.2.0 once all
    our buildds (including the PPA guests) are running precise kernels
  - Build i386 variants as -march=i686, build amd64 with -O3, and build
    ppc64 variants (both 64-bit and 32-bit) with -O3 -fno-tree-vectorize
  - Re-enable unsubmitted-ldconfig-cache-abi.diff and rebuild the cache
    on upgrades from previous versions that used a different constant
  - debian/patches/any/local-CVE-2012-3406.diff: switch to malloc when
    array grows too large to handle via alloca extension (CVE-2012-3406)
  - Build generic i386/i686 flavour with -mno-tls-direct-seg-refs
* Changes added/dropped with this merge while reducing our delta:
  - Stop building glibc docs from the eglibc source, and instead make
    the glibc-docs stub have a hard dependency on glibc-doc-reference
  - Remove outdated conflicts against ancient versions of ia32-libs
  - Drop the tzdata dependency from libc6, it's in required and minimal
  - Use gcc-4.7/g++-4.7 by default on all our supported architectures
  - Save our historical changelog as changelog.ubuntu in the source
  - Drop nscd's libaudit build-dep for now, as libaudit is in universe
  - Drop the unnecessary Breaks from libc6 to locales and locales-all
  - Ship xen's ld.so.conf.d snippet as /etc/ld.so.conf.d/libc6-xen.conf
* Disable hard failures on the test suite for the first upload to raring

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 1998,1999,2000,2002,2005,2007 Free Software Foundation, Inc.
 
1
# Copyright (C) 1998-2000,2002,2005,2007,2012 Free Software Foundation, Inc.
2
2
# This file is part of the GNU C Library.
3
3
 
4
4
# The GNU C Library is free software; you can redistribute it and/or
12
12
# Lesser General Public License for more details.
13
13
 
14
14
# You should have received a copy of the GNU Lesser General Public
15
 
# License along with the GNU C Library; if not, write to the Free
16
 
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
 
# 02111-1307 USA.
 
15
# License along with the GNU C Library; if not, see
 
16
# <http://www.gnu.org/licenses/>.
18
17
 
19
18
#
20
19
#       Makefile for timezone information
21
20
#
22
21
subdir  := timezone
23
22
 
24
 
distribute := tzfile.h private.h scheck.c ialloc.c yearistype   \
25
 
              iso3166.tab zone.tab tzselect.ksh checktab.awk    \
26
 
              README
27
 
 
28
23
extra-objs := scheck.o ialloc.o
29
24
 
30
25
others  := zdump zic
31
26
tests   := test-tz tst-timezone
32
27
 
 
28
# pacificnew doesn't compile; if it is to be used, it should be included in
 
29
# northamerica.
33
30
tzbases := africa antarctica asia australasia europe northamerica \
34
31
           southamerica etcetera factory \
35
32
           solar87 solar88 solar89
36
33
tzlinks := backward systemv
37
34
tzfiles := $(tzbases) $(tzlinks)
38
 
# pacificnew doesn't compile; if it is to be used, it should be included in
39
 
# northamerica.
40
 
distribute += $(tzfiles) leapseconds pacificnew simplebackw
41
35
 
42
36
generated := $(addprefix z.,$(tzfiles))
43
37
install-sbin := zic zdump
50
44
 
51
45
CPPFLAGS-zic = -DNOT_IN_libc
52
46
 
53
 
# z.* use this variable.
54
 
define nl
55
 
 
56
 
 
57
 
endef
58
 
ifndef avoid-generated
59
 
ifndef inhibit_timezone_rules
60
 
-include $(addprefix $(objpfx)z.,$(tzfiles))
61
 
endif
62
 
endif
63
 
 
64
 
# Make these absolute file names.
65
 
installed-localtime-file := $(firstword $(filter /%,$(inst_localtime-file)) \
66
 
                                        $(addprefix $(inst_zonedir)/, \
67
 
                                                    $(localtime-file)))
68
 
installed-posixrules-file := $(firstword $(filter /%,$(posixrules-file)) \
69
 
                                         $(addprefix $(inst_zonedir)/, \
70
 
                                                     $(posixrules-file)))
71
 
 
72
 
install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
73
 
                                              $(zonenames:%=posix/%) \
74
 
                                              $(zonenames:%=right/%)) \
75
 
                 $(installed-localtime-file) $(installed-posixrules-file)
76
 
 
77
47
ifeq ($(have-ksh),yes)
78
 
install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
79
48
install-bin-script = tzselect
80
49
generated += tzselect
81
50
endif
83
52
include ../Rules
84
53
 
85
54
 
86
 
$(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile
87
 
# Kludge alert: we use an implicit rule (in what we are generating here)
88
 
# because that is the only way to tell Make that the one command builds all
89
 
# the files.
90
 
# The extra kludge for the $(tzlinks) files is necessary since running zic
91
 
# this file requires all other files to exist.  Blech!
92
 
        $(make-target-directory)
93
 
        (echo 'define $*-zones'                                             ;\
94
 
         $(AWK) '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
95
 
         echo 'endef'                                                       ;\
96
 
         echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))'                 ;\
97
 
         echo 'ifdef $*-zones'                                              ;\
98
 
         if test x$(findstring $*, $(tzlinks)) != x; then                    \
99
 
           echo '$$(addprefix $$(inst_zonedir)/right/,$$($*-zones)): \';\
100
 
           echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/right/,$$($$t-zones)))' ;\
101
 
           echo '$$(addprefix $$(inst_zonedir)/posix/,$$($*-zones)): \';\
102
 
           echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/posix/,$$($$t-zones)))' ;\
103
 
           echo '$$(addprefix $$(inst_zonedir)/,$$($*-zones)): \'           ;\
104
 
           echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\
105
 
         fi                                                                 ;\
106
 
         echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;) > $@.new
107
 
 
108
 
ifeq (no,$(cross-compiling))
109
 
        (echo '$< $$(objpfx)zic leapseconds yearistype'                     ;) >> $@.new
110
 
else
111
 
        (echo '$< $$(objpfx)cross-zic leapseconds yearistype'               ;) >> $@.new
112
 
endif
113
 
 
114
 
        (echo ' $$(tzcompile)'                                              ;\
115
 
         echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;) >> $@.new
116
 
 
117
 
ifeq (no,$(cross-compiling))
118
 
        (echo '$< $$(objpfx)zic /dev/null yearistype'                       ;) >> $@.new
119
 
else
120
 
        (echo '$< $$(objpfx)cross-zic /dev/null yearistype'                 ;) >> $@.new
121
 
endif
122
 
 
123
 
        (echo ' $$(tzcompile)'                                              ;\
124
 
         echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;) >> $@.new
125
 
 
126
 
ifeq (no,$(cross-compiling))
127
 
        (echo '$< $$(objpfx)zic $$(leapseconds) yearistype'                 ;) >> $@.new
128
 
else
129
 
        (echo '$< $$(objpfx)cross-zic $$(leapseconds) yearistype'           ;) >> $@.new
130
 
endif
131
 
 
132
 
        (echo ' $$(tzcompile)'                                              ;\
133
 
         echo 'endif'                                                       ;\
134
 
         echo 'zonenames := $$(zonenames) $$($*-zones)'                     ;) >> $@.new
135
 
        mv $@.new $@
136
 
 
137
 
.PHONY: echo-zonenames
138
 
echo-zonenames:
139
 
        @echo 'Known zones: $(zonenames)'
140
 
 
141
 
 
142
 
# We have to use `-d $(inst_zonedir)' to explictly tell zic where to
143
 
# place the output files although $(zonedir) is compiled in.  But the
144
 
# user might have set $(install_root) on the command line of `make install'.
145
 
ifeq (no,$(cross-compiling))
146
 
zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
147
 
else
148
 
zic-cmd = $(objpfx)cross-zic -d $(inst_zonedir)
149
 
endif
150
 
tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
151
 
            -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
152
 
 
153
 
# The source files specify the zone names relative to the -d directory,
154
 
# so for the posix/ and right/ flavors we need to pass -d $(inst_zonedir)/posix
155
 
# and the like.  This magic extracts /posix or /right if it's the first
156
 
# component after $(inst_zonedir) in the target name $@.
157
 
target-zone-flavor = $(filter /posix /right, \
158
 
                              /$(firstword $(subst /, , \
159
 
                                          $(patsubst $(inst_zonedir)/%,%,$@))))
160
 
 
161
 
ifdef localtime
162
 
$(installed-localtime-file): $(inst_zonedir)/$(localtime) $(objpfx)zic \
163
 
                             $(+force)
164
 
        $(make-target-directory)
165
 
        if test -r $@; then \
166
 
          echo Site timezone NOT reset to Factory.; \
167
 
        else \
168
 
          rm -f $@T; \
169
 
          $(SHELL) $(..)scripts/rellns-sh $< $@T; \
170
 
          mv -f $@T $@; \
171
 
        fi
172
 
endif
173
 
ifdef posixrules
174
 
$(installed-posixrules-file): $(inst_zonedir)/$(posixrules) $(objpfx)zic \
175
 
                              $(+force)
176
 
        $(zic-cmd) -p $(posixrules)
177
 
endif
178
 
 
179
55
zic-objs = zic.o ialloc.o scheck.o
180
56
 
181
57
$(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
182
58
 
183
59
$(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
184
 
        gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
 
60
        $(BUILD_CC) $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
185
61
                -DCROSS_ZIC $(compile-mkdep-flags)
186
62
 
187
63
$(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
188
 
        gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
 
64
        $(BUILD_CC) $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
189
65
 
190
66
tz-cflags = -DTZDIR='"$(zonedir)"' \
191
67
            -DTZDEFAULT='"$(localtime-file)"' \
256
132
            -e 's%@REPORT_BUGS_TO@%$(REPORT_BUGS_TO)%g' < $< > $@.new
257
133
        chmod 555 $@.new
258
134
        mv -f $@.new $@
259
 
 
260
 
$(addprefix $(inst_zonedir)/,iso3166.tab zone.tab): \
261
 
    $(inst_zonedir)/%: % $(+force)
262
 
        $(do-install)