forked from coin-or-tools/BuildTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makemain.inc
126 lines (105 loc) · 4.05 KB
/
Makemain.inc
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
## Copyright (C) 2020 COIN-OR Foundation
## All Rights Reserved.
##
## This file is distributed under the Eclipse Public License 2.0.
## See LICENSE for details.
##
## Author: Andreas Waechter IBM 2006-04-13
## #####################################################################
## Variables for documentation and data directories #
## #####################################################################
## Set these up to provide some uniformity in naming while also conforming
## to GNU directory standards. For reasons known only to the autoconf
## developers, autoconf leaves datadir = $(datarootdir) but forces docdir
## to $(datarootdir)/doc/$(PACKAGE_TARNAME).
pkgincludedir = $(includedir)/coin-or
pkgdatadir = $(datadir)/$(PACKAGE_TARNAME)
pkgdocdir = $(docdir)
## The directory where to install .pc files is also always the same.
pkgconfiglibdir = $(libdir)/pkgconfig
# doxydocdir is the top-level directory for doxygen documentation. It holds
# the tag file and possibly the PDF or Postscript version. doxyhtmldir is
# typically a subdirectory containing all the files doxygen creates for
# html documentation.
doxydocdir = $(pkgdocdir)/doxydoc
doxyhtmldir = $(doxydocdir)/html
## #####################################################################
## Documentation installation #
## #####################################################################
DocFiles = README README.md AUTHORS LICENSE
COIN_HAS_DOXYGEN = @COIN_HAS_DOXYGEN_TRUE@TRUE
COIN_HAS_LATEX = @COIN_HAS_LATEX_TRUE@TRUE
## Needless to say, it's important that baredocdir_nosub not be a target for
## autoconf substitution.
DOXYTAG_EDIT = sed -e 's|@baredocdir_nosub@|$(datarootdir)/doc|g'
doxygen-docs:
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc/"; then \
if test -f doxydoc/doxygen.conf ; then \
$(DOXYTAG_EDIT) \
doxydoc/doxygen.conf > doxydoc/doxygen.conf.tmp ; \
mv doxydoc/doxygen.conf.tmp doxydoc/doxygen.conf ; \
fi ; \
doxygen doxydoc/doxygen.conf;\
fi;\
fi
pdf-doxygen-docs: doxygen-docs
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc/latex"; then \
if test "$(COIN_HAS_LATEX)" = TRUE; then \
cd doxydoc/latex;\
$(MAKE) pdf;\
cd -;\
fi;\
fi;\
fi
clean-doxygen-docs:
if test -d "doxydoc"; then \
cd doxydoc ;\
rm -rf html latex *.log *.tag;\
fi
install-doxygen-docs: doxygen-docs
if test "$(COIN_HAS_DOXYGEN)" = TRUE; then \
if test -d "doxydoc"; then \
test -d "$(DESTDIR)$(doxydocdir)" || \
$(mkdir_p) "$(DESTDIR)$(doxydocdir)"; \
$(INSTALL_DATA) doxydoc/@coin_doxy_tagname@ \
"$(DESTDIR)$(doxydocdir)"; \
if test -f "doxydoc/latex/refman.pdf"; then \
$(INSTALL_DATA) doxydoc/latex/refman.pdf \
"$(DESTDIR)$(doxydocdir)";\
fi;\
if test -d "doxydoc/html"; then \
test -d "$(DESTDIR)$(doxyhtmldir)/search/" || \
$(mkdir_p) "$(DESTDIR)$(doxyhtmldir)/search/"; \
$(INSTALL_DATA) doxydoc/html/*.* \
"$(DESTDIR)$(doxyhtmldir)";\
$(INSTALL_DATA) doxydoc/html/search/*.* \
"$(DESTDIR)$(doxyhtmldir)/search";\
fi;\
fi;\
fi
# It's not clear that uninstall-doc should also remove doxygen doc'n. Write
# the rules so that the last one will remove pkgdocdir (which should be empty
# by then).
uninstall-doxygen-docs:
if test -d "$(DESTDIR)$(doxydocdir)"; then \
rm -rf "$(DESTDIR)$(doxydocdir)"; \
fi
rmdir $(DESTDIR)$(pkgdocdir) || true
install-doc:
$(mkdir_p) "$(DESTDIR)$(pkgdocdir)"
for file in $(DocFiles); do \
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
if test -f "$$dir$$file"; then \
$(INSTALL_DATA) "$$dir$$file" "$(DESTDIR)$(pkgdocdir)/$$file"; \
fi; \
done
uninstall-doc:
for file in $(DocFiles); do \
rm -f "$(DESTDIR)$(pkgdocdir)/$$file"; \
done
rmdir $(DESTDIR)$(pkgdocdir) || true
.PHONY: install-doc uninstall-doc \
doxygen-docs pdf-doxygen-docs clean-doxygen-docs \
install-doxygen-docs uninstall-doxygen-docs