File: Makefile.am

package info (click to toggle)
cdo 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,836 kB
  • sloc: cpp: 185,271; ansic: 95,766; sh: 7,192; f90: 6,147; makefile: 1,977; ruby: 1,078; csh: 1,028; python: 995; fortran: 319; pascal: 219; perl: 9
file content (158 lines) | stat: -rw-r--r-- 4,972 bytes parent folder | download | duplicates (3)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
EXTRA_LTLIBRARIES = libcdipp.la

libcdipp_la_SOURCES = cdi.cpp cdi.hpp
libcdipp_la_LIBADD = $(top_builddir)/src/libcdi.la

test_PROGRAMS_ = CdiInfo

CdiInfo_SOURCES = CdiInfo.cpp
CdiInfo_LDADD = libcdipp.la
AM_CXXFLAGS = -static

AM_CPPFLAGS = -I$(abs_top_srcdir)/src

all_local =
install_exec_local =
uninstall_local =
clean_local =

SUBDIRS = python

if ENABLE_RUBY_INTERFACE
V_MAKERUBY = $(v_MAKERUBY_@AM_V@)
v_MAKERUBY_ = $(v_MAKERUBY_@AM_DEFAULT_V@)
v_MAKERUBY_0 = 0
v_MAKERUBY_1 = 1

# For compatibility with older versions of Ruby, the recipes below redefine
# the following additional variables of the generated Makefile (this is known
# to be needed for Ruby 2.7.4 but not for Ruby 3.1.0):
#   sitearchdir='$$(sitelibdir)/$$(sitearch)'
#   sitedir='$$(rubylibprefix)/site_ruby'
#   RM='$$(RM_RF)'

.PHONY: ruby-binding
all_local += ruby-binding
ruby-binding: ruby/Cdi.la
ruby/Cdi.la: ruby/cdi_wrapper.cpp ruby/Makefile libcdipp.la
	$(AM_V_CXXLD)$(am__cd) ruby && \
	  $(MAKE) $(AM_MAKEFLAGS) \
	    prefix='$(prefix)' \
	    sitearchdir='$$(sitelibdir)/$$(sitearch)' \
	    sitedir='$$(rubylibprefix)/site_ruby' \
	    TIMESTAMP_DIR='.dirstamp' \
	    CDI_INCFLAGS='-I$(abs_srcdir)' \
	    CDI_CPPFLAGS='$(AM_CPPFLAGS) $(CPPFLAGS)' \
	    CDI_CXXFLAGS='-shared $(CXXFLAGS)' \
	    CDI_LDFLAGS='$(AM_LDFLAGS) -module -avoid-version $(LDFLAGS) -rpath $$(RUBYARCHDIR)' \
	    CDI_LIBS='$(LIBS)' \
	    CCDLFLAGS= \
	    CXX='$(SHELL) $(abs_top_builddir)/libtool $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX)' \
	    LDSHAREDXX='$(SHELL) $(abs_top_builddir)/libtool $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) $$(CDI_CXXFLAGS)' \
	    DLLIB='$$(TARGET).la' \
	    V='$(V_MAKERUBY)'

ruby/Makefile: $(abs_srcdir)/ruby/setup.rb Makefile
	$(AM_V_GEN)$(MKDIR_P) $(@D) && $(am__cd) $(@D) && $(RUBY) $< && \
	  $(SED) -i~ -e '/^\.cpp\.o:/s/^\.cpp\.o/.cpp.lo/;/^.SUFFIXES:/s/$$/ .lo/' \
	    -e '$$auninstall:; $$(UNINSTALL_PROG) $$(RUBYARCHDIR)/$$(DLLIB)' \
	  Makefile && rm -f Makefile~

