dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / uts / intel / io / acpica / cmp_ca.sh
blob521cc9eb9b1e0319957e1b0fbf4a88451fb2ed76
1 #!/bin/ksh -p
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
29 # Set this to the fully-qualified path to the ACPI CA GIT directory
31 ACDIR=/tmp/acpica-unix-20091112
33 ACSRC=$ACDIR
34 ACINC=$ACDIR/include
36 DIFF="diff -w"
38 WSDIR="$SRCTOP"
39 [ -z "$WSDIR" ] || { echo "$0: error: SRCTOP not set in env" >&2; exit 1; }
41 WSSRC=usr/src/uts/intel/io/acpica
42 WSHDR=arch/x86/include/sys/acpi
43 ACFILES=/tmp/$$.acfiles
44 SRCDIRS="debugger \
45 disassembler \
46 dispatcher \
47 events \
48 executer \
49 hardware \
50 namespace \
51 parser \
52 resources \
53 tables \
54 utilities"
59 cd $ACSRC ; find $SRCDIRS -type f > $ACFILES ; cd -
60 for i in `<$ACFILES`
62 if [[ ! -a $WSDIR/$WSSRC/$i ]]
63 then
64 SRCNEW=$SRCNEW\ $i
65 else
66 if (! $DIFF $WSDIR/$WSSRC/$i $ACSRC/$i > /dev/null )
67 then
68 SRCCHG=$SRCCHG\ $i
71 done
76 cd $ACINC ; find . -type f > $ACFILES ; cd -
77 for i in `<$ACFILES`
79 if [[ ! -a $WSDIR/$WSHDR/$i ]]
80 then
81 HDRNEW=$HDRNEW\ $i
82 else
83 if (! $DIFF $WSDIR/$WSHDR/$i $ACINC/$i > /dev/null )
84 then
85 HDRCHG=$HDRCHG\ $i
88 done
90 cd $WSDIR
91 for i in $SRCCHG
93 targ=$WSSRC/$i
94 cp $ACSRC/$i $targ
95 done
97 for i in $SRCNEW
99 targ=$WSSRC/$i
100 cp $ACSRC/$i $targ
101 chmod +w $targ
102 hg add $targ
103 done
105 for i in $HDRCHG
107 targ=$WSHDR/$i
108 cp $ACINC/$i $targ
109 done
111 for i in $HDRNEW
113 targ=$WSHDR/$i
114 cp $ACINC/$i $targ
115 chmod +w $targ
116 hg add $targ
117 done
119 if (! $DIFF $WSDIR/$WSSRC/changes.txt $ACDIR/changes.txt > /dev/null )
120 then
121 targ=$WSSRC/changes.txt
122 cp $ACDIR/changes.txt $targ
124 cd -
126 echo New source files:
127 echo $SRCNEW
128 echo New header files:
129 echo $HDRNEW