3 ## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
5 ## Use of this source code is governed by a BSD-style license and patent
6 ## grant that can be found in the LICENSE file in the root of the source
7 ## tree. All contributing project authors may be found in the AUTHORS
8 ## file in the root of the source tree.
13 self_basename
=${self##*/}
18 Usage: ${self_basename} [options] file1 [file2 ...]
20 This script generates a MSVC module definition file containing a list of symbols
21 to export from a DLL. Source files are technically bash scripts (and thus may
22 use #comment syntax) but in general, take the form of a list of symbols:
24 <kind> symbol1 [symbol2, symbol3, ...]
26 where <kind> is either 'text' or 'data'
30 --help Print this message
31 --out=filename Write output to a file [stdout]
32 --name=project_name Name of the library (required)
38 echo "${self_basename}: $@"
43 echo "Unknown option \"$1\"."
44 echo "See ${self_basename} --help for available options."
50 echo " $sym" >> ${outfile}
56 printf " %-40s DATA\n" "$sym" >> ${outfile}
60 # Process command line
66 --out=*) outfile
="$optval"
68 --name=*) name
="${optval}"
72 *) file_list
[${#file_list[@]}]="$opt"
75 outfile
=${outfile:-/dev/stdout}
76 [ -n "$name" ] || die
"Library name (--name) must be specified!"
78 echo "LIBRARY ${name}" > ${outfile}
79 echo "EXPORTS" >> ${outfile}
80 for f
in "${file_list[@]}"; do