xref: /titanic_52/usr/src/tools/scripts/Makefile (revision cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0)
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#
2263df1173Spetede# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
2863df1173SpetedeSHELL=/usr/bin/ksh93
2963df1173Spetede
307c478bd9Sstevel@tonic-gateSHFILES= \
317c478bd9Sstevel@tonic-gate	Install \
327c478bd9Sstevel@tonic-gate	acr \
337c478bd9Sstevel@tonic-gate	bfu \
344e5b757fSkupfer	bfudrop \
354e5b757fSkupfer	bindrop \
367c478bd9Sstevel@tonic-gate	bldenv \
377c478bd9Sstevel@tonic-gate	build_cscope \
38733ed737Ssommerfe	bringovercheck \
397c478bd9Sstevel@tonic-gate	checkpaths \
407c478bd9Sstevel@tonic-gate	checkproto \
417c478bd9Sstevel@tonic-gate	cstyle \
427c478bd9Sstevel@tonic-gate	elfcmp \
437c478bd9Sstevel@tonic-gate	flg.flp \
447c478bd9Sstevel@tonic-gate	genoffsets \
45*cdf0c1d5Smjnelson	hgsetup \
467c478bd9Sstevel@tonic-gate	keywords \
477c478bd9Sstevel@tonic-gate	makebfu \
487c478bd9Sstevel@tonic-gate	mkacr \
497c478bd9Sstevel@tonic-gate	mkbfu \
501fe69678Skupfer	mkclosed \
517c478bd9Sstevel@tonic-gate	nightly \
524e5b757fSkupfer	onblddrop \
537c478bd9Sstevel@tonic-gate	protocmp.terse \
54733ed737Ssommerfe	sccscheck \
557c478bd9Sstevel@tonic-gate	sccscp \
567c478bd9Sstevel@tonic-gate	sccshist \
577c478bd9Sstevel@tonic-gate	sccsmv \
587c478bd9Sstevel@tonic-gate	sccsrm \
594e5b757fSkupfer	sdrop \
607c478bd9Sstevel@tonic-gate	webrev \
61*cdf0c1d5Smjnelson	which_scm \
627c478bd9Sstevel@tonic-gate	ws \
637c478bd9Sstevel@tonic-gate	wx \
64*cdf0c1d5Smjnelson	wx2hg \
657c478bd9Sstevel@tonic-gate	xref
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gatePERLFILES= \
687c478bd9Sstevel@tonic-gate	check_rtime \
6978fe7221Sdduvall	jstyle \
704e5b757fSkupfer	mkreadme_osol \
714e5b757fSkupfer	mktpl \
727c478bd9Sstevel@tonic-gate	validate_flg \
737c478bd9Sstevel@tonic-gate	validate_paths \
747c478bd9Sstevel@tonic-gate	wdiff
757c478bd9Sstevel@tonic-gate
7696ccc8cbSesaxePYFILES= \
77*cdf0c1d5Smjnelson	cddlchk \
78*cdf0c1d5Smjnelson	copyrightchk \
79*cdf0c1d5Smjnelson	hdrchk \
80*cdf0c1d5Smjnelson	hg-active \
81*cdf0c1d5Smjnelson	rtichk \
8296ccc8cbSesaxe	wsdiff
8396ccc8cbSesaxe
847c478bd9Sstevel@tonic-gateMAN1FILES= \
857c478bd9Sstevel@tonic-gate	Install.1 \
867c478bd9Sstevel@tonic-gate	acr.1 \
877c478bd9Sstevel@tonic-gate	bldenv.1 \
88733ed737Ssommerfe	bringovercheck.1 \
891f1defa1Salanbur	cddlchk.1 \
907c478bd9Sstevel@tonic-gate	checkpaths.1 \
917c478bd9Sstevel@tonic-gate	check_rtime.1 \
927c478bd9Sstevel@tonic-gate	cstyle.1 \
937c478bd9Sstevel@tonic-gate	flg.flp.1 \
94*cdf0c1d5Smjnelson	hdrchk.1 \
95*cdf0c1d5Smjnelson	hgsetup.1 \
9678fe7221Sdduvall	jstyle.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 \
104*cdf0c1d5Smjnelson	which_scm.1 \
1057c478bd9Sstevel@tonic-gate	ws.1 \
10696ccc8cbSesaxe	wsdiff.1 \
1077c478bd9Sstevel@tonic-gate	wx.1 \
108*cdf0c1d5Smjnelson	wx2hg.1 \
1097c478bd9Sstevel@tonic-gate	xref.1
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateMAKEFILES= \
1127c478bd9Sstevel@tonic-gate	xref.mk
1137c478bd9Sstevel@tonic-gate
114*cdf0c1d5SmjnelsonCLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gateinclude ../Makefile.tools
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gateOWNER=		root
1197c478bd9Sstevel@tonic-gateGROUP=		bin
1207c478bd9Sstevel@tonic-gate$(ROOTONBLDMAN1FILES) := FILEMODE=	644
1217c478bd9Sstevel@tonic-gate$(ROOTONBLDMAKEFILES) := FILEMODE=	644
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gate.KEEP_STATE:
1247c478bd9Sstevel@tonic-gate
12596ccc8cbSesaxeall:	$(SHFILES) $(PERLFILES) $(PYFILES) $(MAN1FILES) $(MAKEFILES)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \
12896ccc8cbSesaxe		$(ROOTONBLDPYFILES) $(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES)
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gateclean:
1317c478bd9Sstevel@tonic-gate	$(RM) $(CLEANFILES)
1327c478bd9Sstevel@tonic-gate
1331fe69678Skupferbldenv: bldenv.sh stdenv.sh
13463df1173Spetede	$(RM) "$@"
13563df1173Spetede	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
13663df1173Spetede	# Check for shell lint and fail if we hit warings
13763df1173Spetede	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
13863df1173Spetede		[[ "$${shlintout}" != "" ]] && \
13963df1173Spetede		{ print -r -- "$${shlintout}" ;	false ; } || true
14063df1173Spetede	$(CHMOD) +x "$@"
14163df1173Spetede
14263df1173Spetedebldenv.1: bldenv
14363df1173Spetede	$(RM) "$@"
14463df1173Spetede	(set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
14563df1173Spetede	sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
1461fe69678Skupfer
1471fe69678Skupfernightly: nightly.sh stdenv.sh
14863df1173Spetede	$(RM) "$@"
1491fe69678Skupfer	sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
15063df1173Spetede	$(CHMOD) +x "$@"
1511fe69678Skupfer
1527c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1537c478bd9Sstevel@tonic-gate
154