diff --git a/configure.in b/configure.in index 23311b3424c7..130ecf15cd74 100644 --- a/configure.in +++ b/configure.in @@ -8865,7 +8865,7 @@ fi if test -n "$MOZ_WEBRTC"; then AC_MSG_RESULT("generating WebRTC Makefiles...") - WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi" + WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" diff --git a/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py b/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py index 3ed8d5621957..338d0b767239 100644 --- a/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +++ b/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py @@ -440,10 +440,20 @@ def GenerateOutput(target_list, target_dicts, data, params): swapslashes(top), swapslashes(src), swapslashes(relative_srcdir)) - scriptname = topsrcdir_path(__file__) + scriptname = "$(topsrcdir)/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py" # Reassemble a commandline from parts so that all the paths are correct + # NOTE: this MUST match the commandline generated in configure.in! + # since we don't see --include statements, duplicate them in FORCE_INCLUDE_FILE lines + # Being in a define, they also get used by the common.mk invocation of gyp so they + # they don't disappear in the second round of tail-swallowing + forced_includes = "" + for option in options.defines: + if option[:20] == "FORCED_INCLUDE_FILE=": + forced_includes += "--include=%s" % option[20:] + commandline = [topsrcdir_path(sys.argv[0]), "--format=mozmake", + forced_includes, "--depth=%s" % topsrcdir_path(options.depth), "--generator-output=%s" % objdir_path(options.generator_output), "--toplevel-dir=$(topsrcdir)",