Bug 906342 - Move the remaining SIMPLE_PROGRAMS to moz.build and disallow setting SIMPLE_PROGRAMS in Makefiles; r=gps
authorMs2ger <ms2ger@gmail.com>
Thu, 22 Aug 2013 08:35:03 +0200
changeset 143757 00a7b07e259c08323e5362c43a26fe71597ff1ea
parent 143756 6be071a714b14b70389d070adef1a3c6d00c9512
child 143758 31ca6cd81bd75d17ab5218e36927c88f15d5f1ed
push id25137
push userMs2ger@gmail.com
push dateThu, 22 Aug 2013 06:58:17 +0000
treeherdermozilla-central@2ab07dec6404 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs906342
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906342 - Move the remaining SIMPLE_PROGRAMS to moz.build and disallow setting SIMPLE_PROGRAMS in Makefiles; r=gps
config/rules.mk
intl/uconv/tests/Makefile.in
intl/uconv/tests/moz.build
js/src/config/rules.mk
mozglue/tests/Makefile.in
mozglue/tests/moz.build
toolkit/mozapps/update/test/Makefile.in
toolkit/mozapps/update/test/moz.build
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -22,16 +22,17 @@ endif
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   MODULE \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
+  SIMPLE_PROGRAMS \
   TEST_DIRS \
   TIERS \
   TOOL_DIRS \
   XPCSHELL_TESTS \
   XPIDL_MODULE \
   $(NULL)
 
 _DEPRECATED_VARIABLES := \
--- a/intl/uconv/tests/Makefile.in
+++ b/intl/uconv/tests/Makefile.in
@@ -6,34 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-# Tests disabled because they dont work in libxul builds.
-#MOZILLA_INTERNAL_API = 1
-#
-#
-#CPPSRCS		= \
-#		TestUConv.cpp \
-#		nsconv.cpp \
-#		plattest.cpp \
-#		$(NULL)
-#
-#ifeq ($(OS_ARCH),WINNT)
-#CPPSRCS		+= convperf.cpp
-#endif
-#
-#SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX))
-
-relativesrcdir	= @relativesrcdir@
-
 MOCHITEST_FILES =	\
 		test_bug335816.html \
 		test_bug843434.html \
 		test_long_doc.html \
 		test_singlebyte_overconsumption.html \
 		test_unicode_noncharacterescapes.html \
 		test_unicode_noncharacters_gb18030.html \
 		test_unicode_noncharacters_utf8.html \
--- a/intl/uconv/tests/moz.build
+++ b/intl/uconv/tests/moz.build
@@ -2,8 +2,25 @@
 # 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/.
 
 MODULE = 'test_intl_uconv'
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# Tests disabled because they dont work in libxul builds.
+#MOZILLA_INTERNAL_API = True
+#
+#CPP_SOURCES += [
+#    'TestUConv.cpp',
+#    'nsconv.cpp',
+#    'plattest.cpp',
+#]
+#
+#if CONFIG['OS_ARCH'] == 'WINNT':
+#    CPP_SOURCES += [
+#        'convperf.cpp',
+#    ]
+#
+#SIMPLE_PROGRAMS += [source.replace('.cpp', CONFIG['BIN_SUFFIX']), CPP_SOURCES]
+
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -22,16 +22,17 @@ endif
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   MODULE \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
+  SIMPLE_PROGRAMS \
   TEST_DIRS \
   TIERS \
   TOOL_DIRS \
   XPCSHELL_TESTS \
   XPIDL_MODULE \
   $(NULL)
 
 _DEPRECATED_VARIABLES := \
--- a/mozglue/tests/Makefile.in
+++ b/mozglue/tests/Makefile.in
@@ -5,17 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_LINKER
-SIMPLE_PROGRAMS := TestZip$(BIN_SUFFIX)
 STL_FLAGS =
 
 LOCAL_INCLUDES += -I$(srcdir)/../linker
 # Only link against the linker, not mozglue
 MOZ_GLUE_PROGRAM_LDFLAGS =
 MOZ_GLUE_LDFLAGS =
 LIBS += $(call EXPAND_LIBNAME_PATH,linker,../linker)
 
--- a/mozglue/tests/moz.build
+++ b/mozglue/tests/moz.build
@@ -6,8 +6,11 @@
 
 NO_DIST_INSTALL = True
 
 if CONFIG['MOZ_LINKER']:
     CPP_SOURCES += [
         'TestZip.cpp',
         'ShowSSEConfig.cpp',
     ]
+    SIMPLE_PROGRAMS += [
+        'TestZip' + CONFIG['BIN_SUFFIX'],
+    ]
--- a/toolkit/mozapps/update/test/Makefile.in
+++ b/toolkit/mozapps/update/test/Makefile.in
@@ -21,25 +21,16 @@ DEFINES += \
   -DMOZ_DEBUG=$(MOZ_DEBUG) \
   $(NULL)
 
 ifdef MOZ_MAINTENANCE_SERVICE
 DEFINES += -DMOZ_MAINTENANCE_SERVICE=$(MOZ_MAINTENANCE_SERVICE)
 endif
 
 ifneq (android,$(MOZ_WIDGET_TOOLKIT))
-# TODO: Remove when SIMPLE_PROGRAMS is in moz.build
-cppsrcs = \
-  TestAUSReadStrings.cpp \
-  TestAUSHelper.cpp \
-  $(NULL)
-
-# TODO: Base off of CPP_SOURCES in moz.build
-SIMPLE_PROGRAMS = $(cppsrcs:.cpp=$(BIN_SUFFIX))
-
 INI_TEST_FILES = \
   TestAUSReadStrings1.ini \
   TestAUSReadStrings2.ini \
   TestAUSReadStrings3.ini \
   $(NULL)
 
 LOCAL_INCLUDES += \
   -I$(srcdir) \
--- a/toolkit/mozapps/update/test/moz.build
+++ b/toolkit/mozapps/update/test/moz.build
@@ -1,14 +1,24 @@
 # -*- 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/.
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     DIRS += ['chrome']
+
+    sources = [
+        'TestAUSHelper',
+        'TestAUSReadStrings',
+    ]
+
     CPP_SOURCES += [
-        'TestAUSReadStrings.cpp',
-        'TestAUSHelper.cpp',
+        '%s.cpp' % s for s in sources
+    ]
+
+    bin_suffix = CONFIG['BIN_SUFFIX']
+    SIMPLE_PROGRAMS += [
+        '%s%s' % (s, bin_suffix) for s in sources
     ]
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']