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 26 SHELL=/usr/bin/ksh93 27 28 SHFILES= \ 29 Install \ 30 bindrop \ 31 bldenv \ 32 build_cscope \ 33 bringovercheck \ 34 checkpaths \ 35 checkproto \ 36 cstyle \ 37 elfcmp \ 38 flg.flp \ 39 genoffsets \ 40 hgsetup \ 41 nightly \ 42 onu \ 43 protocmp.terse \ 44 sccscheck \ 45 webrev \ 46 which_scm \ 47 ws \ 48 xref 49 50 PERLFILES= \ 51 check_rtime \ 52 find_elf \ 53 interface_check \ 54 interface_cmp \ 55 jstyle \ 56 mkreadme_osol \ 57 mktpl \ 58 validate_flg \ 59 validate_paths \ 60 wdiff 61 62 PERLMODULES= \ 63 onbld_elfmod.pm \ 64 onbld_elfmod_vertype.pm 65 66 67 PYFILES= \ 68 cddlchk \ 69 copyrightchk \ 70 git-pbchk \ 71 hdrchk \ 72 hg-active \ 73 mapfilechk \ 74 validate_pkg \ 75 wsdiff 76 77 SCRIPTLINKS= \ 78 git-nits 79 80 MAN1FILES= \ 81 Install.1 \ 82 bldenv.1 \ 83 bringovercheck.1 \ 84 cddlchk.1 \ 85 checkpaths.1 \ 86 check_rtime.1 \ 87 cstyle.1 \ 88 find_elf.1 \ 89 flg.flp.1 \ 90 git-pbchk.1 \ 91 hdrchk.1 \ 92 interface_check.1 \ 93 interface_cmp.1 \ 94 hgsetup.1 \ 95 jstyle.1 \ 96 mapfilechk.1 \ 97 nightly.1 \ 98 onu.1 \ 99 sccscheck.1 \ 100 webrev.1 \ 101 which_scm.1 \ 102 ws.1 \ 103 wsdiff.1 \ 104 xref.1 105 106 MAN1LINKS= \ 107 git-nits.1 108 109 MAKEFILES= \ 110 xref.mk 111 112 ETCFILES= \ 113 hgstyle \ 114 its.conf \ 115 its.reg 116 117 EXCEPTFILES= \ 118 check_rtime \ 119 interface_check \ 120 interface_cmp 121 122 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1 123 124 include ../Makefile.tools 125 126 ROOTONBLDSCRIPTLINKS = $(SCRIPTLINKS:%=$(ROOTONBLDBIN)/%) 127 ROOTONBLDMAN1LINKS = $(MAN1LINKS:%=$(ROOTONBLDMAN1)/%) 128 129 $(ROOTONBLDETCFILES) := FILEMODE= 644 130 $(ROOTONBLDEXCEPTFILES) := FILEMODE= 644 131 $(ROOTONBLDPERLMODULES) := FILEMODE= 644 132 $(ROOTONBLDMAKEFILES) := FILEMODE= 644 133 $(ROOTONBLDMAN1FILES) := FILEMODE= 644 134 135 .KEEP_STATE: 136 137 all: $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \ 138 $(MAN1FILES) $(MAKEFILES) 139 140 $(ROOTONBLDBIN)/git-nits: 141 $(RM) $(ROOTONBLDBIN)/git-nits 142 $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits 143 144 $(ROOTONBLDMAN1)/git-nits.1: 145 $(RM) $(ROOTONBLDMAN1)/git-nits.1 146 $(SYMLINK) git-pbchk.1 $(ROOTONBLDMAN1)/git-nits.1 147 148 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES) \ 149 $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES) \ 150 $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1FILES) \ 151 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES) \ 152 $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1LINKS) 153 154 clean: 155 $(RM) $(CLEANFILES) 156 157 bldenv: bldenv.sh stdenv.sh 158 $(RM) "$@" 159 sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@" 160 # Check for shell lint and fail if we hit warnings 161 shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \ 162 [[ "$${shlintout}" != "" ]] && \ 163 { print -r -- "$${shlintout}" ; false ; } || true 164 $(CHMOD) +x "$@" 165 166 bldenv.1: bldenv 167 $(RM) "$@" 168 (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \ 169 sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@" 170 171 nightly: nightly.sh stdenv.sh 172 $(RM) "$@" 173 sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly 174 $(CHMOD) +x "$@" 175 176 include ../Makefile.targ 177