xref: /illumos-gate/usr/src/data/zoneinfo/Makefile (revision e496dfa829828890965fbb5999e68cd49e019aea)
1#
2# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5
6# "etcetera" must be listed before "backward" because it sets up links that
7# "backward" needs.
8TZFILES=	africa \
9		antarctica \
10		asia \
11		australasia \
12		etcetera \
13		europe \
14		factory \
15		northamerica \
16		southamerica \
17		backward
18
19# Don't build the systemv timezones, but do install the source file.
20SRCFILES=	$(TZFILES) systemv README
21TABFILES=	continent.tab country.tab zone_sun.tab
22
23include		$(SRC)/data/Makefile.data
24
25ROOTTZD=	$(ROOTSHLIB)/zoneinfo
26ROOTTZSRCD=	$(ROOTSHLIB)/zoneinfo/src
27ROOTTZTABD=	$(ROOTSHLIB)/zoneinfo/tab
28DIRS=		$(ROOTTZSRCD) $(ROOTTZTABD)
29
30ROOTLIBTZSRCFILES=$(SRCFILES:%=$(ROOTTZSRCD)/%)
31ROOTLIBTZTABFILES=$(TABFILES:%=$(ROOTTZTABD)/%)
32
33$(ROOTLIBTZSRCFILES):=FILEMODE=0644
34$(ROOTLIBTZTABFILES):=FILEMODE=0644
35
36# Message catalog
37TEXT_DOMAIN=	SUNW_OST_ZONEINFO
38MSGDOMAIN=	$(MSGROOT)/$(TEXT_DOMAIN)
39POFILE=		zoneinfo.po
40
41#
42# We must instruct zic to output backwards-compatible output, aka still include
43# the v1 data in addition to the v2 data. This is useful for readers of
44# different eras and what most systems do as well. When this is omitted then the
45# current zic default is to include a v1 header with no information.
46#
47ZICMODE=	-b fat
48
49.KEEP_STATE:
50
51all:		$(TZFILES) $(TABFILES)
52
53install:	$(DIRS) $(ROOTTZSRCD) $(ROOTTZTABD) $(ROOTLIBTZSRCFILES) \
54		$(ROOTLIBTZTABFILES)
55		$(ZIC) $(ZICMODE) -d $(ROOTTZD) $(TZFILES)
56
57$(ROOTTZSRCD)/%: %
58		$(INS.file)
59
60$(ROOTTZTABD)/%: %
61		$(INS.file)
62
63$(DIRS):
64		$(INS.dir)
65
66clean:
67
68# For message catalogue files
69_msg:		$(MSGDOMAIN) $(POFILE)
70		$(RM) $(MSGDOMAIN)/$(POFILE)
71		$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
72
73$(MSGDOMAIN):
74		$(INS.dir)
75
76$(POFILE):	$(TABFILES) do_pofile.sh
77		$(RM) $@
78		@/bin/sh do_pofile.sh > $@
79
80update:		FRC
81		./update_manifest $(TZFILES)
82
83FRC:
84
85include		$(SRC)/data/Makefile.targ
86