1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25 26SHELL=/usr/bin/ksh93 27 28SHFILES= \ 29 Install \ 30 acr \ 31 bfu \ 32 bfudrop \ 33 bindrop \ 34 bldenv \ 35 build_cscope \ 36 bringovercheck \ 37 checkpaths \ 38 checkproto \ 39 cstyle \ 40 elfcmp \ 41 flg.flp \ 42 genoffsets \ 43 hgsetup \ 44 keywords \ 45 makebfu \ 46 mkacr \ 47 mkbfu \ 48 mkclosed \ 49 nightly \ 50 onblddrop \ 51 protocmp.terse \ 52 sccscheck \ 53 sccscp \ 54 sccshist \ 55 sccsmv \ 56 sccsrm \ 57 sdrop \ 58 webrev \ 59 which_scm \ 60 ws \ 61 wx \ 62 wx2hg \ 63 xref 64 65PERLFILES= \ 66 check_rtime \ 67 jstyle \ 68 mkreadme_osol \ 69 mktpl \ 70 validate_flg \ 71 validate_paths \ 72 wdiff 73 74PYFILES= \ 75 cddlchk \ 76 copyrightchk \ 77 hdrchk \ 78 hg-active \ 79 mapfilechk \ 80 rtichk \ 81 wsdiff 82 83MAN1FILES= \ 84 Install.1 \ 85 acr.1 \ 86 bldenv.1 \ 87 bringovercheck.1 \ 88 cddlchk.1 \ 89 checkpaths.1 \ 90 check_rtime.1 \ 91 cstyle.1 \ 92 flg.flp.1 \ 93 hdrchk.1 \ 94 hgsetup.1 \ 95 jstyle.1 \ 96 mapfilechk.1 \ 97 mkacr.1 \ 98 nightly.1 \ 99 sccscheck.1 \ 100 sccscp.1 \ 101 sccsmv.1 \ 102 sccsrm.1 \ 103 webrev.1 \ 104 which_scm.1 \ 105 ws.1 \ 106 wsdiff.1 \ 107 wx.1 \ 108 wx2hg.1 \ 109 xref.1 110 111MAKEFILES= \ 112 xref.mk 113 114ETCFILES= \ 115 hgstyle 116 117CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1 118 119include ../Makefile.tools 120 121OWNER= root 122GROUP= bin 123 124$(ROOTONBLDETCFILES) := FILEMODE= 644 125$(ROOTONBLDMAKEFILES) := FILEMODE= 644 126$(ROOTONBLDMAN1FILES) := FILEMODE= 644 127 128.KEEP_STATE: 129 130all: $(SHFILES) $(PERLFILES) $(PYFILES) $(MAN1FILES) $(MAKEFILES) 131 132install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \ 133 $(ROOTONBLDPYFILES) $(ROOTONBLDMAN1FILES) \ 134 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) 135 136clean: 137 $(RM) $(CLEANFILES) 138 139bldenv: bldenv.sh stdenv.sh 140 $(RM) "$@" 141 sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@" 142 # Check for shell lint and fail if we hit warings 143 shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \ 144 [[ "$${shlintout}" != "" ]] && \ 145 { print -r -- "$${shlintout}" ; false ; } || true 146 $(CHMOD) +x "$@" 147 148bldenv.1: bldenv 149 $(RM) "$@" 150 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \ 151 sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@" 152 153nightly: nightly.sh stdenv.sh 154 $(RM) "$@" 155 sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly 156 $(CHMOD) +x "$@" 157 158include ../Makefile.targ 159 160