xref: /titanic_41/usr/src/tools/scripts/Makefile (revision 0fd2682eef78b1fd2fbb5d69ccc03968820967ae)
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#
22bfed486aSAli Bahrami# Copyright 2009 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	acr \
317c478bd9Sstevel@tonic-gate	bfu \
324e5b757fSkupfer	bfudrop \
334e5b757fSkupfer	bindrop \
347c478bd9Sstevel@tonic-gate	bldenv \
357c478bd9Sstevel@tonic-gate	build_cscope \
36733ed737Ssommerfe	bringovercheck \
377c478bd9Sstevel@tonic-gate	checkpaths \
387c478bd9Sstevel@tonic-gate	checkproto \
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	mkacr \
477c478bd9Sstevel@tonic-gate	mkbfu \
481fe69678Skupfer	mkclosed \
497c478bd9Sstevel@tonic-gate	nightly \
504e5b757fSkupfer	onblddrop \
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 \
6778fe7221Sdduvall	jstyle \
684e5b757fSkupfer	mkreadme_osol \
694e5b757fSkupfer	mktpl \
707c478bd9Sstevel@tonic-gate	validate_flg \
717c478bd9Sstevel@tonic-gate	validate_paths \
727c478bd9Sstevel@tonic-gate	wdiff
737c478bd9Sstevel@tonic-gate
7496ccc8cbSesaxePYFILES= \
75cdf0c1d5Smjnelson	cddlchk \
76cdf0c1d5Smjnelson	copyrightchk \
77cdf0c1d5Smjnelson	hdrchk \
78cdf0c1d5Smjnelson	hg-active \
79bfed486aSAli Bahrami	mapfilechk \
80cdf0c1d5Smjnelson	rtichk \
8196ccc8cbSesaxe	wsdiff
8296ccc8cbSesaxe
837c478bd9Sstevel@tonic-gateMAN1FILES= \
847c478bd9Sstevel@tonic-gate	Install.1 \
857c478bd9Sstevel@tonic-gate	acr.1 \
867c478bd9Sstevel@tonic-gate	bldenv.1 \
87733ed737Ssommerfe	bringovercheck.1 \
881f1defa1Salanbur	cddlchk.1 \
897c478bd9Sstevel@tonic-gate	checkpaths.1 \
907c478bd9Sstevel@tonic-gate	check_rtime.1 \
917c478bd9Sstevel@tonic-gate	cstyle.1 \
927c478bd9Sstevel@tonic-gate	flg.flp.1 \
93cdf0c1d5Smjnelson	hdrchk.1 \
94cdf0c1d5Smjnelson	hgsetup.1 \
9578fe7221Sdduvall	jstyle.1 \
96bfed486aSAli Bahrami	mapfilechk.1 \
977c478bd9Sstevel@tonic-gate	mkacr.1 \
987c478bd9Sstevel@tonic-gate	nightly.1 \
99733ed737Ssommerfe	sccscheck.1 \
1007c478bd9Sstevel@tonic-gate	sccscp.1 \
1017c478bd9Sstevel@tonic-gate	sccsmv.1 \
1027c478bd9Sstevel@tonic-gate	sccsrm.1 \
1037c478bd9Sstevel@tonic-gate	webrev.1 \
104cdf0c1d5Smjnelson	which_scm.1 \
1057c478bd9Sstevel@tonic-gate	ws.1 \
10696ccc8cbSesaxe	wsdiff.1 \
1077c478bd9Sstevel@tonic-gate	wx.1 \
108cdf0c1d5Smjnelson	wx2hg.1 \
1097c478bd9Sstevel@tonic-gate	xref.1
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateMAKEFILES= \
1127c478bd9Sstevel@tonic-gate	xref.mk
1137c478bd9Sstevel@tonic-gate
11493af10a4SMark J. NelsonETCFILES= \
115*0fd2682eSMark J. Nelson	hgstyle \
116*0fd2682eSMark J. Nelson	its.conf \
117*0fd2682eSMark J. Nelson	its.reg
11893af10a4SMark J. Nelson
119cdf0c1d5SmjnelsonCLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateinclude ../Makefile.tools
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gateOWNER=		root
1247c478bd9Sstevel@tonic-gateGROUP=		bin
12593af10a4SMark J. Nelson
12693af10a4SMark J. Nelson$(ROOTONBLDETCFILES)	:= FILEMODE=	644
1277c478bd9Sstevel@tonic-gate$(ROOTONBLDMAKEFILES)	:= FILEMODE=	644
12893af10a4SMark J. Nelson$(ROOTONBLDMAN1FILES)	:= FILEMODE=	644
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate.KEEP_STATE:
1317c478bd9Sstevel@tonic-gate
13296ccc8cbSesaxeall:	$(SHFILES) $(PERLFILES) $(PYFILES) $(MAN1FILES) $(MAKEFILES)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)	\
13593af10a4SMark J. Nelson		$(ROOTONBLDPYFILES) $(ROOTONBLDMAN1FILES)	\
13693af10a4SMark J. Nelson		$(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES)
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gateclean:
1397c478bd9Sstevel@tonic-gate	$(RM) $(CLEANFILES)
1407c478bd9Sstevel@tonic-gate
1411fe69678Skupferbldenv: bldenv.sh stdenv.sh
14263df1173Spetede	$(RM) "$@"
14363df1173Spetede	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
14463df1173Spetede	# Check for shell lint and fail if we hit warings
14563df1173Spetede	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
14663df1173Spetede		[[ "$${shlintout}" != "" ]] && \
14763df1173Spetede		{ print -r -- "$${shlintout}" ;	false ; } || true
14863df1173Spetede	$(CHMOD) +x "$@"
14963df1173Spetede
15063df1173Spetedebldenv.1: bldenv
15163df1173Spetede	$(RM) "$@"
15263df1173Spetede	(set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
15363df1173Spetede	sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
1541fe69678Skupfer
1551fe69678Skupfernightly: nightly.sh stdenv.sh
15663df1173Spetede	$(RM) "$@"
1571fe69678Skupfer	sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
15863df1173Spetede	$(CHMOD) +x "$@"
1591fe69678Skupfer
1607c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1617c478bd9Sstevel@tonic-gate
162