diff options
author | Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> | 2014-05-21 23:23:22 -0300 |
---|---|---|
committer | Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> | 2014-05-21 23:23:22 -0300 |
commit | 9a520594a0f773429a321b036f38851cbce4af12 (patch) | |
tree | 55470bdb70fb419225b9b9db1a556b5d508e0076 | |
parent | b91c243f8923835f34af888470397a866eb244ae (diff) | |
download | qtdeclarative-9a520594a0f773429a321b036f38851cbce4af12.tar.gz |
Allow the maaintainer to write the symbols file.
-rwxr-xr-x | debian/mark_private_symbols.sh | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/debian/mark_private_symbols.sh b/debian/mark_private_symbols.sh index 14eeecd..b7295dd 100755 --- a/debian/mark_private_symbols.sh +++ b/debian/mark_private_symbols.sh @@ -20,6 +20,10 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# Usage: +# Define DEBUG to see which symbols is being processed. +# Define WRITERESULTS to actually mark the real symbols files. + PRIVATE_HEADERS=debian/qtdeclarative5-private-dev/usr/include error() { @@ -36,11 +40,13 @@ then error "Private headers not found" fi -# Create a backup copy of the original symbols file. -for symbols_file in `ls debian/*.symbols` -do - cp $symbols_file $symbols_file.mps -done +if [ -n "${WRITERESULTS}" ] + # Create a backup copy of the original symbols file. + for symbols_file in `ls debian/*.symbols` + do + cp $symbols_file $symbols_file.mps + done +fi grep -rh class ${PRIVATE_HEADERS} | grep EXPORT | @@ -51,11 +57,17 @@ grep -rh class ${PRIVATE_HEADERS} | while read privateclass do debug marking ${privateclass} as private - sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" debian/*.symbols.mps + if [ -n "${WRITERESULTS}" ] + sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" debian/*.symbol + else + sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" debian/*.symbols.mps + fi done -# Diff the symbols files and output it's differences. -for symbols_file in `ls debian/*.symbols` -do - diff -Nau $symbols_file $symbols_file.mps -done +if [ -n "${WRITERESULTS}" ] + # Diff the symbols files and output it's differences. + for symbols_file in `ls debian/*.symbols` + do + diff -Nau $symbols_file $symbols_file.mps + done +fi |