Bug 1040641 - Ignore AC_SUBSTs for variables we don't have use for but that autoconf itself exports. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 23 Jul 2014 08:40:12 +0900
changeset 209944 4c8ac3427558194c4ec4c6c24d1cd9a099ca7bc2
parent 209943 44a3b35352e99d279787eaed8cdc2b67d0f9ca81
child 209945 b920a17bab70fffefba0aa0789c60d6503cd6cf0
push id6741
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:57:58 +0000
treeherdermozilla-aurora@aed50d3edf33 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1040641
milestone34.0a1
Bug 1040641 - Ignore AC_SUBSTs for variables we don't have use for but that autoconf itself exports. r=gps
accessible/interfaces/ia2/Makefile.in
accessible/interfaces/msaa/Makefile.in
browser/metro/shell/commandexecutehandler/Makefile.in
browser/metro/shell/linktool/Makefile.in
browser/metro/shell/testing/Makefile.in
build/autoconf/config.status.m4
dom/plugins/ipc/hangui/Makefile.in
testing/tools/screenshot/Makefile.in
toolkit/content/moz.build
tools/jprof/Makefile.in
--- a/accessible/interfaces/ia2/Makefile.in
+++ b/accessible/interfaces/ia2/Makefile.in
@@ -56,17 +56,17 @@ EMBED_MANIFEST_AT = 2
 
 INSTALL_TARGETS += midl
 midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES))
 midl_DEST = $(DIST)/include
 midl_TARGET := export
 
 include $(topsrcdir)/config/rules.mk
 
-OS_LIBS = $(call EXPAND_LIBNAME,uuid kernel32 rpcns4 rpcrt4 ole32 oleaut32)
+OS_LIBS += $(call EXPAND_LIBNAME,uuid kernel32 rpcns4 rpcrt4 ole32 oleaut32)
 
 # generate list of to-be-generated files that are missing
 # but ignore special file dlldata.c
 missing:=$(strip $(foreach onefile,$(strip $(subst dlldata.c,,$(MIDL_GENERATED_FILES))),$(if $(wildcard $(onefile)),,$(onefile))))
 
 missing_base:=$(sort $(basename $(subst _p.c,,$(subst _i.c,,$(missing)))))
 
 $(MIDL_GENERATED_FILES) : midl_done
--- a/accessible/interfaces/msaa/Makefile.in
+++ b/accessible/interfaces/msaa/Makefile.in
@@ -11,17 +11,17 @@ MIDL_GENERATED_FILES = \
 	ISimpleDOMDocument.h \
 	ISimpleDOMDocument_p.c \
 	ISimpleDOMDocument_i.c \
 	ISimpleDOMText.h \
 	ISimpleDOMText_p.c \
 	ISimpleDOMText_i.c \
 	$(NULL)
 
-OS_LIBS = $(call EXPAND_LIBNAME,kernel32 rpcns4 rpcrt4 oleaut32)
+OS_LIBS += $(call EXPAND_LIBNAME,kernel32 rpcns4 rpcrt4 oleaut32)
 
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: ISimpleDOMNode.idl \
           ISimpleDOMDocument.idl \
           ISimpleDOMText.idl
 
 	$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/ISimpleDOMNode.idl
--- a/browser/metro/shell/commandexecutehandler/Makefile.in
+++ b/browser/metro/shell/commandexecutehandler/Makefile.in
@@ -5,17 +5,17 @@
 include $(topsrcdir)/config/config.mk
 
 DIST_PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)
 
 # Don't link against mozglue.dll
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 
-OS_LIBS = \
+OS_LIBS += \
 	kernel32.lib \
 	user32.lib \
 	ole32.lib \
 	shlwapi.lib \
 	propsys.lib \
 	advapi32.lib \
 	wininet.lib \
 	$(NULL)
--- a/browser/metro/shell/linktool/Makefile.in
+++ b/browser/metro/shell/linktool/Makefile.in
@@ -1,14 +1,14 @@
 # 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 http://mozilla.org/MPL/2.0/.
 
 include $(topsrcdir)/config/config.mk
 
-OS_LIBS = \
+OS_LIBS += \
 	kernel32.lib \
 	user32.lib \
 	ole32.lib \
 	shlwapi.lib \
 	shell32.lib \
 	propsys.lib \
 	$(NULL)
