blob: 06cf5ba05219110b17f8580102d72753c47a2c21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
NATIVE=native
PROG= zic
KSHPROG= tzselect
NPROG= $(NATIVE)/$(PROG)
# "etcetera" must be listed before "backward" because it sets up links that
# "backward" needs.
TZFILES= africa antarctica asia australasia etcetera europe \
factory northamerica pacificnew solar87 solar88 solar89 \
southamerica backward
# Don't build the systemv timezones, but do install the source file.
SRCFILES = $(TZFILES) systemv README
TABFILES = continent.tab country.tab zone_sun.tab
OBJS= zic.o scheck.o ialloc.o
SRCS= $(OBJS:%.o=%.c)
NOBJS= $(OBJS:%=$(NATIVE)/%)
CLOBBERFILES= $(NOBJS) $(KSHPROG) $(NPROG) $(NATIVE)/zic.c $(NATIVE)/tzfile.h
include ../Makefile.cmd
NCPPFLAGS= -I$(NATIVE)
ROOTTZD= $(ROOTSHLIB)/zoneinfo
ROOTTZSRCD= $(ROOTSHLIB)/zoneinfo/src
ROOTTZTABD= $(ROOTSHLIB)/zoneinfo/tab
DIRS= $(ROOTTZSRCD) $(ROOTTZTABD)
ROOTLIBTZSRCFILES= $(SRCFILES:%=$(ROOTTZSRCD)/%)
ROOTLIBTZTABFILES= $(TABFILES:%=$(ROOTTZTABD)/%)
ROOTKSHPROG= $(ROOTBIN)/$(KSHPROG)
$(ROOTLIBTZSRCFILES):= FILEMODE= 0644
$(ROOTLIBTZTABFILES):= FILEMODE= 0644
#
# Message catalog
#
POFILE2=tzselect.po
POFILE3=zoneinfo.po
POFILES3=$(TABFILES)
TEXT_DOMAIN2=SUNW_OST_ZONEINFO
MSGDOMAIN2=$(MSGROOT)/$(TEXT_DOMAIN2)
.KEEP_STATE:
all: $(PROG) $(NPROG) $(KSHPROG)
$(PROG): $(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
install: all $(DIRS) $(ROOTTZSRCD) $(ROOTTZTABD) $(ROOTUSRSBINPROG) $(ROOTLIBTZSRCFILES) $(ROOTLIBTZTABFILES) $(ROOTKSHPROG)
$(NPROG) -d $(ROOTTZD) $(TZFILES)
$(NPROG): $(NATIVE) $(NOBJS)
$(NATIVECC) -o $@ $(NOBJS)
#
# XXX
# There is a .ksh rule in Makefile.targ, but we need our custom POFILE rules.
#
$(KSHPROG): $(KSHPROG).ksh
$(RM) $@
$(CAT) $(KSHPROG).ksh > $@
$(CHMOD) +x $@
$(ROOTTZSRCD)/%: %
$(INS.file)
$(ROOTTZTABD)/%: %
$(INS.file)
$(DIRS):
$(INS.dir)
$(NATIVE):
-@mkdir -p $@
clean:
$(RM) $(OBJS)
lint: lint_SRCS
$(NOBJS): $$(@F:.o=.c)
$(NATIVECC) -O $(NCPPFLAGS) -c -o $@ $(@F:.o=.c)
$(NATIVE)/zic.o: $(NATIVE)/tzfile.h
#$(NATIVE)/scheck.o: scheck.c
# $(NATIVECC) -c -o $@ scheck.c
#$(NATIVE)/ialloc.o: ialloc.c
# $(NATIVECC) -c -o $@ ialloc.c
$(NATIVE)/tzfile.h: $(ROOT)/usr/include/tzfile.h
$(RM) $@; cp $(ROOT)/usr/include/tzfile.h $@
#
# From ../Makefile.targ
#
clobber: clean
-$(RM) $(PROG) $(CLOBBERFILES)
lint_PROG:
$(LINT.c) $(PROG).c $(LDLIBS)
lint_SRCS:
$(LINT.c) $(SRCS) $(LDLIBS)
#
# For message catalogue files
#
_msg: $(MSGDOMAIN) $(POFILE) $(POFILE2) $(MSGDOMAIN2) $(POFILE3)
$(RM) $(MSGDOMAIN)/$(POFILE)
$(CP) $(POFILE) $(MSGDOMAIN)
$(RM) $(MSGDOMAIN)/$(POFILE2)
$(CP) $(POFILE2) $(MSGDOMAIN)
$(RM) $(MSGDOMAIN2)/$(POFILE3)
$(CP) $(POFILE3) $(MSGDOMAIN2)/$(POFILE3)
$(MSGDOMAIN) $(DCMSGDOMAIN) $(MSGDOMAIN2):
$(INS.dir)
$(POFILE3): $(POFILES3)
$(RM) $@
@/bin/sh ./do_pofile.sh > $@
|