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 
  26 SHELL=/usr/bin/ksh93
  27 
  28 SHFILES= \
  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 
  65 PERLFILES= \
  66         check_rtime \
  67         jstyle \
  68         mkreadme_osol \
  69         mktpl \
  70         validate_flg \
  71         validate_paths \
  72         wdiff
  73 
  74 PYFILES= \
  75         cddlchk \
  76         copyrightchk \
  77         git-active \
  78         hdrchk \
  79         hg-active \
  80         mapfilechk \
  81         rtichk \
  82         wsdiff
  83 
  84 MAN1FILES= \
  85         Install.1 \
  86         acr.1 \
  87         bldenv.1 \
  88         bringovercheck.1 \
  89         cddlchk.1 \
  90         checkpaths.1 \
  91         check_rtime.1 \
  92         cstyle.1 \
  93         flg.flp.1 \
  94         hdrchk.1 \
  95         hgsetup.1 \
  96         jstyle.1 \
  97         mapfilechk.1 \
  98         mkacr.1 \
  99         nightly.1 \
 100         sccscheck.1 \
 101         sccscp.1 \
 102         sccsmv.1 \
 103         sccsrm.1 \
 104         webrev.1 \
 105         which_scm.1 \
 106         ws.1 \
 107         wsdiff.1 \
 108         wx.1 \
 109         wx2hg.1 \
 110         xref.1
 111 
 112 MAKEFILES= \
 113         xref.mk
 114 
 115 ETCFILES= \
 116         hgstyle \
 117         its.conf \
 118         its.reg
 119 
 120 CLEANFILES = $(SHFILES) $(PERLFILES) $(PYFILES) bldenv.1
 121 
 122 include ../Makefile.tools
 123 
 124 OWNER=          root
 125 GROUP=          bin
 126 
 127 $(ROOTONBLDETCFILES)    := FILEMODE=    644
 128 $(ROOTONBLDMAKEFILES)   := FILEMODE=    644
 129 $(ROOTONBLDMAN1FILES)   := FILEMODE=    644
 130 
 131 .KEEP_STATE:
 132 
 133 all:    $(SHFILES) $(PERLFILES) $(PYFILES) $(MAN1FILES) $(MAKEFILES)
 134 
 135 install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)    \
 136                 $(ROOTONBLDPYFILES) $(ROOTONBLDMAN1FILES)       \
 137                 $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES)
 138 
 139 clean:
 140         $(RM) $(CLEANFILES)
 141 
 142 bldenv: bldenv.sh stdenv.sh
 143         $(RM) "$@"
 144         sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
 145         # Check for shell lint and fail if we hit warings
 146         shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
 147                 [[ "$${shlintout}" != "" ]] && \
 148                 { print -r -- "$${shlintout}" ; false ; } || true
 149         $(CHMOD) +x "$@" 
 150 
 151 bldenv.1: bldenv
 152         $(RM) "$@"
 153         (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
 154         sed 's/\.DS/.nf/g;s/\.DE/.fi/' > "$@"
 155 
 156 nightly: nightly.sh stdenv.sh
 157         $(RM) "$@"
 158         sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
 159         $(CHMOD) +x "$@" 
 160 
 161 include ../Makefile.targ
 162