.PHONY: ruby-install
install_exec_local += ruby-install
ruby-install: ruby-binding
	$(am__cd) ruby && \
	  $(MAKE) $(AM_MAKEFLAGS) install \
	    prefix='$(DESTDIR)$(prefix)' \
	    sitearchdir='$$(sitelibdir)/$$(sitearch)' \
	    sitedir='$$(rubylibprefix)/site_ruby' \
	    TIMESTAMP_DIR='.dirstamp$(DESTDIR)' \
	    INSTALL_PROG='$(SHELL) $(abs_top_builddir)/libtool $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG)' \
	    DLLIB='$$(TARGET).la'

.PHONY: ruby-uninstall
uninstall_local += ruby-uninstall
ruby-uninstall:
	$(am__cd) ruby && \
	  $(MAKE) $(AM_MAKEFLAGS) uninstall \
	    prefix='$(DESTDIR)$(prefix)' \
	    sitearchdir='$$(sitelibdir)/$$(sitearch)' \
	    sitedir='$$(rubylibprefix)/site_ruby' \
	    UNINSTALL_PROG='$(SHELL) $(abs_top_builddir)/libtool $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f' \
	    DLLIB='$$(TARGET).la'

.PHONY: ruby-clean
# We call with distclean to remove the generated ruby/Makefile, which is
# generated by this makefile, and should, therefore, be deleted with
# 'make clean':
clean_local += ruby-clean
ruby-clean:
	if test -f ruby/Makefile; then \
	  $(am__cd) ruby && \
	    $(MAKE) $(AM_MAKEFLAGS) distclean \
	      RM='$$(RM_RF)' \
	      DLLIB='$$(TARGET).la' \
	      CLEANOBJS='*.lo .libs .dirstamp'; \
	fi

if with_on_demand_check_programs
check_PROGRAMS = $(test_PROGRAMS_)
else !with_on_demand_check_programs
noinst_PROGRAMS = $(test_PROGRAMS_)
endif !with_on_demand_check_programs

endif ENABLE_RUBY_INTERFACE

AUTOMAKE_OPTIONS = subdir-objects

if ENABLE_PYTHON_INTERFACE
if with_on_demand_check_programs
check_PROGRAMS = $(test_PROGRAMS_)
else !with_on_demand_check_programs
noinst_PROGRAMS = $(test_PROGRAMS_)
endif !with_on_demand_check_programs
endif ENABLE_PYTHON_INTERFACE

if MAINTAINER_MODE
ruby/cdi_wrapper.cpp: cdi.i cdi.hpp
	$(AM_V_GEN)$(MKDIR_P) $(@D) && $(SWIG) -ruby -c++ -globalmodule -o $@ $<

else !MAINTAINER_MODE
ruby/cdi_wrapper.cpp python/Cdi.py python/cdi_wrapper.cpp:
	@:;{ \
	  echo "ERROR: cannot generate '$@' when the maintainer mode is disabled:"; \
	  echo "       re-configure with the '--enable-maintainer-mode' option"; \
	} >&2; exit 1
endif !MAINTAINER_MODE

all-local: $(all_local)
install-exec-local: $(install_exec_local)
uninstall-local: $(uninstall_local)
clean-local: $(clean_local)

AM_TESTSUITE_SUMMARY_HEADER = ' for Ruby and Python interfaces of $(PACKAGE_STRING)'
TEST_EXTENSIONS = .run
TESTS = \
  test_cpp_nc.run \
  test_python_grb.run \
  test_python_nc.run \
  test_ruby_grb.run \
  test_ruby_nc.run

MOSTLYCLEANFILES = $(EXTRA_LTLIBRARIES)
MAINTAINERCLEANFILES = \
  python/Cdi.py \
  python/cdi_wrapper.cpp \
  ruby/cdi_wrapper.cpp

EXTRA_DIST = \
  cdi.i \
  f2003/bindGen.rb \
  python/test.py \
  ruby/cdi_wrapper.cpp \
  ruby/setup.rb \
  ruby/test.rb \
  testdata/mulval.grb \
  testdata/mulval.nc

include $(top_srcdir)/config/lt_overrides_Makefile.inc