43 development tools should be adjusted to understand the brave new world
[illumos-gate.git] / usr / src / tools / scripts / Makefile
blob20f3e34a5b6a9bdf698ee288d9a77b3ff0abeb44
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2010, Richard Lowe
26 SHELL=/usr/bin/ksh93
28 SHFILES= \
29 Install \
30 bindrop \
31 bldenv \
32 build_cscope \
33 bringovercheck \
34 checkpaths \
35 checkproto \
36 cryptodrop \
37 cstyle \
38 elfcmp \
39 flg.flp \
40 genoffsets \
41 hgsetup \
42 mkclosed \
43 nightly \
44 onu \
45 protocmp.terse \
46 sccscheck \
47 webrev \
48 which_scm \
49 ws \
50 xref
52 PERLFILES= \
53 check_rtime \
54 find_elf \
55 interface_check \
56 interface_cmp \
57 jstyle \
58 mkreadme_osol \
59 mktpl \
60 validate_flg \
61 validate_paths \
62 wdiff
64 PERLMODULES= \
65 onbld_elfmod.pm \
66 onbld_elfmod_vertype.pm
69 PYFILES= \
70 cddlchk \
71 copyrightchk \
72 hdrchk \
73 hg-active \
74 mapfilechk \
75 validate_pkg \
76 wsdiff
78 MAN1FILES= \
79 Install.1 \
80 bldenv.1 \
81 bringovercheck.1 \
82 cddlchk.1 \
83 checkpaths.1 \
84 check_rtime.1 \
85 cstyle.1 \
86 find_elf.1 \
87 flg.flp.1 \
88 hdrchk.1 \
89 interface_check.1 \
90 interface_cmp.1 \
91 hgsetup.1 \
92 jstyle.1 \
93 mapfilechk.1 \
94 nightly.1 \
95 onu.1 \
96 sccscheck.1 \
97 webrev.1 \
98 which_scm.1 \
99 ws.1 \
100 wsdiff.1 \
101 xref.1
103 MAKEFILES= \
104 xref.mk
106 ETCFILES= \
107 hgstyle \
108 its.conf \
109 its.reg
111 EXCEPTFILES= \
112 check_rtime \
113 interface_check \
114 interface_cmp
116 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
118 include ../Makefile.tools
121 $(ROOTONBLDETCFILES) := FILEMODE= 644
122 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644
123 $(ROOTONBLDPERLMODULES) := FILEMODE= 644
124 $(ROOTONBLDMAKEFILES) := FILEMODE= 644
125 $(ROOTONBLDMAN1FILES) := FILEMODE= 644
127 .KEEP_STATE:
129 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
130 $(MAN1FILES) $(MAKEFILES)
132 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
133 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \
134 $(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES) \
135 $(ROOTONBLDETCFILES) $(ROOTONBLDEXCEPTFILES)
137 clean:
138 $(RM) $(CLEANFILES)
140 bldenv: bldenv.sh stdenv.sh
141 $(RM) "$@"
142 sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
143 # Check for shell lint and fail if we hit warnings
144 shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
145 [[ "$${shlintout}" != "" ]] && \
146 { print -r -- "$${shlintout}" ; false ; } || true
147 $(CHMOD) +x "$@"
149 bldenv.1: bldenv
150 $(RM) "$@"
151 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
152 sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
154 nightly: nightly.sh stdenv.sh
155 $(RM) "$@"
156 sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
157 $(CHMOD) +x "$@"
159 include ../Makefile.targ