Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/acct/Makefile
+++ new/usr/src/cmd/acct/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
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 2015 Gary Mills
23 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 +# Copyright (c) 2018, Joyent, Inc.
26 27
27 28 PROG= acctcms acctcom acctcon acctcon1 acctcon2 \
28 29 acctdisk acctdusg acctmerg accton acctprc acctprc1 \
29 30 acctprc2 acctwtmp closewtmp fwtmp \
30 31 wtmpfix utmp2wtmp
31 32 SHFILE1= acct chargefee ckpacct dodisk lastlogin\
32 33 monacct nulladm prctmp prdaily prtacct \
33 34 remove runacct shutacct startup turnacct
34 35 SHFILE2= ptecms.awk ptelus.awk
35 36 SUBDIRS= lib
36 37 ALL= $(PROG) $(SHFILE1) $(SHFILE2) holidays
37 38
38 39 SRCS= $(PROG:%=%.c)
39 40 SHFILE1SRCS= $(SHFILE1:%=%.sh)
40 41
41 42 BINPROG= acctcom
42 43 LIBPROG= acctcms acctcon acctcon1 acctcon2 acctdisk \
43 44 acctdusg acctmerg accton acctprc acctprc1 acctprc2 \
44 45 acctwtmp closewtmp fwtmp utmp2wtmp \
45 46 wtmpfix chargefee ckpacct dodisk monacct \
46 47 lastlogin nulladm prctmp prdaily prtacct \
47 48 remove runacct shutacct startup turnacct \
48 49 ptecms.awk ptelus.awk
49 50 ETCPROG= holidays
50 51 INITPROG= acct
51 52
52 53 include ../Makefile.cmd
53 54
54 55 all:= TARGET= all
55 56 install:= TARGET= install
56 57 clean:= TARGET= clean
57 58 clobber:= TARGET= clobber
58 59 lint:= TARGET= lint
59 60
60 61 acctcom := LDLIBS += lib/a.a
61 62 acctcms acctcon acctcon1 acctmerg acctprc1 acctprc := LDLIBS += lib/a.a
62 63
63 64 acctdusg:= CPPFLAGS += -D_FILE_OFFSET_BITS=64
64 65 acctdusg:= LDLIBS += -lcmdutils
65 66
66 67 LIBACCTD= $(ROOTLIB)/acct
67 68 ETCACCTD= $(ROOTETC)/acct
68 69 ETCINITD= $(ROOTETC)/init.d
69 70 VARADMD= $(ROOT)/var/adm
70 71 ACCTDIR= $(VARADMD)/acct
71 72 ACCTSUBDIRS= $(ACCTDIR)/nite $(ACCTDIR)/fiscal $(ACCTDIR)/sum
72 73 WKDIRS= $(ACCTDIR) $(ACCTSUBDIRS)
73 74
74 75 # DIRS is directories to create. $(ETCINITD) [aka: /etc/init.d] is created
75 76 # in /usr/src/Targetdirs and hence should be assumed to exist.
76 77 DIRS= $(LIBACCTD) $(ETCACCTD) $(WKDIRS)
77 78
78 79 USRBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
79 80 LIBACCTPROG= $(LIBPROG:%=$(LIBACCTD)/%)
80 81 ETCACCTPROG= $(ETCPROG:%=$(ETCACCTD)/%)
81 82 ETCINITPROG= $(INITPROG:%=$(ETCINITD)/%)
82 83
83 84 $(LIBACCTD) := DIRMODE= 755
84 85 $(ETCACCTD) := DIRMODE= 755
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
85 86 $(WKDIRS) := DIRMODE= 775
86 87 $(LIBACCTD)/accton := FILEMODE= 04755
87 88 $(ETCINITPROG) := FILEMODE= 0744
88 89 $(ETCACCTPROG) := FILEMODE= 0644
89 90
90 91 CERRWARN += -_gcc=-Wno-implicit-function-declaration
91 92 CERRWARN += -_gcc=-Wno-parentheses
92 93 CERRWARN += -_gcc=-Wno-unused-variable
93 94 CERRWARN += -_gcc=-Wno-address
94 95
96 +# not linted
97 +SMATCH=off
98 +
95 99 .KEEP_STATE:
96 100
97 101 .PARALLEL: $(ALL)
98 102
99 103 all: $(SUBDIRS) .WAIT $(ALL)
100 104
101 105 install: all .WAIT $(DIRS) .WAIT $(USRBINPROG) $(LIBACCTPROG) $(ETCACCTPROG) \
102 106 $(ETCINITPROG)
103 107
104 108 THIS_YEAR:sh= date +%Y
105 109
106 110 holidays: FRC
107 111 @if grep $(THIS_YEAR) holidays > /dev/null 2>&1;\
108 112 then \
109 113 :;\
110 114 else \
111 115 $(ECHO) "building holidays";\
112 116 ( \
113 117 $(ECHO) "* @(#)holidays\tJanuary 1, `date +%Y`";\
114 118 $(ECHO) "*";\
115 119 $(ECHO) "* Prime/Nonprime Table for UNIX Accounting System";\
116 120 $(ECHO) "*";\
117 121 $(ECHO) "* Curr\tPrime\tNon-Prime";\
118 122 $(ECHO) "* Year\tStart\tStart";\
119 123 $(ECHO) "*";\
120 124 $(ECHO) " `date +%Y`\t0800\t1800";\
121 125 $(ECHO) "*";\
122 126 $(ECHO) "* only the first column (month/day) is significiant.";\
123 127 $(ECHO) "*";\
124 128 $(ECHO) "* month/day\tCompany";\
125 129 $(ECHO) "* \t\tHoliday";\
126 130 $(ECHO) "*";\
127 131 $(ECHO) "1/1\t\tNew Years Day";\
128 132 $(ECHO) "7/4\t\tIndep. Day";\
129 133 $(ECHO) "12/25\t\tChristmas" ) > holidays;\
130 134 fi
131 135
132 136 $(DIRS):
133 137 $(INS.dir)
134 138
135 139 $(LIBACCTD)/% : %
136 140 $(INS.file)
137 141
138 142 $(ETCACCTD)/% : %
139 143 $(INS.file)
140 144
141 145 $(ETCINITD)/% : %
142 146 $(INS.file)
143 147
144 148 $(SUBDIRS): FRC
145 149 @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
146 150
147 151 FRC:
148 152
149 153 clean: $(SUBDIRS)
150 154
151 155 clobber: $(SUBDIRS)
152 156 $(RM) $(PROG) $(SHFILE1) holidays
153 157
154 158 lint: $(SUBDIRS)
155 159 $(LINT.c) $(SRCS)
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX