Merge commit '42a3762d0138d6dd0c0f96964be98d0b21ab6bef'
[unleashed.git] / usr / src / tools / scripts / Makefile
blob0e1f39dbcd0b35bc131df86ac32c9895488c1df9
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 checkpaths \
31 cstyle \
32 elfcmp \
33 genoffsets \
34 protocmp.terse \
36 PERLFILES= \
37 check_rtime \
38 find_elf \
39 interface_check \
40 interface_cmp \
41 validate_paths
43 PERLMODULES= \
44 onbld_elfmod.pm \
45 onbld_elfmod_vertype.pm
48 PYFILES= \
49 cddlchk \
50 copyrightchk \
51 git-pbchk \
52 hdrchk \
53 mapfilechk \
54 validate_pkg \
55 wscheck \
56 wsdiff
58 SCRIPTLINKS= \
59 git-nits
61 MAN1ONBLDFILES= \
62 Install.1 \
63 cddlchk.1 \
64 checkpaths.1 \
65 check_rtime.1 \
66 cstyle.1 \
67 find_elf.1 \
68 git-pbchk.1 \
69 hdrchk.1 \
70 interface_check.1 \
71 interface_cmp.1 \
72 mapfilechk.1 \
73 wsdiff.1
75 MAN1ONBLDLINKS= \
76 git-nits.1
78 ETCFILES= \
79 its.conf \
80 its.reg
82 EXCEPTFILES= \
83 check_rtime \
84 interface_check \
85 interface_cmp
87 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES)
89 include ../Makefile.tools
91 ROOTONBLDSCRIPTLINKS = $(SCRIPTLINKS:%=$(ROOTONBLDBIN)/%)
92 ROOTONBLDMAN1ONBLDLINKS = $(MAN1ONBLDLINKS:%=$(ROOTONBLDMAN1ONBLD)/%)
94 $(ROOTONBLDETCFILES) := FILEMODE= 644
95 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644
96 $(ROOTONBLDPERLMODULES) := FILEMODE= 644
97 $(ROOTONBLDMAKEFILES) := FILEMODE= 644
98 $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644
100 .KEEP_STATE:
102 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
103 $(MAN1ONBLDFILES)
105 $(ROOTONBLDBIN)/git-nits:
106 $(RM) $(ROOTONBLDBIN)/git-nits
107 $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits
109 $(ROOTONBLDMAN1ONBLD)/git-nits.1:
110 $(RM) $(ROOTONBLDMAN1ONBLD)/git-nits.1
111 $(SYMLINK) git-pbchk.1 $(ROOTONBLDMAN1ONBLD)/git-nits.1
113 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
114 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \
115 $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES) \
116 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \
117 $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS)
119 clean:
120 $(RM) $(CLEANFILES)
122 bldenv.1: bldenv
123 $(RM) "$@"
124 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
125 sed -e 's/\.DS/.nf/g;s/\.DE/.fi/' \
126 -e 's/\.TH BLDENV 1/.TH BLDENV 1ONBLD/' \
127 -e 's/(1)/(1ONBLD)/' > "$@"
129 include ../Makefile.targ