xref: /illumos-gate/usr/src/data/zoneinfo/Makefile (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
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.KEEP_STATE:
42
43all:		$(TZFILES) $(TABFILES)
44
45install:	$(DIRS) $(ROOTTZSRCD) $(ROOTTZTABD) $(ROOTLIBTZSRCFILES) \
46		$(ROOTLIBTZTABFILES)
47		$(ZIC) -d $(ROOTTZD) $(TZFILES)
48
49$(ROOTTZSRCD)/%: %
50		$(INS.file)
51
52$(ROOTTZTABD)/%: %
53		$(INS.file)
54
55$(DIRS):
56		$(INS.dir)
57
58clean:
59
60# For message catalogue files
61_msg:		$(MSGDOMAIN) $(POFILE)
62		$(RM) $(MSGDOMAIN)/$(POFILE)
63		$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
64
65$(MSGDOMAIN):
66		$(INS.dir)
67
68$(POFILE):	$(TABFILES) do_pofile.sh
69		$(RM) $@
70		@/bin/sh do_pofile.sh > $@
71
72include		$(SRC)/data/Makefile.targ
73