Attached a patch for the rrd-tool LIBDBI integration with the following improvements:
[rrdtool.git] / bindings / Makefile.am
1 .PHONY: python ruby
2
3 if BUILD_TCL
4 SUB_tcl = tcl
5 endif
6 if BUILD_LUA
7 SUB_lua = lua
8 endif
9
10 SUBDIRS = $(SUB_tcl) $(SUB_lua)
11
12 # the following files are not mentioned in any other Makefile
13 EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
14              perl-shared/ntmake.pl perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm  perl-shared/RRDs.xs perl-shared/t/base.t \
15              ruby/CHANGES     ruby/README      ruby/extconf.rb  ruby/main.c      ruby/test.rb \
16              python/ACKNOWLEDGEMENT python/AUTHORS python/COPYING python/README python/rrdtoolmodule.c python/setup.py
17
18
19 # add the following to the all target
20 all-local:  @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
21
22 install-data-local:
23         test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
24         test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
25         test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
26         test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
27
28 # rules for building the ruby module
29 # RUBYARCHDIR= is to work around in a makefile quirk not sure 
30 # it is is the right thing todo, but it makes rrdtool build on freebsd as well
31 ruby: 
32         cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) RUBYARCHDIR=
33
34 # rules for building the pyton module
35 python:
36         cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py build_ext --rpath=$(libdir) && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
37
38 # rules for building the perl module
39 perl_piped: perl-piped/Makefile
40         cd perl-piped && $(MAKE)
41
42 perl-piped/Makefile: perl-piped/Makefile.PL
43         cd perl-piped && $(PERL) Makefile.PL $(PERL_MAKE_OPTIONS)
44
45 perl_shared: perl-shared/Makefile
46         cd perl-shared && $(MAKE)
47
48 perl-shared/Makefile: perl-shared/Makefile.PL
49         cd perl-shared && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) RPATH=$(libdir)
50 # LIBS="$(LDFLAGS) $(LIBS)" $(PERLFLAGS) $(PERL_MAKE_OPTIONS)
51
52 clean-local:
53         test -f perl-piped/Makefile && cd perl-piped && $(MAKE) clean || true
54         test -f perl-piped/Makefile && rm perl-piped/Makefile || true
55         test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true
56         test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true 
57         test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true 
58         test -d python/build && cd python &&  rm -rf build || true
59 ##END##