--- a/browser/metro/shell/testing/Makefile.in
+++ b/browser/metro/shell/testing/Makefile.in
@@ -3,16 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # don't use moz glue libs
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 
 include $(topsrcdir)/config/config.mk
 
-OS_LIBS = \
+OS_LIBS += \
 	kernel32.lib \
 	user32.lib \
 	ole32.lib \
 	shlwapi.lib \
 	propsys.lib \
 	advapi32.lib \
 	$(NULL)
--- a/build/autoconf/config.status.m4
+++ b/build/autoconf/config.status.m4
@@ -40,16 +40,26 @@ define([AC_SUBST_LIST],
 [ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_LIST on the same variable ($1)])],
 [ifdef([AC_SUBST_LIST_$1], ,
 [define([AC_SUBST_LIST_$1], )dnl
 AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl
     (''' $1 ''', list(r''' [$]$1 '''.split()))
 AC_DIVERT_POP()dnl
 ])])])])
 
+dnl Ignore AC_SUBSTs for variables we don't have use for but that autoconf
+dnl itself exports.
+define([AC_SUBST_CFLAGS], )
+define([AC_SUBST_CPPFLAGS], )
+define([AC_SUBST_CXXFLAGS], )
+define([AC_SUBST_FFLAGS], )
+define([AC_SUBST_DEFS], )
+define([AC_SUBST_LDFLAGS], )
+define([AC_SUBST_LIBS], )
+
 dnl Wrap AC_DEFINE to store values in a format suitable for python.
 dnl autoconf's AC_DEFINE still needs to be used to fill confdefs.h,
 dnl which is #included during some compile checks.
 dnl The necessary comma after the tuple can't be put here because it
 dnl can mess around with things like:
 dnl    AC_SOMETHING(foo,AC_DEFINE(),bar)
 define([_MOZ_AC_DEFINE], defn([AC_DEFINE]))
 define([AC_DEFINE],
--- a/dom/plugins/ipc/hangui/Makefile.in
+++ b/dom/plugins/ipc/hangui/Makefile.in
@@ -1,9 +1,9 @@
 # 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 http://mozilla.org/MPL/2.0/.
 
-OS_LIBS = $(call EXPAND_LIBNAME,comctl32)
+OS_LIBS += $(call EXPAND_LIBNAME,comctl32)
 
 MOZ_GLUE_LDFLAGS =
 
 include $(topsrcdir)/config/rules.mk
--- a/testing/tools/screenshot/Makefile.in
+++ b/testing/tools/screenshot/Makefile.in
@@ -1,17 +1,17 @@
 # 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 http://mozilla.org/MPL/2.0/.
 
 ifdef MOZ_WIDGET_GTK
 ifdef MOZ_X11
 
 LOCAL_INCLUDES = $(TK_CFLAGS)
-OS_LIBS = $(TK_LIBS) $(XSS_LIBS)
+OS_LIBS += $(TK_LIBS) $(XSS_LIBS)
 
 endif # X11
 endif # GTK
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 
 OS_LIBS += $(call EXPAND_LIBNAME,gdiplus)
 MOZ_GLUE_PROGRAM_LDFLAGS =
--- a/toolkit/content/moz.build
+++ b/toolkit/content/moz.build
@@ -1,19 +1,21 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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 http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
-for var in ('target', 'ac_configure_args', 'CC', 'CC_VERSION', 'CFLAGS',
+for var in ('target', 'ac_configure_args', 'CC', 'CC_VERSION',
             'CXX', 'CXX_VERSION'):
     DEFINES[var] = CONFIG[var]
 
+DEFINES['CFLAGS'] = CONFIG['OS_CFLAGS']
+
 if CONFIG['OS_TARGET'] == 'Android':
     DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
 
 if 'stlport' in CONFIG['STLPORT_LIBS']:
     DEFINES['USE_STLPORT'] = True
 
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
+JAR_MANIFESTS += ['jar.mn']
--- a/tools/jprof/Makefile.in
+++ b/tools/jprof/Makefile.in
@@ -1,12 +1,12 @@
 #! gmake
 #
 # 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 http://mozilla.org/MPL/2.0/.
 
-OS_LIBS = \
+OS_LIBS += \
 	-ldl \
 	-lbfd \
 	-liberty \
 	$(NULL)