diff options
| author | Chris Bieneman <beanz@apple.com> | 2017-07-25 20:30:58 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2017-07-25 20:30:58 +0000 |
| commit | 7f47b85c52e6cd379b7924f42c5f3a93e7c1bdaf (patch) | |
| tree | f544323d806af772f3afba7e287fad9837930a68 /lldb/scripts/framework-header-fix.sh | |
| parent | 4a1db1b0379412ffa0da4b98a231abc71e2f79e9 (diff) | |
| download | bcm5719-llvm-7f47b85c52e6cd379b7924f42c5f3a93e7c1bdaf.tar.gz bcm5719-llvm-7f47b85c52e6cd379b7924f42c5f3a93e7c1bdaf.zip | |
[CMake] Rework construction of framework bundle
This adds an explicit step for processing the headers and restructures how the framework bundles are constructed. This should make the frameworks more reliably constructed.
llvm-svn: 309024
Diffstat (limited to 'lldb/scripts/framework-header-fix.sh')
| -rwxr-xr-x | lldb/scripts/framework-header-fix.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/scripts/framework-header-fix.sh b/lldb/scripts/framework-header-fix.sh new file mode 100755 index 00000000000..c09d1458ff8 --- /dev/null +++ b/lldb/scripts/framework-header-fix.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Usage: framework-header-fix.sh <source header dir> <LLDB Version> +for file in `find $1 -name "*.h"` +do + sed -i '' 's/\(#include\)[ ]*"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$file" + sed -i '' 's|<LLDB/Utility|<LLDB|' "$file" + LLDB_VERSION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\1/g'` + LLDB_REVISION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\3/g'` + LLDB_VERSION_STRING=`echo $2` + sed -i '' "s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |" "$file" + sed -i '' "s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |" "$file" + sed -i '' "s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \"$LLDB_VERSION_STRING\" |" "$file" +done |

