3 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
5 ## Use of this source code is governed by a BSD-style license
6 ## that can be found in the LICENSE file in the root of the source
7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree.
14 self_basename
=${self##*/}
19 Usage: ${self_basename} [options] file1 [file2 ...]
21 This script generates a MSVC module definition file containing a list of symbols
22 to export from a DLL. Source files are technically bash scripts (and thus may
23 use #comment syntax) but in general, take the form of a list of symbols:
25 <kind> symbol1 [symbol2, symbol3, ...]
27 where <kind> is either 'text' or 'data'
31 --help Print this message
32 --out=filename Write output to a file [stdout]
33 --name=project_name Name of the library (required)
39 echo "${self_basename}: $@"
44 echo "Unknown option \"$1\"."
45 echo "See ${self_basename} --help for available options."
51 echo " $sym" >> ${outfile}
57 printf " %-40s DATA\n" "$sym" >> ${outfile}
61 # Process command line
67 --out=*) outfile
="$optval"
69 --name=*) name
="${optval}"
73 *) file_list
[${#file_list[@]}]="$opt"
76 outfile
=${outfile:-/dev/stdout}
77 [ -n "$name" ] || die
"Library name (--name) must be specified!"
79 echo "LIBRARY ${name}" > ${outfile}
80 echo "EXPORTS" >> ${outfile}
81 for f
in "${file_list[@]}"; do