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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 23# 24# Copyright 2010, Richard Lowe 25 26SHELL=/usr/bin/ksh93 27 28SHFILES= \ 29 Install \ 30 bindrop \ 31 bldenv \ 32 build_cscope \ 33 bringovercheck \ 34 checkpaths \ 35 checkproto \ 36 cryptodrop \ 37 cstyle \ 38 elfcmp \ 39 flg.flp \ 40 genoffsets \ 41 hgsetup \ 42 nightly \ 43 onu \ 44 protocmp.terse \ 45 sccscheck \ 46 webrev \ 47 which_scm \ 48 ws \ 49 xref 50 51PERLFILES= \ 52 check_rtime \ 53 find_elf \ 54 interface_check \ 55 interface_cmp \ 56 jstyle \ 57 mkreadme_osol \ 58 mktpl \ 59 validate_flg \ 60 validate_paths \ 61 wdiff 62 63PERLMODULES= \ 64 onbld_elfmod.pm \ 65 onbld_elfmod_vertype.pm 66 67 68PYFILES= \ 69 cddlchk \ 70 copyrightchk \ 71 hdrchk \ 72 hg-active \ 73 mapfilechk \ 74 validate_pkg \ 75 wsdiff 76 77MAN1FILES= \ 78 Install.1 \ 79 bldenv.1 \ 80 bringovercheck.1 \ 81 cddlchk.1 \ 82 checkpaths.1 \ 83 check_rtime.1 \ 84 cstyle.1 \ 85 find_elf.1 \ 86 flg.flp.1 \ 87 hdrchk.1 \ 88 interface_check.1 \ 89 interface_cmp.1 \ 90 hgsetup.1 \ 91 jstyle.1 \ 92 mapfilechk.1 \ 93 nightly.1 \ 94 onu.1 \ 95 sccscheck.1 \ 96 webrev.1 \ 97 which_scm.1 \ 98 ws.1 \ 99 wsdiff.1 \ 100 xref.1 101 102MAKEFILES= \ 103 xref.mk 104 105ETCFILES= \ 106 hgstyle \ 107 its.conf \ 108 its.reg 109 110EXCEPTFILES= \ 111 check_rtime \ 112 interface_check \ 113 interface_cmp 114 115CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1 116 117include ../Makefile.tools 118 119 120$(ROOTONBLDETCFILES) := FILEMODE= 644 121$(ROOTONBLDEXCEPTFILES) := FILEMODE= 644 122$(ROOTONBLDPERLMODULES) := FILEMODE= 644 123$(ROOTONBLDMAKEFILES) := FILEMODE= 644 124$(ROOTONBLDMAN1FILES) := FILEMODE= 644 125 126.KEEP_STATE: 127 128all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \ 129 $(MAN1FILES) $(MAKEFILES) 130 131install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \ 132 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \ 133 $(ROOTONBLDMAN1FILES) $(ROOTONBLDMAKEFILES) \ 134 $(ROOTONBLDETCFILES) $(ROOTONBLDEXCEPTFILES) 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 warnings 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