xref: /titanic_41/usr/src/tools/scripts/Makefile (revision 2f54b716e4d3cb0dc99066638fed631e3cbec97c)
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#
24*2f54b716SRichard Lowe# Copyright 2010, Richard Lowe
257c478bd9Sstevel@tonic-gate
2663df1173SpetedeSHELL=/usr/bin/ksh93
2763df1173Spetede
287c478bd9Sstevel@tonic-gateSHFILES= \
297c478bd9Sstevel@tonic-gate	Install \
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 \
421fe69678Skupfer	mkclosed \
437c478bd9Sstevel@tonic-gate	nightly \
44ead1f93eSLiane Praza	onu \
457c478bd9Sstevel@tonic-gate	protocmp.terse \
46733ed737Ssommerfe	sccscheck \
477c478bd9Sstevel@tonic-gate	webrev \
48cdf0c1d5Smjnelson	which_scm \
497c478bd9Sstevel@tonic-gate	ws \
507c478bd9Sstevel@tonic-gate	xref
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gatePERLFILES= \
537c478bd9Sstevel@tonic-gate	check_rtime \
5475ce41a5SAli Bahrami	find_elf \
5575ce41a5SAli Bahrami	interface_check \
5675ce41a5SAli Bahrami	interface_cmp \
5778fe7221Sdduvall	jstyle \
584e5b757fSkupfer	mkreadme_osol \
594e5b757fSkupfer	mktpl \
607c478bd9Sstevel@tonic-gate	validate_flg \
617c478bd9Sstevel@tonic-gate	validate_paths \
627c478bd9Sstevel@tonic-gate	wdiff
637c478bd9Sstevel@tonic-gate
6475ce41a5SAli BahramiPERLMODULES= \
655253169eSAli Bahrami	onbld_elfmod.pm \
665253169eSAli Bahrami	onbld_elfmod_vertype.pm
6775ce41a5SAli Bahrami
6875ce41a5SAli Bahrami
6996ccc8cbSesaxePYFILES= \
70cdf0c1d5Smjnelson	cddlchk \
71cdf0c1d5Smjnelson	copyrightchk \
72cdf0c1d5Smjnelson	hdrchk \
73cdf0c1d5Smjnelson	hg-active \
74bfed486aSAli Bahrami	mapfilechk \
75ead1f93eSLiane Praza	validate_pkg \
7696ccc8cbSesaxe	wsdiff
7796ccc8cbSesaxe
787c478bd9Sstevel@tonic-gateMAN1FILES= \
797c478bd9Sstevel@tonic-gate	Install.1 \
807c478bd9Sstevel@tonic-gate	bldenv.1 \
81733ed737Ssommerfe	bringovercheck.1 \
821f1defa1Salanbur	cddlchk.1 \
837c478bd9Sstevel@tonic-gate	checkpaths.1 \
847c478bd9Sstevel@tonic-gate	check_rtime.1 \
857c478bd9Sstevel@tonic-gate	cstyle.1 \
8675ce41a5SAli Bahrami	find_elf.1 \
877c478bd9Sstevel@tonic-gate	flg.flp.1 \
88cdf0c1d5Smjnelson	hdrchk.1 \
8975ce41a5SAli Bahrami	interface_check.1 \
9075ce41a5SAli Bahrami	interface_cmp.1 \
91cdf0c1d5Smjnelson	hgsetup.1 \
9278fe7221Sdduvall	jstyle.1 \
93bfed486aSAli Bahrami	mapfilechk.1 \
947c478bd9Sstevel@tonic-gate	nightly.1 \
95ead1f93eSLiane Praza	onu.1 \
96733ed737Ssommerfe	sccscheck.1 \
977c478bd9Sstevel@tonic-gate	webrev.1 \
98cdf0c1d5Smjnelson	which_scm.1 \
997c478bd9Sstevel@tonic-gate	ws.1 \
10096ccc8cbSesaxe	wsdiff.1 \
1017c478bd9Sstevel@tonic-gate	xref.1
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gateMAKEFILES= \
1047c478bd9Sstevel@tonic-gate	xref.mk
1057c478bd9Sstevel@tonic-gate
10693af10a4SMark J. NelsonETCFILES= \
1070fd2682eSMark J. Nelson	hgstyle \
1080fd2682eSMark J. Nelson	its.conf \
1090fd2682eSMark J. Nelson	its.reg
11093af10a4SMark J. Nelson
11175ce41a5SAli BahramiEXCEPTFILES= \
11275ce41a5SAli Bahrami	check_rtime \
11375ce41a5SAli Bahrami	interface_check \
11475ce41a5SAli Bahrami	interface_cmp
11575ce41a5SAli Bahrami
116cdf0c1d5SmjnelsonCLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gateinclude ../Makefile.tools
1197c478bd9Sstevel@tonic-gate
12093af10a4SMark J. Nelson
12193af10a4SMark J. Nelson$(ROOTONBLDETCFILES)	:= FILEMODE=	644
12275ce41a5SAli Bahrami$(ROOTONBLDEXCEPTFILES)	:= FILEMODE=	644
12375ce41a5SAli Bahrami$(ROOTONBLDPERLMODULES)	:= FILEMODE=	644
1247c478bd9Sstevel@tonic-gate$(ROOTONBLDMAKEFILES)	:= FILEMODE=	644
12593af10a4SMark J. Nelson$(ROOTONBLDMAN1FILES)	:= FILEMODE=	644
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate.KEEP_STATE:
1287c478bd9Sstevel@tonic-gate
12975ce41a5SAli Bahramiall:	$(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
13075ce41a5SAli Bahrami	$(MAN1FILES) $(MAKEFILES)
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)	\
13375ce41a5SAli Bahrami		$(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES)	\
13475ce41a5SAli Bahrami		$(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES)	\
13575ce41a5SAli Bahrami		$(ROOTONBLDETCFILES) $(ROOTONBLDEXCEPTFILES)
1367c478bd9Sstevel@tonic-gate
1377c478bd9Sstevel@tonic-gateclean:
1387c478bd9Sstevel@tonic-gate	$(RM) $(CLEANFILES)
1397c478bd9Sstevel@tonic-gate
1401fe69678Skupferbldenv: bldenv.sh stdenv.sh
14163df1173Spetede	$(RM) "$@"
14263df1173Spetede	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
143*2f54b716SRichard Lowe	# Check for shell lint and fail if we hit warnings
14463df1173Spetede	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
14563df1173Spetede		[[ "$${shlintout}" != "" ]] && \
14663df1173Spetede		{ print -r -- "$${shlintout}" ;	false ; } || true
14763df1173Spetede	$(CHMOD) +x "$@"
14863df1173Spetede
14963df1173Spetedebldenv.1: bldenv
15063df1173Spetede	$(RM) "$@"
15163df1173Spetede	(set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
15263df1173Spetede	sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
1531fe69678Skupfer
1541fe69678Skupfernightly: nightly.sh stdenv.sh
15563df1173Spetede	$(RM) "$@"
1561fe69678Skupfer	sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
15763df1173Spetede	$(CHMOD) +x "$@"
1581fe69678Skupfer
1597c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1607c478bd9Sstevel@tonic-gate
161