Makefile.am
4.72 KB
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
#############################################################################
# Makefile.am for ctools module #
# ------------------------------------------------------------------------- #
# Copyright (C) 2016-2018 Juergen Knoedlseder #
# ------------------------------------------------------------------------- #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
#############################################################################
# Darwin support
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
# Set sub directories
SUBDIRS = support \
ctbin \
ctlike \
ctmodel \
ctobssim \
ctselect \
ctskymap \
ctexpcube \
ctpsfcube \
ctedispcube \
ctbkgcube \
ctmapcube \
ctcubemask \
cttsmap \
ctbutterfly \
ctulimit \
cterror \
ctphase \
ctprob
# Scripts to be distributed
scripts = ctools-setup \
ctools-init.sh \
ctools-init.csh
# Headers to be distributed
pkginclude_HEADERS = ctools.hpp
# Build libtool library for ctools. This is needed to provide
# a shared library that can be loaded for python bindings. We do
# not have to build this library if no python bindings are used.
lib_LTLIBRARIES = libctools.la
libctools_la_SOURCES =
libctools_la_LIBADD = support/libsupport.la \
ctbin/libctbin.la \
ctlike/libctlike.la \
ctmodel/libctmodel.la \
ctobssim/libctobssim.la \
ctselect/libctselect.la \
ctskymap/libctskymap.la \
ctexpcube/libctexpcube.la \
ctpsfcube/libctpsfcube.la \
ctedispcube/libctedispcube.la \
ctbkgcube/libctbkgcube.la \
ctmapcube/libctmapcube.la \
ctcubemask/libctcubemask.la \
cttsmap/libcttsmap.la \
ctbutterfly/libctbutterfly.la \
ctulimit/libctulimit.la \
cterror/libcterror.la \
ctphase/libctphase.la \
ctprob/libctprob.la
libctools_la_LDFLAGS = -version-info $(CTOOLS_LT_VERSION) @OPENMP_LIB_LDFLAGS@
# Distribute scripts
EXTRA_DIST = $(scripts)
scriptsdir = $(bindir)
scripts_DATA = $(scripts)
# Things to install
install-data-local: help-install
# Things to uninstall
uninstall-local: help-uninstall
# Install help files
help-install:
@$(mkinstalldirs) $(DESTDIR)$(datadir)/help && \
for file in $(top_srcdir)/doc/source/users/reference_manual/c*.rst ; do \
filename="$${file##*/}" ; \
basename="$${filename%%.*}" ; \
helpname="$$basename.txt" ; \
echo "$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/help/$$helpname" ; \
$(INSTALL_DATA) "$$file" $(DESTDIR)$(datadir)/help/"$$helpname" ; \
sed -i.bak -e 's/``//g' -e 's/`//g' -e 's/:ref://g' -e 's/:doc://g' \
-e 's/.. note::/Note/g' -e 's/.. warning::/Warning/g' -e '1d' \
-e 's/.. code-block:: bash//g' -e 's/.. code-block:: xml//g' \
-e 's/>__/>/g' -e 's/>_/>/g' \
$(DESTDIR)$(datadir)/help/"$$helpname" ; \
rm -rf $(DESTDIR)$(datadir)/help/"$$helpname".bak ; \
done
# Uninstall help files
help-uninstall:
rm -rf $(DESTDIR)$(datadir)/help
# Add hook rule to make scripts executable
install-data-hook:
@list='$(scripts_DATA)';\
for p in $$list; do \
if test -f "$$p"; then chmod +x "$(DESTDIR)$(scriptsdir)/$$p"; fi; \
done