Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/dtrace/test/tst/Makefile.com
+++ new/usr/src/cmd/dtrace/test/tst/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
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 #
23 23 # Copyright 2008 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 include $(SRC)/cmd/Makefile.cmd
28 29
29 30 .KEEP_STATE:
30 31
31 32 ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt
32 33 ROOTTST = $(ROOTOPTPKG)/tst
33 34 SUBDIR :sh= basename `pwd`
34 35 TSTDIR = $(ROOTTST)/$(SUBDIR)
35 36 DSTYLE = $(ROOTOPTPKG)/bin/dstyle
36 37
37 38 CSRCS :sh= find . -name SCCS -prune -o -name *.c -print | cut -b3-
38 39 SSRCS :sh= find . -name SCCS -prune -o -name *.s -print | cut -b3-
39 40 DSRCS :sh= find . -name SCCS -prune -o -name *.d -print | cut -b3-
40 41
41 42 TSTS :sh= find . -name tst.*.d -o -name err.*.d -o \
42 43 -name tst.*.d.out -o -name err.*.d.out -o -name tst.*.ksh \
43 44 -o -name err.*.ksh -o -name tst.*.ksh.out -o -name drp.*.d \
44 45 -o -name get.*.pl
45 46
46 47 EXES :sh= find . -name SCCS -prune -o \( -name *.exe -o -name \*.pl \) -print \
47 48 | cut -b3-
48 49 EXES += $(CSRCS:%.c=%.exe)
49 50 EXES += $(SSRCS:%.s=%.exe)
50 51
51 52 ROOT_TSTS = $(TSTS:%=$(TSTDIR)/%)
52 53 ROOT_EXES = $(EXES:%=$(TSTDIR)/%)
53 54
54 55 $(ROOT_TSTS) := FILEMODE = 0444
55 56 $(ROOT_EXES) := FILEMODE = 0555
56 57
57 58 # The DTrace tests rely on "normal" behaviour from the compiler which
58 59 # agressive optimization of small, simple, one compilation-unit programs may
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
59 60 # utterly subvert. We force the compiler to not optimize rather than engage
60 61 # in an arms race with increasingly belligerent optimizers.
61 62 COPTFLAG= -xO0
62 63
63 64 CERRWARN += -_gcc=-Wno-switch
64 65 CERRWARN += -_gcc=-Wno-unused-variable
65 66 CERRWARN += -_gcc=-Wno-implicit-function-declaration
66 67 CERRWARN += -_gcc=-Wno-unused-function
67 68 CERRWARN += -_gcc=-Wno-unused-variable
68 69
70 +# not linted
71 +SMATCH=off
72 +
69 73 all: $(EXES)
70 74
71 75 clean lint:
72 76
73 77 clobber: FRC
74 78 -$(RM) $(CSRCS:%.c=%.exe) $(CSRCS:%.c=%.o)
75 79 -$(RM) $(SSRCS:%.s=%.exe) $(SSRCS:%.s=%.o)
76 80 -$(RM) $(DSRCS:%.d=%.o)
77 81 -$(RM) $(CLOBBERFILES)
78 82
79 83 install: $(ROOT_TSTS) $(ROOT_EXES)
80 84
81 85 $(ROOT_TSTS): $(TSTDIR)
82 86
83 87 $(ROOT_EXES): $(TSTDIR)
84 88
85 89 $(TSTDIR):
86 90 $(INS.dir)
87 91
88 92 $(TSTDIR)/%: %
89 93 $(INS) -s -d -m $(DIRMODE) $(@D)
90 94 $(INS.file)
91 95
92 96 %.exe: %.c
93 97 $(LINK.c) -o $@ $< $(LDLIBS)
94 98 $(POST_PROCESS) ; $(STRIP_STABS)
95 99
96 100 %.exe: %.o
97 101 $(LINK.c) -o $@ $< $(LDLIBS)
98 102 $(POST_PROCESS) ; $(STRIP_STABS)
99 103
100 104 %.o: %.c
101 105 $(COMPILE.c) -o $@ $<
102 106 $(POST_PROCESS_O)
103 107
104 108 %.o: %.s
105 109 $(COMPILE.s) -o $@ $<
106 110 $(POST_PROCESS_O)
107 111
108 112 scripts: FRC
109 113 @cd ../cmd/scripts; pwd; $(MAKE) install
110 114
111 115 dstyle: FRC
112 116 @if [ -n "$(DSRCS)" ]; then $(DSTYLE) $(DSRCS); fi
113 117
114 118 FRC:
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX