summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2016-05-18 15:12:46 +0200
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2016-05-18 15:12:46 +0200
commit2d407ee533f68d19ff90abd4da37c7cc8a74afc2 (patch)
tree4d0258178dd44fa0e5a5dab13e5ead099d0dfb4e
parenta45d6b1d78cd8329cbab1e1c2b7397cb55d092b9 (diff)
downloadnss-hg-2d407ee533f68d19ff90abd4da37c7cc8a74afc2.tar.gz
Bug 1242565 - follow up to reuse gtests.o, r=mt
-rw-r--r--.hgignore1
-rw-r--r--external_tests/common/Makefile41
-rw-r--r--external_tests/common/manifest.mn21
-rw-r--r--external_tests/der_gtest/Makefile2
-rw-r--r--external_tests/der_gtest/manifest.mn5
-rw-r--r--external_tests/manifest.mn1
-rw-r--r--external_tests/pk11_gtest/Makefile2
-rw-r--r--external_tests/pk11_gtest/manifest.mn6
-rw-r--r--external_tests/util_gtest/Makefile2
-rw-r--r--external_tests/util_gtest/manifest.mn3
10 files changed, 72 insertions, 12 deletions
diff --git a/.hgignore b/.hgignore
index b57944e6d..17751f8a6 100644
--- a/.hgignore
+++ b/.hgignore
@@ -3,4 +3,3 @@ syntax: glob
*OPT.OBJ/*
*DBG.OBJ/*
*DBG.OBJD/*
-*.o
diff --git a/external_tests/common/Makefile b/external_tests/common/Makefile
new file mode 100644
index 000000000..e17bc282c
--- /dev/null
+++ b/external_tests/common/Makefile
@@ -0,0 +1,41 @@
+#! 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/.
+
+#######################################################################
+# (1) Include initial platform-independent assignments (MANDATORY). #
+#######################################################################
+
+include manifest.mn
+
+#######################################################################
+# (2) Include "global" configuration information. (OPTIONAL) #
+#######################################################################
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
+#######################################################################
+# (3) Include "component" configuration information. (OPTIONAL) #
+#######################################################################
+
+#######################################################################
+# (4) Include "local" platform-dependent assignments (OPTIONAL). #
+#######################################################################
+
+include gtest.mk
+
+#######################################################################
+# (5) Execute "global" rules. (OPTIONAL) #
+#######################################################################
+
+include $(CORE_DEPTH)/coreconf/rules.mk
+
+#######################################################################
+# (6) Execute "component" rules. (OPTIONAL) #
+#######################################################################
+
+#######################################################################
+# (7) Execute "local" rules. (OPTIONAL). #
+#######################################################################
diff --git a/external_tests/common/manifest.mn b/external_tests/common/manifest.mn
new file mode 100644
index 000000000..bf45ebc0a
--- /dev/null
+++ b/external_tests/common/manifest.mn
@@ -0,0 +1,21 @@
+#
+# 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/.
+CORE_DEPTH = ../..
+DEPTH = ../..
+MODULE = nss
+
+CPPSRCS = \
+ gtests.cc \
+ $(NULL)
+
+INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
+ -I$(CORE_DEPTH)/external_tests/common
+
+REQUIRES = gtest
+
+EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)
+
+# NOTE: this is not actually used but required to build gtests.o
+PROGRAM = gtests \ No newline at end of file
diff --git a/external_tests/der_gtest/Makefile b/external_tests/der_gtest/Makefile
index 9f76df79f..0d547e080 100644
--- a/external_tests/der_gtest/Makefile
+++ b/external_tests/der_gtest/Makefile
@@ -41,5 +41,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-
-ALL_TRASH += common
diff --git a/external_tests/der_gtest/manifest.mn b/external_tests/der_gtest/manifest.mn
index a7ff3f161..1c73d09f4 100644
--- a/external_tests/der_gtest/manifest.mn
+++ b/external_tests/der_gtest/manifest.mn
@@ -8,7 +8,6 @@ MODULE = nss
CPPSRCS = \
der_getint_unittest.cc \
- ../common/gtests.cc \
$(NULL)
INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
@@ -17,4 +16,6 @@ INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
REQUIRES = nspr nss libdbm gtest
PROGRAM = der_gtest
-EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)
+
+EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) $(EXTRA_OBJS) \
+ ../common/$(OBJDIR)/gtests$(OBJ_SUFFIX)
diff --git a/external_tests/manifest.mn b/external_tests/manifest.mn
index 2dac9166b..7075bac55 100644
--- a/external_tests/manifest.mn
+++ b/external_tests/manifest.mn
@@ -7,6 +7,7 @@ DEPTH = ..
DIRS = \
google_test \
+ common \
der_gtest \
util_gtest \
pk11_gtest \
diff --git a/external_tests/pk11_gtest/Makefile b/external_tests/pk11_gtest/Makefile
index 9f76df79f..0d547e080 100644
--- a/external_tests/pk11_gtest/Makefile
+++ b/external_tests/pk11_gtest/Makefile
@@ -41,5 +41,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-
-ALL_TRASH += common
diff --git a/external_tests/pk11_gtest/manifest.mn b/external_tests/pk11_gtest/manifest.mn
index 269621c49..29bef170e 100644
--- a/external_tests/pk11_gtest/manifest.mn
+++ b/external_tests/pk11_gtest/manifest.mn
@@ -11,7 +11,6 @@ CPPSRCS = \
pk11_pbkdf2_unittest.cc \
pk11_prf_unittest.cc \
pk11_rsapss_unittest.cc \
- ../common/gtests.cc \
$(NULL)
INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
@@ -20,4 +19,7 @@ INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include \
REQUIRES = nspr nss libdbm gtest
PROGRAM = pk11_gtest
-EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)
+
+EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) $(EXTRA_OBJS) \
+ ../common/$(OBJDIR)/gtests$(OBJ_SUFFIX)
+
diff --git a/external_tests/util_gtest/Makefile b/external_tests/util_gtest/Makefile
index 6d611a762..996669782 100644
--- a/external_tests/util_gtest/Makefile
+++ b/external_tests/util_gtest/Makefile
@@ -43,5 +43,3 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-
-ALL_TRASH += common
diff --git a/external_tests/util_gtest/manifest.mn b/external_tests/util_gtest/manifest.mn
index 9c09da434..41e7edc0b 100644
--- a/external_tests/util_gtest/manifest.mn
+++ b/external_tests/util_gtest/manifest.mn
@@ -7,7 +7,6 @@ DEPTH = ../..
MODULE = nss
CPPSRCS = \
- ../common/gtests.cc \
util_utf8_unittest.cc \
$(NULL)
@@ -19,7 +18,9 @@ INCLUDES += \
REQUIRES = nspr gtest
PROGRAM = util_gtest
+
EXTRA_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
+ ../common/$(OBJDIR)/gtests$(OBJ_SUFFIX) \
$(NULL)