diff -urN gmock-1.7.0.orig/gtest/Makefile.am gmock-1.7.0/gtest/Makefile.am --- a/googletest/Makefile.am 2013-09-23 22:34:27.649060735 -0700 +++ b/googletest/Makefile.am 2013-09-23 22:39:16.097069357 -0700 @@ -299,8 +299,2 @@ -install-exec-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system." - false -install-data-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system." - false --- a/googlemock/Makefile.am +++ b/googlemock/Makefile.am @@ -7,6 +7,8 @@ EXTRA_DIST = LICENSE # included in the 'subdirs' variable. -SUBDIRS = $(subdirs) + +bin_SCRIPTS = scripts/gmock-config + # This is generated by the configure script, so clean it for distribution. DISTCLEANFILES = scripts/gmock-config @@ -16,5 +19,8 @@ if HAVE_PTHREADS lib_libgmock_la_SOURCES = src/gmock-all.cc +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gmock.pc + pkginclude_HEADERS = \ include/gmock/gmock-actions.h \ include/gmock/gmock-cardinalities.h \ @@ -207,10 +213,11 @@ CLEANFILES = core # Mock can lead to undefined behavior due to violation of the # One-Definition Rule. -install-exec-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system." - false - -install-data-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system." - false +install-exec-hook: + install -d "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 1 + cp -rf scripts/generator "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 2 + python2 -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 3 + python2 -O -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 4 + install -Dm 644 src/*.cc -t "$(DESTDIR)$(prefix)/src/@PACKAGE@" && echo 5 + install -Dm 644 $(pkgconfig_DATA) -t "$(DESTDIR)$(pkgconfigdir)" && echo 6 + sed -i s/src[/]//g "$(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc" && echo 7 --- a/googlemock/Makefile.am 2016-09-28 17:47:02.926781189 +0200 +++ b/googlemock/Makefile.am 2016-09-28 17:47:38.066834777 +0200 @@ -42,10 +42,7 @@ pkginclude_internal_HEADERS = \ include/gmock/internal/gmock-generated-internal-utils.h \ include/gmock/internal/gmock-internal-utils.h \ - include/gmock/internal/gmock-port.h \ - include/gmock/internal/custom/gmock-generated-actions.h \ - include/gmock/internal/custom/gmock-matchers.h \ - include/gmock/internal/custom/gmock-port.h + include/gmock/internal/gmock-port.h lib_libgmock_main_la_SOURCES = src/gmock_main.cc lib_libgmock_main_la_LIBADD = lib/libgmock.la diff --git a/configure.ac b/configure.ac index d268d5d..9d23176 100644 --- a/googlemock/configure.ac +++ b/googlemock/configure.ac @@ -10,7 +10,7 @@ AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([./LICENSE]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([build-aux/config.h]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile gmock.pc]) AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config]) # Initialize Automake with various options. We require at least v1.9, prevent