| Last change
 on this file since 955 was             206, checked in by Herwig Bauernfeind, 16 years ago | 
        
          | 
Import Samba 3.3 branch at 3.0.0 level (psmedley's port)
 | 
        
          | File size:
            794 bytes | 
      
      
| Line |  | 
|---|
| 1 | #! /bin/sh | 
|---|
| 2 |  | 
|---|
| 3 | # | 
|---|
| 4 | # mksyms.sh | 
|---|
| 5 | # | 
|---|
| 6 | # Extract symbols to export from C-header files. | 
|---|
| 7 | # output in version-script format for linking shared libraries. | 
|---|
| 8 | # | 
|---|
| 9 | # This is the shell warpper for the mksyms.awk core script. | 
|---|
| 10 | # | 
|---|
| 11 | # Copyright (C) 2008 Micheal Adam <obnox@samba.org> | 
|---|
| 12 | # | 
|---|
| 13 |  | 
|---|
| 14 | LANG=C; export LANG | 
|---|
| 15 | LC_ALL=C; export LC_ALL | 
|---|
| 16 | LC_COLLATE=C; export LC_COLLATE | 
|---|
| 17 |  | 
|---|
| 18 | if [ $# -lt 2 ] | 
|---|
| 19 | then | 
|---|
| 20 | echo "Usage: $0 awk output_file header_files" | 
|---|
| 21 | exit 1 | 
|---|
| 22 | fi | 
|---|
| 23 |  | 
|---|
| 24 | awk="$1" | 
|---|
| 25 | shift | 
|---|
| 26 |  | 
|---|
| 27 | symsfile="$1" | 
|---|
| 28 | shift | 
|---|
| 29 | symsfile_tmp="$symsfile.$$.tmp~" | 
|---|
| 30 |  | 
|---|
| 31 | proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `" | 
|---|
| 32 |  | 
|---|
| 33 | echo creating $symsfile | 
|---|
| 34 |  | 
|---|
| 35 | mkdir -p `dirname $symsfile` | 
|---|
| 36 |  | 
|---|
| 37 | ${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp | 
|---|
| 38 |  | 
|---|
| 39 | if cmp -s $symsfile $symsfile_tmp 2>/dev/null | 
|---|
| 40 | then | 
|---|
| 41 | echo "$symsfile unchanged" | 
|---|
| 42 | rm $symsfile_tmp | 
|---|
| 43 | else | 
|---|
| 44 | mv $symsfile_tmp $symsfile | 
|---|
| 45 | fi | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.