Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/syslogd/Makefile.com
+++ new/usr/src/cmd/syslogd/Makefile.com
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
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
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 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
22 22 # Use is subject to license terms.
23 23 #
24 +# Copyright (c) 2018, Joyent, Inc.
24 25
25 26 PROG= syslogd
26 27 ROTATESCRIPT= newsyslog
27 28 CONFIGFILE= syslog.conf
28 29 TXTS= syslog.conf
29 30 PRODUCT= $(PROG) $(ROTATESCRIPT)
30 31 OBJS= syslogd.o queue.o list.o conf.o
31 32 SRCS= $(OBJS:%.o=../%.c)
32 33 LLOBJS= $(OBJS:%.o=%.ll)
33 34
34 35 include ../../Makefile.cmd
35 36
36 37 $(PROG) lint := LDLIBS += -lscf -lnsl
37 38 CERRWARN += -_gcc=-Wno-uninitialized
39 +
40 +# not linted
41 +SMATCH=off
42 +
38 43 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
39 44 CFLAGS += -DNDEBUG
40 45
41 46 # there's some extra utility code defined but not used.
42 47 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
43 48
44 49 VARSYSLOG= syslog
45 50 VARAUTHLOG= authlog
46 51 ROOTVARLOGD= $(ROOT)/var/log
47 52
48 53 ROOTETCCONFIG= $(CONFIGFILE:%=$(ROOTETC)/%)
49 54 ROOTLIBROTATE= $(ROTATESCRIPT:%=$(ROOTLIB)/%)
50 55 ROOTVARSYSLOG= $(VARSYSLOG:%=$(ROOTVARLOGD)/%)
51 56 ROOTVARAUTHLOG= $(VARAUTHLOG:%=$(ROOTVARLOGD)/%)
52 57
53 58 $(ROOTUSRSBINPROG) := FILEMODE = 0555
54 59 $(ROOTUSRLIBROTATE) := FILEMODE = 0555
55 60 $(ROOTETCCONFIG) := FILEMODE = 0644
56 61 $(ROOTVARSYSLOG) := FILEMODE = 0644
57 62 $(ROOTVARAUTHLOG) := FILEMODE = 0600
58 63
59 64 $(ROOTVARLOGD)/% : %
60 65 $(INS.file)
61 66
62 67 $(ROOTETC)/%: ../%
63 68 $(INS.file)
64 69
65 70 $(ROOTLIB)/%: ../%
66 71 $(INS.file)
67 72
68 73 .KEEP_STATE:
69 74
70 75 .SUFFIXES: $(SUFFIXES) .ll
71 76
72 77 .c.ll:
73 78 $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
74 79
75 80 .PARALLEL: $(OBJS)
76 81
77 82
78 83 $(VARSYSLOG) $(VARAUTHLOG):
79 84 $(ECHO) '\c' > $@
80 85
81 86 %.o: ../%.c
82 87 $(COMPILE.c) $<
83 88
84 89 %.ll: ../%.c
85 90 $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
86 91
87 92 syslogd: $(OBJS)
88 93 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
89 94 $(POST_PROCESS)
90 95
91 96 logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG)
92 97
93 98 clean:
94 99 $(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG)
95 100
96 101 lint: lint_SRCS
97 102
98 103 lock_lint: $(LLOBJS)
99 104
100 105 include ../../Makefile.targ
↓ open down ↓ |
53 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX