Debian Codegraph @

perl/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - automake file for Perl 5 interface to Redland
4 #
5 # Copyright (C) 2000-2005 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
23 AM_CPPFLAGS=@CPPFLAGS@ @LIBRDF_CPPFLAGS@
24 AM_CFLAGS=@CFLAGS@ @LIBRDF_CPPFLAGS@ $(MEM)
25 AM_STANDARD_CFLAGS=@STANDARD_CFLAGS@ @LIBRDF_CPPFLAGS@ $(MEM)
26
27 AM_LDFLAGS=@LIBRDF_LDFLAGS@ $(MEM_LIBS)
28
29 REDLAND_SWIG=@REDLAND_SWIG@
30
31 PERL=@PERL@
32
33 PERL_REDLAND_PACKAGE=RDF::Redland
34 PERL_CORE_PACKAGE=CORE
35 PERL_FULL_CORE_PACKAGE="$(PERL_REDLAND_PACKAGE)::$(PERL_CORE_PACKAGE)"
36
37 PERL_MAKEFILE=Makefile.perl
38
39 SWIG_OUTPUTS=$(PERL_CORE_PACKAGE)_wrap.c \
40 lib/RDF/Redland/$(PERL_CORE_PACKAGE).pm
41 PERL_CRUFT=pm_to_blib \
42 $(PERL_CORE_PACKAGE).bs $(PERL_CORE_PACKAGE)_wrap.o \
43 $(PERL_MAKEFILE).old
44
45
46 fakedir=$(prefix)
47 fake_DATA=build-perl-stamp
48
49 EXTRA_DIST= \
50 MANIFEST MANIFEST.SKIP Makefile.PL example.pl \
51 rss-dump.pl \
52 redland-pre.i redland-post.i redland-decl.i $(SWIG_OUTPUTS)
53
54 SUBDIRS=lib t
55
56 CLEANFILES=*.db test-out.rdf core* $(PERL_CRUFT)
57 MAINTAINERCLEANFILES=$(SWIG_OUTPUTS)
58
59 MEM_LIBS=@MEM_LIBS@
60
61 $(perlshareRDFdir)/Redland.pm: build-perl
62
63
64 RUN=@REDLAND_RUN@
65
66 SWIG_OPTS=-I$(srcdir) -DREDLAND_PRE_I -DREDLAND_POST_I -DREDLAND_DECL_I
67
68 $(PERL_CORE_PACKAGE)_wrap.c lib/RDF/Redland/$(PERL_CORE_PACKAGE).pm : @REDLAND_SWIG@ redland-pre.i redland-post.i redland-decl.i
69 swig -v -perl5 $(SWIG_OPTS) -module $(PERL_FULL_CORE_PACKAGE) -o $(PERL_CORE_PACKAGE)_wrap.c $(REDLAND_SWIG) && mv $(PERL_CORE_PACKAGE).pm lib/RDF/Redland/$(PERL_CORE_PACKAGE).pm
70
71 $(PERL_MAKEFILE): $(srcdir)/Makefile.PL lib/RDF/Redland/$(PERL_CORE_PACKAGE).pm
72 VERSION=$(VERSION) LDFLAGS="$(AM_LDFLAGS)" CFLAGS="$(AM_CPPFLAGS) $(SWIG_OPTS) $(CPPFLAGS) $(AM_STANDARD_CFLAGS)" SWIG="$(REDLAND_SWIG)" $(PERL) $(srcdir)/Makefile.PL $(PERL_MAKEMAKER_ARGS)
73
74 -perl install-perl: $(PERL_MAKEFILE)
75 @target=`echo $@ | sed -e 's/-perl//'`; \
76 echo $(MAKE) -f $(PERL_MAKEFILE) $$target; \
77 $(MAKE) -f $(PERL_MAKEFILE) $$target
78
79 test-perl: $(PERL_MAKEFILE)
80 $(RUN)$(MAKE) -f $(PERL_MAKEFILE) test
81
82 clean-perl realclean-perl:
83 @target=`echo $@ | sed -e 's/-perl//'`; \
84 if test -r $(PERL_MAKEFILE); then \
85 echo $(MAKE) -f $(PERL_MAKEFILE) $$target; \
86 $(MAKE) -f $(PERL_MAKEFILE) $$target; \
87 fi
88
89 build-perl: -perl
90
91 build-perl-stamp: @REDLAND_SWIG@
92 $(MAKE) build-perl && touch build-perl-stamp
93
94 check-local: build-perl-stamp test-perl
95
96 # Perl make clean leaves the old makefile around
97 clean-local:
98 rm -rf blib $(PERL_MAKEFILE) $(PERL_MAKEFILE).old build-perl-stamp
99
100 # See this is the fake bit
101 install-fakeDATA: install-perl