Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/shcomp/Makefile
+++ new/usr/src/cmd/shcomp/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 #
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 SHELL=/usr/bin/ksh93
28 29
29 30 include ../Makefile.cmd
30 31 $(SPARC_BLD)include ../Makefile.cmd.64
31 32
32 33 .KEEP_STATE:
33 34
34 35 # Set common AST build flags (e.g., needed to support the math stuff).
35 36 include ../../Makefile.ast
36 37
37 38 OBJECTS= \
38 39 shcomp.o
39 40
40 41 LIBSHELLMACH=$(MACH)
41 42 LIBSHELLBASE=../../lib/libshell
42 43 LIBSHELLSRC=$(LIBSHELLBASE)/common/sh
43 44
44 45 SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
45 46
46 47 LDLIBS += -lshell -last
47 48
48 49 # 1. Make sure that the -D/-U defines in CFLAGS below are in sync
49 50 # with usr/src/lib/libshell/Makefile.com
50 51 # 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
51 52 # case - it MUST come as the last element but future changes in -D options
52 53 # may then cause silent breakage in the AST sources because the last -D
53 54 # option specified overrides previous -D options so we prefer the current
54 55 # way to explicitly list each single flag.
55 56 CPPFLAGS = \
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
56 57 $(DTEXTDOM) $(DTS_ERRNO) \
57 58 $(LIBSHELLCPPFLAGS)
58 59
59 60 CFLAGS += \
60 61 $(ASTCFLAGS)
61 62 CFLAGS64 += \
62 63 $(ASTCFLAGS64)
63 64
64 65 CERRWARN += -_gcc=-Wno-parentheses
65 66
67 +SMOFF += all_func_returns
68 +
66 69 ROOTCMDDIR=$(ROOT)/usr/bin
67 70
68 71 PROG= shcomp
69 72
70 73 %.o: $(LIBSHELLSRC)/%.c
71 74 $(COMPILE.c) -c -o $@ $<
72 75 $(POST_PROCESS_O)
73 76
74 77 all: $(PROG)
75 78
76 79 # dummy file since AST/ksh/shcomp doesn't use *.po files
77 80 # (and "shcomp" is just a frontend which calls directly into libshell,
78 81 # e.g. there are no l10n strings here)
79 82 $(PROG).po:
80 83 $(RM) $(PROG).po ; \
81 84 $(TOUCH) $(PROG).po
82 85
83 86
84 87 install: all $(ROOTCMD)
85 88
86 89 $(PROG): $(OBJECTS)
87 90 $(RM) shcomp
88 91 $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
89 92 $(POST_PROCESS)
90 93
91 94 clean:
92 95 $(RM) $(OBJECTS)
93 96
94 97 lint:
95 98
96 99 include ../Makefile.targ
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX