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