author Karl Tomlinson <>
Wed, 02 Jul 2014 20:22:45 +1200
changeset 192471 0f1cea1a1a952c84d2a5758dbf9efc3ee6fe5dfc
parent 175340 060c0e5237701329bfeb07f012de7cf3c3be720c
permissions -rw-r--r--
b=1033140 make speex_resampler declarations consistent with OUTSIDE_SPEEX implementation r=padenot Instead of defining OUTSIDE_SPEEX and RANDOM_PREFIX everywhere speex_resampler.h is included, it is easier to patch the header. Symbol names in gkmedias symbols.def are updated now that RANDOM_PREFIX is taking effect, and unused symbols are no longer exported.

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

import os
import sys

if len(sys.argv) != 5:
    print >> sys.stderr, "Usage: " \
                         "<topsrcdir> <source directory> <target directory> <isb2g>"

topsrcdir = sys.argv[1]
source_dir = sys.argv[2]
target_dir = sys.argv[3]
isB2G = int(sys.argv[4])

print """
DEPTH     = ..
topsrcdir = %(topsrcdir)s
srcdir    = %(topsrcdir)s/addon-sdk
VPATH     = %(topsrcdir)s/addon-sdk

include $(topsrcdir)/config/
""" % {'topsrcdir': topsrcdir}

real_source = source_dir.replace('/', os.sep)
if not os.path.exists(real_source):
    print >> sys.stderr, "Error: Missing source file %s" % real_source
elif not os.path.isdir(real_source):
    print >> sys.stderr, "Error: Source %s is not a directory" % real_source
for dirpath, dirnames, filenames in os.walk(real_source):
    if not filenames:
    dirpath = dirpath.replace(os.sep, '/')
    relative = dirpath[len(source_dir):]
    if isB2G and relative in [
    varname = "COMMONJS%s" % relative.replace('/', '_')
    print "%s_FILES = \\" % varname
    for name in filenames:
        print "  %s/%s \\" % (dirpath, name)
    print "  $(NULL)"
    print "%s_DEST = %s%s" % (varname, target_dir, relative)
    print "INSTALL_TARGETS += %s\n" % varname

print "include $(topsrcdir)/config/"