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