xref: /titanic_44/usr/src/tools/scripts/Makefile (revision 5253169e90b276216b53d82f9ba4c56334db5740)
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#
22b83ec4edSjmcp# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate
2563df1173SpetedeSHELL=/usr/bin/ksh93
2663df1173Spetede
277c478bd9Sstevel@tonic-gateSHFILES= \
287c478bd9Sstevel@tonic-gate	Install \
297c478bd9Sstevel@tonic-gate	bfu \
304e5b757fSkupfer	bindrop \
317c478bd9Sstevel@tonic-gate	bldenv \
327c478bd9Sstevel@tonic-gate	build_cscope \
33733ed737Ssommerfe	bringovercheck \
347c478bd9Sstevel@tonic-gate	checkpaths \
357c478bd9Sstevel@tonic-gate	checkproto \
36597bd30bSMike Kupfer	cryptodrop \
377c478bd9Sstevel@tonic-gate	cstyle \
387c478bd9Sstevel@tonic-gate	elfcmp \
397c478bd9Sstevel@tonic-gate	flg.flp \
407c478bd9Sstevel@tonic-gate	genoffsets \
41cdf0c1d5Smjnelson	hgsetup \
427c478bd9Sstevel@tonic-gate	keywords \
437c478bd9Sstevel@tonic-gate	makebfu \
447c478bd9Sstevel@tonic-gate	mkbfu \
451fe69678Skupfer	mkclosed \
467c478bd9Sstevel@tonic-gate	nightly \
47ead1f93eSLiane Praza	onu \
487c478bd9Sstevel@tonic-gate	protocmp.terse \
49733ed737Ssommerfe	sccscheck \
507c478bd9Sstevel@tonic-gate	sccscp \
517c478bd9Sstevel@tonic-gate	sccshist \
527c478bd9Sstevel@tonic-gate	sccsmv \
537c478bd9Sstevel@tonic-gate	sccsrm \
547c478bd9Sstevel@tonic-gate	webrev \
55cdf0c1d5Smjnelson	which_scm \
567c478bd9Sstevel@tonic-gate	ws \
577c478bd9Sstevel@tonic-gate	wx \
58cdf0c1d5Smjnelson	wx2hg \
597c478bd9Sstevel@tonic-gate	xref
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gatePERLFILES= \
627c478bd9Sstevel@tonic-gate	check_rtime \
6375ce41a5SAli Bahrami	find_elf \
6475ce41a5SAli Bahrami	interface_check \
6575ce41a5SAli Bahrami	interface_cmp \
6678fe7221Sdduvall	jstyle \
674e5b757fSkupfer	mkreadme_osol \
684e5b757fSkupfer	mktpl \
697c478bd9Sstevel@tonic-gate	validate_flg \
707c478bd9Sstevel@tonic-gate	validate_paths \
717c478bd9Sstevel@tonic-gate	wdiff
727c478bd9Sstevel@tonic-gate
7375ce41a5SAli BahramiPERLMODULES= \
74*5253169eSAli Bahrami	onbld_elfmod.pm \
75*5253169eSAli Bahrami	onbld_elfmod_vertype.pm
7675ce41a5SAli Bahrami
7775ce41a5SAli Bahrami
7896ccc8cbSesaxePYFILES= \
79cdf0c1d5Smjnelson	cddlchk \
80cdf0c1d5Smjnelson	copyrightchk \
81cdf0c1d5Smjnelson	hdrchk \
82cdf0c1d5Smjnelson	hg-active \
83bfed486aSAli Bahrami	mapfilechk \
84cdf0c1d5Smjnelson	rtichk \
85ead1f93eSLiane Praza	validate_pkg \
8696ccc8cbSesaxe	wsdiff
8796ccc8cbSesaxe
887c478bd9Sstevel@tonic-gateMAN1FILES= \
897c478bd9Sstevel@tonic-gate	Install.1 \
907c478bd9Sstevel@tonic-gate	bldenv.1 \
91733ed737Ssommerfe	bringovercheck.1 \
921f1defa1Salanbur	cddlchk.1 \
937c478bd9Sstevel@tonic-gate	checkpaths.1 \
947c478bd9Sstevel@tonic-gate	check_rtime.1 \
957c478bd9Sstevel@tonic-gate	cstyle.1 \
9675ce41a5SAli Bahrami	find_elf.1 \
977c478bd9Sstevel@tonic-gate	flg.flp.1 \
98cdf0c1d5Smjnelson	hdrchk.1 \
9975ce41a5SAli Bahrami	interface_check.1 \
10075ce41a5SAli Bahrami	interface_cmp.1 \
101cdf0c1d5Smjnelson	hgsetup.1 \
10278fe7221Sdduvall	jstyle.1 \
103bfed486aSAli Bahrami	mapfilechk.1 \
1047c478bd9Sstevel@tonic-gate	nightly.1 \
105ead1f93eSLiane Praza	onu.1 \
106733ed737Ssommerfe	sccscheck.1 \
1077c478bd9Sstevel@tonic-gate	sccscp.1 \
1087c478bd9Sstevel@tonic-gate	sccsmv.1 \
1097c478bd9Sstevel@tonic-gate	sccsrm.1 \
1107c478bd9Sstevel@tonic-gate	webrev.1 \
111cdf0c1d5Smjnelson	which_scm.1 \
1127c478bd9Sstevel@tonic-gate	ws.1 \
11396ccc8cbSesaxe	wsdiff.1 \
1147c478bd9Sstevel@tonic-gate	wx.1 \
115cdf0c1d5Smjnelson	wx2hg.1 \
1167c478bd9Sstevel@tonic-gate	xref.1
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gateMAKEFILES= \
1197c478bd9Sstevel@tonic-gate	xref.mk
1207c478bd9Sstevel@tonic-gate
12193af10a4SMark J. NelsonETCFILES= \
1220fd2682eSMark J. Nelson	hgstyle \
1230fd2682eSMark J. Nelson	its.conf \
1240fd2682eSMark J. Nelson	its.reg
12593af10a4SMark J. Nelson
12675ce41a5SAli BahramiEXCEPTFILES= \
12775ce41a5SAli Bahrami	check_rtime \
12875ce41a5SAli Bahrami	interface_check \
12975ce41a5SAli Bahrami	interface_cmp
13075ce41a5SAli Bahrami
131cdf0c1d5SmjnelsonCLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
1327c478bd9Sstevel@tonic-gate
1337c478bd9Sstevel@tonic-gateinclude ../Makefile.tools
1347c478bd9Sstevel@tonic-gate
13593af10a4SMark J. Nelson
13693af10a4SMark J. Nelson$(ROOTONBLDETCFILES)	:= FILEMODE=	644
13775ce41a5SAli Bahrami$(ROOTONBLDEXCEPTFILES)	:= FILEMODE=	644
13875ce41a5SAli Bahrami$(ROOTONBLDPERLMODULES)	:= FILEMODE=	644
1397c478bd9Sstevel@tonic-gate$(ROOTONBLDMAKEFILES)	:= FILEMODE=	644
14093af10a4SMark J. Nelson$(ROOTONBLDMAN1FILES)	:= FILEMODE=	644
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gate.KEEP_STATE:
1437c478bd9Sstevel@tonic-gate
14475ce41a5SAli Bahramiall:	$(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
14575ce41a5SAli Bahrami	$(MAN1FILES) $(MAKEFILES)
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)	\
14875ce41a5SAli Bahrami		$(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES)	\
14975ce41a5SAli Bahrami		$(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES)	\
15075ce41a5SAli Bahrami		$(ROOTONBLDETCFILES) $(ROOTONBLDEXCEPTFILES)
1517c478bd9Sstevel@tonic-gate
1527c478bd9Sstevel@tonic-gateclean:
1537c478bd9Sstevel@tonic-gate	$(RM) $(CLEANFILES)
1547c478bd9Sstevel@tonic-gate
1551fe69678Skupferbldenv: bldenv.sh stdenv.sh
15663df1173Spetede	$(RM) "$@"
15763df1173Spetede	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
15863df1173Spetede	# Check for shell lint and fail if we hit warings
15963df1173Spetede	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
16063df1173Spetede		[[ "$${shlintout}" != "" ]] && \
16163df1173Spetede		{ print -r -- "$${shlintout}" ;	false ; } || true
16263df1173Spetede	$(CHMOD) +x "$@"
16363df1173Spetede
16463df1173Spetedebldenv.1: bldenv
16563df1173Spetede	$(RM) "$@"
16663df1173Spetede	(set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
16763df1173Spetede	sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
1681fe69678Skupfer
1691fe69678Skupfernightly: nightly.sh stdenv.sh
17063df1173Spetede	$(RM) "$@"
1711fe69678Skupfer	sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
17263df1173Spetede	$(CHMOD) +x "$@"
1731fe69678Skupfer
1747c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1757c478bd9Sstevel@tonic-gate
176