annotate make/solaris/adlc_updater @ 3915:c2bf0120ee5d

7085906: Replace the permgen allocated sentinelRef with a self-looped end Summary: Remove the sentinelRef and let the last Reference in a discovered chain point back to itself. Reviewed-by: ysr, jmasa
author stefank
date Thu, 01 Sep 2011 16:18:17 +0200
parents a50abfc67f31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #! /bin/sh
a61af66fc99e Initial load
duke
parents:
diff changeset
2 #
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # This file is used by adlc.make to selectively update generated
a61af66fc99e Initial load
duke
parents:
diff changeset
4 # adlc files. Because source and target diretories are relative
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # paths, this file is copied to the target build directory before
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # use.
a61af66fc99e Initial load
duke
parents:
diff changeset
7 #
a61af66fc99e Initial load
duke
parents:
diff changeset
8 # adlc-updater <file> <source-dir> <target-dir>
a61af66fc99e Initial load
duke
parents:
diff changeset
9 #
475
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
10 fix_lines() {
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
11 # repair bare #line directives in $1 to refer to $2
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
12 awk < $1 > $1+ '
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
13 /^#line 999999$/ {print "#line " (NR+1) " \"" F2 "\""; next}
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
14 {print}
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
15 ' F2=$2
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
16 mv $1+ $1
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
17 }
1831
a50abfc67f31 6989736: fix mapfile warnings on solaris
never
parents: 475
diff changeset
18 fix_lines $2/$1 $3/$1
a50abfc67f31 6989736: fix mapfile warnings on solaris
never
parents: 475
diff changeset
19 [ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \
475
284d0af00d53 6771309: debugging AD files is difficult without #line directives in generated code
jrose
parents: 91
diff changeset
20 ( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 )