Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mailx/Makefile
+++ new/usr/src/cmd/mailx/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 #
25 25 # Copyright 2018 Joyent, Inc.
26 26 #
27 27 # cmd/mailx/Makefile
28 28
29 29 PROG= mailx
30 30
31 31 OBJS= myfopen.o aux.o cmd1.o cmd2.o cmd3.o \
32 32 cmd4.o cmdtab.o collect.o config.o edit.o \
33 33 init.o fio.o getname.o head.o \
34 34 hostname.o lex.o list.o lock.o lpaths.o \
35 35 main.o names.o optim.o popen.o quit.o \
36 36 receipt.o send.o sigretro.o stralloc.o temp.o \
37 37 translate.o tty.o usg.local.o vars.o
38 38
39 39 SRCS= $(OBJS:.o=.c)
40 40
41 41 MISC= misc
42 42
43 43 include ../Makefile.cmd
44 44 #
45 45 # for messaging catalogue file
46 46 #
47 47 POFILE= mailx.po
48 48 POFILES= $(SRCS:%.c=%.po)
49 49
50 50 ROOTMAILXD= $(ROOTSHLIB)/mailx
51 51 ROOTETCMAILD= $(ROOTETC)/mail
52 52 MAILXHELP= mailx.help mailx.help.~
53 53 ROOTMAILXHELP= $(MAILXHELP:%=$(ROOTMAILXD)/%)
54 54 MAILXRC= $(MISC)/mailx.rc
55 55 UCBMAILRC= $(MISC)/Mail.rc
56 56 ROOTMAILXRC= $(MAILXRC:$(MISC)/%=$(ROOTETCMAILD)/%)
57 57 ROOTUCBMAILRC= $(UCBMAILRC:$(MISC)/%=$(ROOTETCMAILD)/%)
58 58 ROOTUCBMAIL= $(ROOT)/usr/ucb/mail
59 59 ROOTUCBCAPMAIL= $(ROOT)/usr/ucb/Mail
60 60
↓ open down ↓ |
60 lines elided |
↑ open up ↑ |
61 61 $(ROOTPROG) := FILEMODE = 02511
62 62 $(ROOTMAILXHELP) := FILEMODE = 0644
63 63 $(ROOTMAILXRC) := FILEMODE = 0644
64 64 $(ROOTUCBMAILRC) := FILEMODE = 0644
65 65
66 66 CPPFLAGS= -Ihdr -DUSG -DOPTIM $(CPPFLAGS.master)
67 67 CERRWARN += -_gcc=-Wno-parentheses
68 68 CERRWARN += -_gcc=-Wno-uninitialized
69 69 CERRWARN += -_gcc=-Wno-unused-variable
70 70 CERRWARN += -_gcc=-Wno-clobbered
71 +# not linted
72 +SMATCH=off
73 +
71 74 LINTFLAGS= -hb
72 75 LDLIBS += -lmail -lcustr
73 76 LDFLAGS += $(MAPFILE.NGB:%=-M%)
74 77
75 78 CLOBBERFILES += $(MAILXHELP)
76 79
77 80 # install rules
78 81 $(ROOTMAILXD)/% : %
79 82 $(INS.file)
80 83
81 84 $(ROOTETCMAILD)/% : $(MISC)/%
82 85 $(INS.file)
83 86
84 87 .KEEP_STATE:
85 88
86 89 all: $(PROG) $(MAILXHELP) $(MAILXRC) $(UCBMAILRC)
87 90
88 91 $(PROG): $(OBJS) $(LIBMAIL)
89 92 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
90 93 $(POST_PROCESS)
91 94
92 95 install: all $(ROOTMAILXD) $(ROOTPROG) $(ROOTMAILXHELP) \
93 96 $(ROOTMAILXRC) $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL) $(ROOTUCBMAILRC)
94 97
95 98 $(ROOTUCBMAIL) $(ROOTUCBCAPMAIL):
96 99 $(RM) $@; $(SYMLINK) ../bin/mailx $@
97 100
98 101 $(ROOTMAILXD):
99 102 $(INS.dir)
100 103
101 104 $(MAILXHELP): $(MISC)/$$@
102 105 $(GREP) -v '^#.*@(' $(MISC)/$@ > $@
103 106
104 107 $(POFILE): $(POFILES)
105 108 $(RM) $@
106 109 cat $(POFILES) > $@
107 110
108 111 clean:
109 112 $(RM) $(OBJS)
110 113
111 114 lint: lint_SRCS
112 115
113 116 include ../Makefile.targ
114 117
115 118 FRC:
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX