Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sa/Makefile
+++ new/usr/src/cmd/sa/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 # Copyright (c) 2013 Andrew Stormont. All rights reserved.
25 25 #
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
26 26 # Copyright (c) 2018, Joyent, Inc.
27 27
28 28 MANIFEST = sar.xml
29 29 SVCMETHOD = svc-sar
30 30
31 31 include ../Makefile.cmd
32 32
33 33 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
34 34
35 35 CERRWARN += -_gcc=-Wno-parentheses
36 -CERRWARN += -_gcc=-Wno-uninitialized
36 +CERRWARN += $(CNOWARN_UNINIT)
37 37
38 38 SMOFF += all_func_returns
39 39
40 40 GREP= grep
41 41
42 42 SADC= sadc
43 43 SAR= sar
44 44 TIMEX= timex
45 45 SA1= sa1
46 46 SA2= sa2
47 47
48 48 sadc := LDLIBS += -lkstat
49 49
50 50 # Executables produced
51 51 BINPROG= $(TIMEX)
52 52 SBINPROG= $(SAR)
53 53 LIBPROG= $(SADC)
54 54 LIBSHELL= $(SA1) $(SA2)
55 55 INITSHELL= $(PERF)
56 56
57 57 PROGS= $(BINPROG) $(SBINPROG) $(LIBPROG)
58 58 SHELLS= $(LIBSHELL)
59 59 TXTS= README
60 60 ALL= $(PROGS) $(SHELLS)
61 61
62 62 # Source files
63 63 SADC_OBJECTS= $(SADC).o
64 64 srcs= $(TIMEX) $(SAR) $(SADC)
65 65 SRCS= $(srcs:%=%.c)
66 66 SHSRCS= $(SHELLS:%=%.sh)
67 67
68 68 # Set of target install directories
69 69 LIBSAD= $(ROOT)/usr/lib/sa
70 70 CROND= $(ROOT)/var/spool/cron
71 71 CRONTABSD= $(CROND)/crontabs
72 72
73 73 # Set of target install files
74 74 SYSCRONTAB= $(CRONTABSD)/sys
75 75 ROOTPROG= $(BINPROG:%=$(ROOTBIN)/%)
76 76 ROOTUSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
77 77 ROOTLIBPROG= $(LIBPROG:%=$(LIBSAD)/%)
78 78 ROOTLIBSHELL= $(LIBSHELL:%=$(LIBSAD)/%)
79 79 ROOTSYMLINKS= $(SBINPROG:%=$(ROOTBIN)/%)
80 80
81 81 # Performance monitoring should not be enabled by default. Hence, these
82 82 # entries are comments.
83 83 ENTRY1= '$(POUND_SIGN) 0 * * * 0-6 /usr/lib/sa/sa1'
84 84 ENTRY2= '$(POUND_SIGN) 20,40 8-17 * * 1-5 /usr/lib/sa/sa1'
85 85 ENTRY3= '$(POUND_SIGN) 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A'
86 86
87 87 CLOBBERFILES= $(PROGS) $(SHELLS)
88 88
89 89 # Conditionals
90 90 $(LIBSAD)/$(SADC) := FILEMODE = 0555
91 91
92 92 .KEEP_STATE:
93 93
94 94 all: $(ALL) $(TXTS)
95 95
96 96 $(SADC): $(SADC_OBJECTS)
97 97 $(LINK.c) -o $@ $(SADC_OBJECTS) $(LDLIBS)
98 98 $(POST_PROCESS)
99 99
100 100 # The edit of SYSCRONTAB must be done unconditionally because of the
101 101 # creation of this file by a different component (Adm) and the possible
102 102 # backdating.
103 103 install: all $(ROOTPROG) $(ROOTUSBINPROG) \
104 104 $(ROOTINITSHELL) $(ROOTLIBSHELL) $(ROOTSYMLINKS) \
105 105 $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTLIBPROG)
106 106 @if [ -f $(SYSCRONTAB) ]; \
107 107 then \
108 108 if $(GREP) "sa1" $(SYSCRONTAB) >/dev/null 2>&1 ; then :; \
109 109 else \
110 110 echo $(ENTRY1) >> $(SYSCRONTAB); \
111 111 echo $(ENTRY2) >> $(SYSCRONTAB); \
112 112 echo "$(SYSCRONTAB) modified"; \
113 113 fi; \
114 114 if $(GREP) "sa2" $(SYSCRONTAB) >/dev/null 2>&1 ; then :; \
115 115 else \
116 116 echo $(ENTRY3) >> $(SYSCRONTAB); \
117 117 fi; \
118 118 fi
119 119
120 120 $(LIBSAD)/%: %
121 121 $(INS.file)
122 122
123 123 $(ROOTSYMLINKS):
124 124 -$(RM) $@; $(SYMLINK) ../sbin/`basename $@` $@
125 125
126 126 $(ETCINITD)/%: %
127 127 $(INS.file)
128 128
129 129 check: $(CHKMANIFEST)
130 130
131 131 clean:
132 132 $(RM) $(SADC_OBJECTS) $(PROGS) $(SHELLS)
133 133
134 134 lint: lint_SRCS
135 135
136 136 include ../Makefile.targ
↓ open down ↓ |
90 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX