6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24 # Copyright 2010, Richard Lowe
25 #
26 # Copyright 2018 Joyent, Inc.
27
28 SHELL=/usr/bin/ksh93
29
30 SHFILES= \
31 Install \
32 bldenv \
33 build_cscope \
34 bringovercheck \
35 checkpaths \
36 cstyle \
37 elfcmp \
38 flg.flp \
39 genoffsets \
40 nightly \
41 onu \
42 protocmp.terse \
43 sccscheck \
44 webrev \
45 which_scm \
46 ws \
47 xref
48
49 PERLFILES= \
50 check_rtime \
51 find_elf \
52 interface_check \
53 interface_cmp \
54 jstyle \
55 validate_flg \
56 validate_paths \
57 wdiff
58
59 PERLMODULES= \
60 onbld_elfmod.pm \
113 check_rtime \
114 interface_check \
115 interface_cmp
116
117 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1onbld onu.sh
118
119 include ../Makefile.tools
120
121 ROOTONBLDSCRIPTLINKS = $(SCRIPTLINKS:%=$(ROOTONBLDBIN)/%)
122 ROOTONBLDMAN1ONBLDLINKS = $(MAN1ONBLDLINKS:%=$(ROOTONBLDMAN1ONBLD)/%)
123
124 $(ROOTONBLDETCFILES) := FILEMODE= 644
125 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644
126 $(ROOTONBLDPERLMODULES) := FILEMODE= 644
127 $(ROOTONBLDMAKEFILES) := FILEMODE= 644
128 $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644
129
130 .KEEP_STATE:
131
132 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
133 $(MAN1ONBLDFILES) $(MAKEFILES)
134
135 onu.sh: onu.sh.in
136 $(SED) -e "s:@PYTHON_VERSION@:$(PYTHON_VERSION):g" < onu.sh.in > $@
137
138 $(ROOTONBLDBIN)/git-nits:
139 $(RM) $(ROOTONBLDBIN)/git-nits
140 $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits
141
142 $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld:
143 $(RM) $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
144 $(SYMLINK) git-pbchk.1onbld $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
145
146 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
147 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \
148 $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES) \
149 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \
150 $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS)
151
152 clean:
153 $(RM) $(CLEANFILES)
154
155 bldenv: bldenv.sh stdenv.sh
156 $(RM) "$@"
157 sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
158 # Check for shell lint and fail if we hit warnings
159 shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
160 [[ "$${shlintout}" != "" ]] && \
161 { print -r -- "$${shlintout}" ; false ; } || true
162 $(CHMOD) +x "$@"
163
164 bldenv.1onbld: bldenv
165 $(RM) "$@"
166 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
167 sed -e 's/\.DS/.nf/g;s/\.DE/.fi/' \
168 -e 's/\.TH BLDENV 1/.TH BLDENV 1ONBLD "September 4, 2018"/' \
169 -e 's/.OP \([a-z]\) - flag -/.OP \\-\1/g' \
170 -e 's/(1)/(1ONBLD)/' > "$@"
171
172 nightly: nightly.sh stdenv.sh
173 $(RM) "$@"
174 sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
175 $(CHMOD) +x "$@"
176
177 #
178 # Not run by default: bootstrap...
179 check:
180 $(ROOTONBLDBINMACH)/mandoc -Tlint -Wwarning $(MAN1ONBLDFILES)
181
182 include ../Makefile.targ
183
|
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24 # Copyright 2010, Richard Lowe
25 #
26 # Copyright 2020 Joyent, Inc.
27
28 SHELL=/usr/bin/ksh93
29
30 SCRIPTS= \
31 bldenv \
32 nightly
33
34 SHFILES= \
35 Install \
36 build_cscope \
37 bringovercheck \
38 checkpaths \
39 cstyle \
40 elfcmp \
41 flg.flp \
42 genoffsets \
43 onu \
44 protocmp.terse \
45 sccscheck \
46 webrev \
47 which_scm \
48 ws \
49 xref
50
51 PERLFILES= \
52 check_rtime \
53 find_elf \
54 interface_check \
55 interface_cmp \
56 jstyle \
57 validate_flg \
58 validate_paths \
59 wdiff
60
61 PERLMODULES= \
62 onbld_elfmod.pm \
115 check_rtime \
116 interface_check \
117 interface_cmp
118
119 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1onbld onu.sh
120
121 include ../Makefile.tools
122
123 ROOTONBLDSCRIPTLINKS = $(SCRIPTLINKS:%=$(ROOTONBLDBIN)/%)
124 ROOTONBLDMAN1ONBLDLINKS = $(MAN1ONBLDLINKS:%=$(ROOTONBLDMAN1ONBLD)/%)
125
126 $(ROOTONBLDETCFILES) := FILEMODE= 644
127 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644
128 $(ROOTONBLDPERLMODULES) := FILEMODE= 644
129 $(ROOTONBLDMAKEFILES) := FILEMODE= 644
130 $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644
131
132 .KEEP_STATE:
133
134 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
135 $(MAN1ONBLDFILES) $(MAKEFILES) $(SCRIPTS)
136
137 onu.sh: onu.sh.in
138 $(SED) -e "s:@PYTHON_VERSION@:$(PYTHON_VERSION):g" < onu.sh.in > $@
139
140 $(ROOTONBLDBIN)/git-nits:
141 $(RM) $(ROOTONBLDBIN)/git-nits
142 $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits
143
144 $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld:
145 $(RM) $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
146 $(SYMLINK) git-pbchk.1onbld $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
147
148 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
149 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \
150 $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES) \
151 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \
152 $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS) \
153 $(ROOTONBLDSCRIPTS)
154
155 clean:
156 $(RM) $(CLEANFILES)
157
158 bldenv.1onbld: bldenv
159 $(RM) "$@"
160 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
161 sed -e 's/\.DS/.nf/g;s/\.DE/.fi/' \
162 -e 's/\.TH BLDENV 1/.TH BLDENV 1ONBLD "September 4, 2018"/' \
163 -e 's/.OP \([a-z]\) - flag -/.OP \\-\1/g' \
164 -e 's/(1)/(1ONBLD)/' > "$@"
165
166 #
167 # Not run by default: bootstrap...
168 check:
169 $(ROOTONBLDBINMACH)/mandoc -Tlint -Wwarning $(MAN1ONBLDFILES)
170
171 include ../Makefile.targ
172
|