1EXTRA_DIST = 2CLEANFILES = 3DISTCLEANFILES = 4MAINTAINERCLEANFILES = 5 6bin_PROGRAMS = 7lib_LTLIBRARIES = 8noinst_LTLIBRARIES = 9noinst_PROGRAMS = 10 11include src/Makefile.am 12include doc/Makefile.am 13if ENABLE_MAN_PAGES 14include doc/man/Makefile.am 15endif 16if ENABLE_HTML_DOCS 17include doc/html/Makefile.am 18endif 19if ENABLE_TESTS 20include tests/Makefile.am 21endif 22 23if ENABLE_EXAMPLES 24include examples/Makefile.am 25endif 26 27# for various extra dist 28include build/Makefile.am 29 30ACLOCAL_AMFLAGS = -I build/autotools/m4 ${ACLOCAL_FLAGS} 31DISTCHECK_CONFIGURE_FLAGS = --enable-maintainer-flags --enable-silent-rules --enable-optimizations --enable-html-docs --enable-man-pages 32 33bsondocdir = ${docdir} 34bsondoc_DATA = \ 35 COPYING \ 36 NEWS \ 37 README \ 38 THIRD_PARTY_NOTICES 39 40EXTRA_DIST += $(bsondoc_DATA) 41 42EXTRA_DIST += CMakeLists.txt \ 43 VERSION_CURRENT \ 44 VERSION_RELEASED 45 46dist-hook: 47 @if test -d "$(srcdir)/.git"; then \ 48 (cd "$(srcdir)" && \ 49 $(top_srcdir)/build/autotools/missing --run git log --stat ) > ChangeLog.tmp \ 50 && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ 51 || (rm -f ChangeLog.tmp; \ 52 echo Failed to generate ChangeLog >&2); \ 53 else \ 54 echo A git checkout is required to generate a ChangeLog >&2; \ 55 fi 56 57# Make libbson-static-1.0.a symlink to libbson-1.0.a. If libbson is built with 58# CMake instead of the Autotools, the static archive is named 59# libbson-static-1.0.a by default. For the sake of projects that want to 60# statically link to libbson, ensure the static archive is present with the 61# name no matter how it was built. 62 63# Also, copy CMake config-file packages to lib/cmake/ for use with CMake's 64# "find_package" command. 65 66if ENABLE_STATIC 67enable_static=1 68endif 69 70install-exec-hook: 71 $(MKDIR_P) $(DESTDIR)$(libdir)/cmake/libbson-1.0 72 cp -f build/cmake/libbson-1.0-config.cmake $(DESTDIR)$(libdir)/cmake/libbson-1.0 73 cp -f build/cmake/libbson-1.0-config-version.cmake $(DESTDIR)$(libdir)/cmake/libbson-1.0 74 75 if [ ! -z "$(enable_static)" ]; then \ 76 rm -rf $(DESTDIR)$(libdir)/cmake/libbson-static-1.0; \ 77 $(MKDIR_P) $(DESTDIR)$(libdir)/cmake/libbson-static-1.0; \ 78 cd $(DESTDIR)$(libdir); \ 79 rm -f libbson-static-1.0.a; \ 80 $(LN_S) libbson-1.0.a libbson-static-1.0.a; \ 81 cp -f $(abs_builddir)/build/cmake/libbson-static-1.0-config.cmake cmake/libbson-static-1.0; \ 82 cp -f $(abs_builddir)/build/cmake/libbson-static-1.0-config-version.cmake cmake/libbson-static-1.0; \ 83 fi 84 85clean-local: 86 -rm -rf $(CLEANFILES) 87 88uninstall-local: 89 -rm -r $(bsondocdir) 90 -rm -rf $(DESTDIR)$(libdir)/libbson-static-1.0.a 91 -rm -rf $(DESTDIR)$(libdir)/cmake/libbson-1.0 92 -rm -rf $(DESTDIR)$(libdir)/cmake/libbson-static-1.0 93 94