Print this page
12482 Have /usr/bin/awk point to /usr/bin/nawk
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/oawk/Makefile
+++ new/usr/src/cmd/oawk/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, Version 1.0 only
6 6 # (the "License"). You may not use this file except in compliance
7 7 # with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
|
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
21 21 #
22 22 #
23 23 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 # Copyright 2020 Joyent, Inc.
27 27
28 28 include ../Makefile.cmd
29 29
30 30 PROG = oawk
31 -LINKPROG = awk
32 31
33 32 SRCS = b.c lib.c main.c parse.c run.c tran.c
34 33
35 34 #TXTS = README EXPLAIN
36 35
37 36 OBJS = awk.g.o awk.lx.o proctab.o tmptoken.o \
38 37 $(SRCS:%.c=%.o)
39 38
40 39 #
41 40 # for message catalogue
42 41 #
43 42 POFILES= $(OBJS:%.o=%.po)
44 43 POFILE= oawk.po
45 44 XGETFLAGS += -a -x oawk.xcl
46 45
47 46 NATIVEDIR = native
48 47 MAKEPRCTAB = $(NATIVEDIR)/makeprctab
49 48
50 49 NATIVEOBJS = $(NATIVEDIR)/makeprctab.o $(NATIVEDIR)/tmptoken.o
51 50 $(MAKEPRCTAB) := CC = $(NATIVECC)
52 51 $(MAKEPRCTAB) := POST_PROCESS=
53 52 $(MAKEPRCTAB) := POST_PROCESS_O=
54 53 $(MAKEPRCTAB) := NATIVE_LIBS += libm.so libc.so
|
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
55 54
56 55 CLEANFILES = proctab.c y.tab.h y.tab.c awk.h awk.g.c \
57 56 tmptoken.c awk.lx.c $(NATIVEOBJS) $(MAKEPRCTAB) \
58 57 temp
59 58
60 59 YFLAGS = -d
61 60 LDLIBS += -lm
62 61 CPPFLAGS = -I. $(CPPFLAGS.master)
63 62 CPPFLAGS += -D_FILE_OFFSET_BITS=64
64 63
65 -ROOTLINK = $(LINKPROG:%=$(ROOTBIN)/%)
66 -
67 64 CERRWARN += -_gcc=-Wno-implicit-function-declaration
68 65 CERRWARN += -_gcc=-Wno-unused-label
69 66 CERRWARN += -_gcc=-Wno-unused-variable
70 67 CERRWARN += -_gcc=-Wno-extra
71 68 CERRWARN += -_gcc=-Wno-parentheses
72 69
73 70 # missing type declarations
74 71 SMATCH = off
75 72
76 73 .KEEP_STATE :
77 74
78 75 all : $(PROG) $(TXTS)
79 76
80 77 $(PROG) : $(OBJS)
81 78 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
82 79 $(POST_PROCESS)
83 80
84 81 $(POFILE): $(POFILES)
85 82 $(RM) $@
86 83 $(CAT) $(POFILES) > $@
87 84
88 85 awk.g.c + awk.h : awk.g.y
89 86 $(RM) awk.g.c awk.h
90 87 $(YACC.y) awk.g.y
91 88 $(MV) y.tab.c awk.g.c
92 89 $(MV) y.tab.h awk.h
93 90
94 91 awk.lx.c: awk.lx.l
95 92 $(LEX.l) -w awk.lx.l > awk.lx.c
96 93
97 94 tmptoken.c : tokenscript token.c
|
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
98 95 $(RM) $@
99 96 ed - < tokenscript
100 97
101 98 proctab.c : $(MAKEPRCTAB)
102 99 $(RM) $@
103 100 $(MAKEPRCTAB) > $@
104 101
105 102 $(MAKEPRCTAB) : $(NATIVEDIR) $(NATIVEOBJS)
106 103 $(LINK.c) $(NATIVEOBJS) -o $@ $(XLDLIBS5CC)
107 104
108 -install : all $(ROOTPROG) $(ROOTLINK)
105 +install : all $(ROOTPROG)
109 106
110 107 $(NATIVEDIR) :
111 108 -@mkdir -p $(NATIVEDIR)
112 109
113 110 $(NATIVEDIR)/%.o : %.c
114 111 $(COMPILE.c) -o $@ $<
115 112
116 -$(ROOTLINK) : $(ROOTPROG)
117 - $(RM) $@; $(LN) $(ROOTPROG) $@
118 -
119 113 clean:
120 114 $(RM) $(OBJS) $(CLEANFILES)
121 115
122 116 lint : lint_SRCS
123 117
124 118 strip:
125 119 $(STRIP) $(PROG)
126 120
127 121 include ../Makefile.targ
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX