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 \
61 onbld_elfmod_vertype.pm
62
63
64 PYFILES= \
65 cddlchk \
66 copyrightchk \
67 git-pbchk \
68 hdrchk \
69 mapfilechk \
70 validate_pkg \
71 wscheck \
72 wsdiff
73
74 SCRIPTLINKS= \
75 git-nits
76
77 MAN1ONBLDFILES= \
78 Install.1onbld \
79 bldenv.1onbld \
80 bringovercheck.1onbld \
81 cddlchk.1onbld \
82 checkpaths.1onbld \
83 check_rtime.1onbld \
84 cstyle.1onbld \
85 find_elf.1onbld \
86 flg.flp.1onbld \
87 git-pbchk.1onbld \
88 hdrchk.1onbld \
89 interface_check.1onbld \
90 interface_cmp.1onbld \
91 jstyle.1onbld \
92 mapfilechk.1onbld \
93 nightly.1onbld \
94 onu.1onbld \
95 sccscheck.1onbld \
96 webrev.1onbld \
97 which_scm.1onbld \
98 ws.1onbld \
99 wsdiff.1onbld \
100 xref.1onbld
101
102 MAN1ONBLDLINKS= \
103 git-nits.1onbld
104
105 MAKEFILES= \
106 xref.mk
107
108 ETCFILES= \
109 its.conf \
110 its.reg
111
112 EXCEPTFILES= \
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
|
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 build_cscope \
33 bringovercheck \
34 checkpaths \
35 cstyle \
36 elfcmp \
37 flg.flp \
38 genoffsets \
39 onu \
40 protocmp.terse \
41 sccscheck \
42 webrev \
43 which_scm \
44 ws \
45 xref
46
47 PERLFILES= \
48 check_rtime \
49 find_elf \
50 interface_check \
51 interface_cmp \
52 jstyle \
53 validate_flg \
54 validate_paths \
55 wdiff
56
57 PERLMODULES= \
58 onbld_elfmod.pm \
59 onbld_elfmod_vertype.pm
60
61
62 PYFILES= \
63 cddlchk \
64 copyrightchk \
65 git-pbchk \
66 hdrchk \
67 mapfilechk \
68 validate_pkg \
69 wscheck \
70 wsdiff
71
72 SCRIPTLINKS= \
73 git-nits
74
75 MAN1ONBLDFILES= \
76 Install.1onbld \
77 bringovercheck.1onbld \
78 cddlchk.1onbld \
79 checkpaths.1onbld \
80 check_rtime.1onbld \
81 cstyle.1onbld \
82 find_elf.1onbld \
83 flg.flp.1onbld \
84 git-pbchk.1onbld \
85 hdrchk.1onbld \
86 interface_check.1onbld \
87 interface_cmp.1onbld \
88 jstyle.1onbld \
89 mapfilechk.1onbld \
90 onu.1onbld \
91 sccscheck.1onbld \
92 webrev.1onbld \
93 which_scm.1onbld \
94 ws.1onbld \
95 wsdiff.1onbld \
96 xref.1onbld
97
98 MAN1ONBLDLINKS= \
99 git-nits.1onbld
100
101 MAKEFILES= \
102 xref.mk
103
104 ETCFILES= \
105 its.conf \
106 its.reg
107
108 EXCEPTFILES= \
109 check_rtime \
110 interface_check \
111 interface_cmp
112
113 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) onu.sh
114
115 include ../Makefile.tools
116
117 ROOTONBLDSCRIPTLINKS = $(SCRIPTLINKS:%=$(ROOTONBLDBIN)/%)
118 ROOTONBLDMAN1ONBLDLINKS = $(MAN1ONBLDLINKS:%=$(ROOTONBLDMAN1ONBLD)/%)
119
120 $(ROOTONBLDETCFILES) := FILEMODE= 644
121 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644
122 $(ROOTONBLDPERLMODULES) := FILEMODE= 644
123 $(ROOTONBLDMAKEFILES) := FILEMODE= 644
124 $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644
125
126 .KEEP_STATE:
127
128 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
129 $(MAN1ONBLDFILES) $(MAKEFILES)
130
131 onu.sh: onu.sh.in
132 $(SED) -e "s:@PYTHON_VERSION@:$(PYTHON_VERSION):g" < onu.sh.in > $@
133
134 $(ROOTONBLDBIN)/git-nits:
135 $(RM) $(ROOTONBLDBIN)/git-nits
136 $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits
137
138 $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld:
139 $(RM) $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
140 $(SYMLINK) git-pbchk.1onbld $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
141
142 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
143 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \
144 $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES) \
145 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \
146 $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS)
147
148 clean:
149 $(RM) $(CLEANFILES)
150
151 #
152 # Not run by default: bootstrap...
153 check:
154 $(ROOTONBLDBINMACH)/mandoc -Tlint -Wwarning $(MAN1ONBLDFILES)
155
156 include ../Makefile.targ
157
|