Skip to content

Commit

Permalink
make-asm-offsets: fix sed script
Browse files Browse the repository at this point in the history
When copying the "sed" script to generate the asm-offsets.h file from
the Linux Kbuild script into the make-asm-offsets file I missed the
fact that the former runs in a "make" context and thus uses double
"$$" to escape a single "$", while the latter is a shell script, where
this must not be done.  Unfortunately the problem did not show up
during the initial tests on Power Architecture systems, but on ARM the
generated asm-offsets.h was not correct.

Signed-off-by: Wolfgang Denk <[email protected]>
Tested-by: Heiko Schocher <[email protected]>
Tested-by: Ben Gardiner <[email protected]>
  • Loading branch information
wdenx committed Oct 27, 2010
1 parent f503d52 commit e4691f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/scripts/make-asm-offsets
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mkdir -p $(dirname $2)

# Default sed regexp - multiline due to syntax constraints
SED_CMD="/^->/{s:->#\(.*\):/* \1 */:; \
s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \
s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \
s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:->::; p;}"

(set -e
Expand Down

0 comments on commit e4691f5

Please sign in to comment.