Add support for reading and writing SPV files.
[pspp] / perl-module / automake.mk
1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017 Free Software Foundation, Inc.
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
18
19 # PSPP
20
21 module_sources = \
22  perl-module/Changes \
23  perl-module/COPYING \
24  perl-module/Examples.pod \
25  perl-module/Makefile.PL \
26  perl-module/MANIFEST \
27  perl-module/ppport.h \
28  perl-module/PSPP.xs \
29  perl-module/README \
30  perl-module/typemap \
31  perl-module/lib/PSPP.pm \
32  perl-module/t/Pspp.t
33
34 PERL_MAKEFLAGS = $(AM_MAKEFLAGS) LD_RUN_PATH=$(pkglibdir)
35
36 perl-module/pspp-module-config: Makefile
37         $(AM_V_GEN)(echo '%Locations = (';\
38          printf "  SourceDir => '";\
39          (cd $(top_srcdir) && echo `pwd`\', ) ;\
40          printf "  BuildDir => '";\
41          (cd $(top_builddir) && echo `pwd`\' );\
42          echo ');') > $(top_builddir)/perl-module/pspp-module-config
43
44 perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
45         $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix) \
46                                                          OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" \
47                                                          LD="`$(PERL) -V::ld:` $(LDFLAGS)"
48
49 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/Makefile
50         $(AM_V_at)rm -f $@
51         $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) tardist
52
53 PHONY += module-make
54 module-make: perl-module/Makefile
55         $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS)
56
57 ALL_LOCAL += perl_module_tarball
58 perl_module_tarball: $(module_sources) src/libpspp-core.la
59         @if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
60          for f in $(module_sources); do \
61           destdir=`dirname $$f` ;\
62           mkdir -p $$destdir ;\
63           if test ! -e "$(top_builddir)/$$f" || \
64              test "$(top_srcdir)/$$f" -nt "$(top_builddir)/$$f" ; then \
65                  if $(AM_V_P); then \
66                       echo cp $(top_srcdir)/$$f $$destdir ; \
67                  else \
68                       echo "  GEN      $$destdir/$$f"; \
69                  fi; \
70                  cp $(top_srcdir)/$$f $$destdir ; \
71           fi ; \
72          done \
73         fi
74         $(AM_V_GEN)$(MAKE) $(PERL_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz
75
76 CLEAN_LOCAL += perl_module_clean
77 perl_module_clean:
78         cd perl-module && $(MAKE) $(AM_MAKEFLAGS) clean || true
79         if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
80           rm -f $(module_sources) ; \
81         fi
82         rm -f perl-module/Makefile.old
83
84 CLEANFILES += \
85         perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
86         perl-module/pspp-module-config \
87         perl-module/const-c.inc \
88         perl-module/const-xs.inc 
89
90 EXTRA_DIST +=  $(module_sources)