annotate make/linux/adlc_updater @ 10405:f2110083203d

8005849: JEP 167: Event-Based JVM Tracing Reviewed-by: acorn, coleenp, sla Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author sla
date Mon, 10 Jun 2013 11:30:51 +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 )