Debian Codegraph @

ruby/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - automake file for Ruby interface to Redland
4 #
5 # Copyright (C) 2000-2012 David Beckett - http://www.dajobe.org/
6 # Copyright (C) 2000-2005 University of Bristol - http://www.bristol.ac.uk/
7 #
8 # This package is Free Software and part of Redland http://librdf.org/
9 #
10 # It is licensed under the following three licenses as alternatives:
11 # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
12 # 2. GNU General Public License (GPL) V2 or any newer version
13 # 3. Apache License, V2.0 or any newer version
14 #
15 # You may not use this file except in compliance with at least one of
16 # the above three licenses.
17 #
18 # See LICENSE.html or LICENSE.txt at the top of this package for the
19 # full license terms.
20 #
21
22 RELEASE=@VERSION_RELEASE@
23
24 AM_CPPFLAGS=@CPPFLAGS@ @LIBRDF_CPPFLAGS@ @RUBY_INCLUDES@
25 AM_CFLAGS=@CFLAGS@ @LIBRDF_CPPFLAGS@ $(MEM)
26
27 AM_LDFLAGS=@LIBRDF_LDFLAGS@ $(MEM_LIBS)
28
29 RUBY=@RUBY@
30
31 RUBY_PACKAGE=@RUBY_PACKAGE@
32 RUBY_CFLAGS=@RUBY_CFLAGS@
33 RUBY_LDFLAGS=@RUBY_LDFLAGS@
34 RUBY_SO_SUFFIX=@RUBY_SO_SUFFIX@
35
36 SWIG_OUTPUTS=$(RUBY_PACKAGE)_wrap.c
37 SWIG_CRUFT=
38
39 RDOC_DIR=rdoc
40 RDOC_STAMP=rdoc-stamp
41
42 rubyarchinstalldir=@RUBY_ARCH_INSTALLDIR@
43 rubyarchinstall_DATA=$(RUBY_PACKAGE).$(RUBY_SO_SUFFIX)
44
45 EXTRA_DIST=\
46 example.rb test.rb \
47 redland-pre.i redland-types.i \
48 $(SWIG_OUTPUTS) \
49 jquery-1.7.2.js
50
51 SUBDIRS=lib test
52
53 CLEANFILES=\
54 *.db test-out.rdf \
55 $(RUBY_PACKAGE)_wrap.o $(RUBY_PACKAGE)-stamp \
56 $(RUBY_PACKAGE).$(RUBY_SO_SUFFIX) $(RUBY_PACKAGE).bundle
57
58 MAINTAINERCLEANFILES=$(SWIG_OUTPUTS) $(SWIG_CRUFT) $(RDOC_DIR) $(RDOC_STAMP)
59
60 RUN=@REDLAND_RUN@
61
62 SWIG_OPTS=-I$(srcdir) -DREDLAND_PRE_I -DREDLAND_TYPES_I
63
64 $(srcdir)/$(RUBY_PACKAGE)_wrap.c: @REDLAND_SWIG@ redland-pre.i redland-types.i
65 swig -v -ruby $(SWIG_OPTS) -module $(RUBY_PACKAGE) -o $@ @REDLAND_SWIG@
66
67 # -UHAVE_CONFIG_H to stop ruby trying to include config.h which won't exist
68 $(RUBY_PACKAGE)_wrap.o: $(srcdir)/$(RUBY_PACKAGE)_wrap.c
69 $(CC) $(DEFS) $(SWIG_OPTS) -UHAVE_CONFIG_H $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC $(RUBY_PACKAGE)_wrap.c -c -o $@
70
71
72 $(RUBY_PACKAGE).$(RUBY_SO_SUFFIX): $(RUBY_PACKAGE)-stamp
73 $(RUBY_PACKAGE)-stamp: $(RUBY_PACKAGE)_wrap.o
74 $(CC) $(STANDARD_CFLAGS) $(RUBY_PACKAGE)_wrap.o $(AM_LDFLAGS) $(LDFLAGS) $(RUBY_LDFLAGS) -o $(RUBY_PACKAGE).$(RUBY_SO_SUFFIX)
75 touch $(RUBY_PACKAGE)-stamp
76
77 check-local: test-ruby
78
79 test-ruby: test-simple test-example
80
81 test-simple: $(RUBY_PACKAGE).$(RUBY_SO_SUFFIX) $(srcdir)/example.rb
82 $(RUN)$(RUBY) -I. -Ilib \
83 $(srcdir)/test.rb file:$(srcdir)/../data/dc.rdf raptor
84
85 test-example: $(RUBY_PACKAGE).$(RUBY_SO_SUFFIX) $(srcdir)/example.rb
86 $(RUN)$(RUBY) -I. -Ilib \
87 $(srcdir)/example.rb file:$(srcdir)/../data/dc.rdf raptor
88
89 docs: $(RDOC_STAMP)
90 $(RDOC_STAMP):
91 mkdir -p $(RDOC_DIR); \
92 outdir=`cd $(RDOC_DIR); pwd`; \
93 rm -rf $$outdir; \
94 here=`pwd`; \
95 cd $(srcdir)/lib; \
96 rdoc --quiet --fmt html --charset 'utf-8' --inline-source --op $$outdir --title "Redland Ruby API RDoc" --exclude convert_owl.rb --exclude constants.rb --exclude convertfoaf.rb && touch $$here/$@
97 echo "Install JQuery full source replacing rdoc's minimized"
98 cp jquery-1.7.2.js $(RDOC_DIR)/js/jquery.js
99
100 clean-local:
101 rm -rf $(RDOC_DIR) $(RDOC_STAMP)