/^if CONFIG\[\"OS_TARGET\"\] == \"Android\":/{ flag = 1; print $0; next; } /^if CONFIG\[\"OS_TARGET\"\] == \"Linux\":/{ flag = 0; sub(/^if CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\":"); print $0; next; } /^Library\(/{ print "if CONFIG\[\"CPU_ARCH\"\] == \"x86\":" print " CFLAGS += \[" print " \"-msse2\"" print " \]\n" print " CXXFLAGS += \[" print " \"-msse2\"" print " \]\n" } { if (flag != 1) { sub(/^ DEFINES\[\"WEBRTC_LINUX\"\] = True/, " if CONFIG\[\"OS_TARGET\"\] == \"Linux\":\n DEFINES\[\"WEBRTC_LINUX\"\] = True\n else:\n DEFINES\[\"WEBRTC_BSD\"\] = True"); sub(/^if not CONFIG\[\"MOZ_DEBUG\"\] and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if not CONFIG[\"MOZ_DEBUG\"] and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):"); sub(/^if CONFIG\[\"MOZ_DEBUG\"\] == \"1\" and CONFIG\[\"OS_TARGET\"\] == \"Linux\":/, "if CONFIG[\"MOZ_DEBUG\"] == \"1\" and (CONFIG[\"OS_TARGET\"] == \"Linux\" or CONFIG[\"OS_TARGET\"] == \"NetBSD\" or CONFIG[\"OS_TARGET\"] == \"OpenBSD\" or CONFIG[\"OS_TARGET\"] == \"FreeBSD\"):"); } print $0; }