xref: /titanic_41/usr/src/tools/scripts/Makefile (revision ead1f93ee620d7580f7e53350fe5a884fc4f158a)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
578fe7221Sdduvall# Common Development and Distribution License (the "License").
678fe7221Sdduvall# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22597bd30bSMike Kupfer# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
2663df1173SpetedeSHELL=/usr/bin/ksh93
2763df1173Spetede
287c478bd9Sstevel@tonic-gateSHFILES= \
297c478bd9Sstevel@tonic-gate	Install \
307c478bd9Sstevel@tonic-gate	bfu \
314e5b757fSkupfer	bfudrop \
324e5b757fSkupfer	bindrop \
337c478bd9Sstevel@tonic-gate	bldenv \
347c478bd9Sstevel@tonic-gate	build_cscope \
35733ed737Ssommerfe	bringovercheck \
367c478bd9Sstevel@tonic-gate	checkpaths \
377c478bd9Sstevel@tonic-gate	checkproto \
38597bd30bSMike Kupfer	cryptodrop \
397c478bd9Sstevel@tonic-gate	cstyle \
407c478bd9Sstevel@tonic-gate	elfcmp \
417c478bd9Sstevel@tonic-gate	flg.flp \
427c478bd9Sstevel@tonic-gate	genoffsets \
43cdf0c1d5Smjnelson	hgsetup \
447c478bd9Sstevel@tonic-gate	keywords \
457c478bd9Sstevel@tonic-gate	makebfu \
467c478bd9Sstevel@tonic-gate	mkbfu \
471fe69678Skupfer	mkclosed \
487c478bd9Sstevel@tonic-gate	nightly \
494e5b757fSkupfer	onblddrop \
50*ead1f93eSLiane Praza	onu \
517c478bd9Sstevel@tonic-gate	protocmp.terse \
52733ed737Ssommerfe	sccscheck \
537c478bd9Sstevel@tonic-gate	sccscp \
547c478bd9Sstevel@tonic-gate	sccshist \
557c478bd9Sstevel@tonic-gate	sccsmv \
567c478bd9Sstevel@tonic-gate	sccsrm \
574e5b757fSkupfer	sdrop \
587c478bd9Sstevel@tonic-gate	webrev \
59cdf0c1d5Smjnelson	which_scm \
607c478bd9Sstevel@tonic-gate	ws \
617c478bd9Sstevel@tonic-gate	wx \
62cdf0c1d5Smjnelson	wx2hg \
637c478bd9Sstevel@tonic-gate	xref
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gatePERLFILES= \
667c478bd9Sstevel@tonic-gate	check_rtime \
6775ce41a5SAli Bahrami	find_elf \
6875ce41a5SAli Bahrami	interface_check \
6975ce41a5SAli Bahrami	interface_cmp \
7078fe7221Sdduvall	jstyle \
714e5b757fSkupfer	mkreadme_osol \
724e5b757fSkupfer	mktpl \
737c478bd9Sstevel@tonic-gate	validate_flg \
747c478bd9Sstevel@tonic-gate	validate_paths \
757c478bd9Sstevel@tonic-gate	wdiff
767c478bd9Sstevel@tonic-gate
7775ce41a5SAli BahramiPERLMODULES= \
7875ce41a5SAli Bahrami	onbld_elfmod.pm
7975ce41a5SAli Bahrami
8075ce41a5SAli Bahrami
8196ccc8cbSesaxePYFILES= \
82cdf0c1d5Smjnelson 	cddlchk \
83cdf0c1d5Smjnelson 	copyrightchk \
84cdf0c1d5Smjnelson 	hdrchk \
85cdf0c1d5Smjnelson 	hg-active \
86bfed486aSAli Bahrami 	mapfilechk \
87cdf0c1d5Smjnelson 	rtichk \
88*ead1f93eSLiane Praza	validate_pkg \
8996ccc8cbSesaxe 	wsdiff
9096ccc8cbSesaxe
917c478bd9Sstevel@tonic-gateMAN1FILES= \
927c478bd9Sstevel@tonic-gate	Install.1 \
937c478bd9Sstevel@tonic-gate	bldenv.1 \
94733ed737Ssommerfe	bringovercheck.1 \
951f1defa1Salanbur	cddlchk.1 \
967c478bd9Sstevel@tonic-gate	checkpaths.1 \
977c478bd9Sstevel@tonic-gate	check_rtime.1 \
987c478bd9Sstevel@tonic-gate	cstyle.1 \
9975ce41a5SAli Bahrami	find_elf.1 \
1007c478bd9Sstevel@tonic-gate	flg.flp.1 \
101cdf0c1d5Smjnelson	hdrchk.1 \
10275ce41a5SAli Bahrami	interface_check.1 \
10375ce41a5SAli Bahrami	interface_cmp.1 \
104cdf0c1d5Smjnelson	hgsetup.1 \
10578fe7221Sdduvall	jstyle.1 \
106bfed486aSAli Bahrami	mapfilechk.1 \
1077c478bd9Sstevel@tonic-gate	nightly.1 \
108*ead1f93eSLiane Praza	onu.1 \
109733ed737Ssommerfe	sccscheck.1 \
1107c478bd9Sstevel@tonic-gate	sccscp.1 \
1117c478bd9Sstevel@tonic-gate	sccsmv.1 \
1127c478bd9Sstevel@tonic-gate	sccsrm.1 \
1137c478bd9Sstevel@tonic-gate	webrev.1 \
114cdf0c1d5Smjnelson	which_scm.1 \
1157c478bd9Sstevel@tonic-gate	ws.1 \
11696ccc8cbSesaxe	wsdiff.1 \
1177c478bd9Sstevel@tonic-gate	wx.1 \
118cdf0c1d5Smjnelson	wx2hg.1 \
1197c478bd9Sstevel@tonic-gate	xref.1
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateMAKEFILES= \
1227c478bd9Sstevel@tonic-gate	xref.mk
1237c478bd9Sstevel@tonic-gate
12493af10a4SMark J. NelsonETCFILES= \
1250fd2682eSMark J. Nelson	hgstyle \
1260fd2682eSMark J. Nelson	its.conf \
1270fd2682eSMark J. Nelson	its.reg
12893af10a4SMark J. Nelson
12975ce41a5SAli BahramiEXCEPTFILES= \
13075ce41a5SAli Bahrami	check_rtime \
13175ce41a5SAli Bahrami	interface_check \
13275ce41a5SAli Bahrami	interface_cmp
13375ce41a5SAli Bahrami
134cdf0c1d5SmjnelsonCLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gateinclude ../Makefile.tools
1377c478bd9Sstevel@tonic-gate
13893af10a4SMark J. Nelson
13993af10a4SMark J. Nelson$(ROOTONBLDETCFILES)	:= FILEMODE=	644
14075ce41a5SAli Bahrami$(ROOTONBLDEXCEPTFILES)	:= FILEMODE=	644
14175ce41a5SAli Bahrami$(ROOTONBLDPERLMODULES)	:= FILEMODE=	644
1427c478bd9Sstevel@tonic-gate$(ROOTONBLDMAKEFILES)	:= FILEMODE=	644
14393af10a4SMark J. Nelson$(ROOTONBLDMAN1FILES)	:= FILEMODE=	644
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gate.KEEP_STATE:
1467c478bd9Sstevel@tonic-gate
14775ce41a5SAli Bahramiall:	$(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
14875ce41a5SAli Bahrami	$(MAN1FILES) $(MAKEFILES)
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)	\
15175ce41a5SAli Bahrami		$(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES)	\
15275ce41a5SAli Bahrami		$(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES)	\
15375ce41a5SAli Bahrami		$(ROOTONBLDETCFILES) $(ROOTONBLDEXCEPTFILES)
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gateclean:
1567c478bd9Sstevel@tonic-gate	$(RM) $(CLEANFILES)
1577c478bd9Sstevel@tonic-gate
1581fe69678Skupferbldenv: bldenv.sh stdenv.sh
15963df1173Spetede	$(RM) "$@"
16063df1173Spetede	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
16163df1173Spetede	# Check for shell lint and fail if we hit warings
16263df1173Spetede	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
16363df1173Spetede		[[ "$${shlintout}" != "" ]] && \
16463df1173Spetede		{ print -r -- "$${shlintout}" ;	false ; } || true
16563df1173Spetede	$(CHMOD) +x "$@"
16663df1173Spetede
16763df1173Spetedebldenv.1: bldenv
16863df1173Spetede	$(RM) "$@"
16963df1173Spetede	(set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
17063df1173Spetede	sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
1711fe69678Skupfer
1721fe69678Skupfernightly: nightly.sh stdenv.sh
17363df1173Spetede	$(RM) "$@"
1741fe69678Skupfer	sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
17563df1173Spetede	$(CHMOD) +x "$@"
1761fe69678Skupfer
1777c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1787c478bd9Sstevel@tonic-gate
179