1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017 Free Software Foundation, Inc.
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.
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.
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/>.
17 ## Process this file with automake to produce Makefile.in -*- makefile -*-
24 perl-module/Examples.pod \
25 perl-module/Makefile.PL \
26 perl-module/MANIFEST \
27 perl-module/ppport.h \
31 perl-module/lib/PSPP.pm \
34 PERL_MAKEFLAGS = $(AM_MAKEFLAGS) LD_RUN_PATH=$(pkglibdir)
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"
44 perl-module/Makefile: perl-module/MakefileX
45 $(SED) -e "/^INC/s/\([^=]\) *-I/\1\" -I/g" -e "/^INC/s/ *-I */ -I\"/g" -e "/^INC/s/ *$$/\"/" -e "/^MYEXTLIB/s/\([^=]\) \([^=]\)/\1\\\\ \2/g" $< > $@
47 perl-module/MakefileX: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
48 $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix) \
49 OPTIMIZE="$(CFLAGS) $(CPPFLAGS) -Wno-error" \
50 LD="`$(PERL) -e 'use Config::Perl::V;print Config::Perl::V::myconfig()->{config}{ld};'` $(LDFLAGS)"
52 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/Makefile
54 $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) tardist
57 module-make: perl-module/Makefile
58 $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS)
60 ALL_LOCAL += perl_module_tarball
61 perl_module_tarball: $(module_sources) src/libpspp-core.la
62 @if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
63 for f in $(module_sources); do \
64 destdir=`dirname $$f` ;\
66 if test ! -e "$(top_builddir)/$$f" || \
67 test "$(top_srcdir)/$$f" -nt "$(top_builddir)/$$f" ; then \
69 echo cp $(top_srcdir)/$$f $$destdir ; \
71 echo " GEN $$destdir/$$f"; \
73 cp $(top_srcdir)/$$f $$destdir ; \
74 chmod u+w $$destdir/`basename $$f`; \
78 $(AM_V_GEN)$(MAKE) $(PERL_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz
80 CLEAN_LOCAL += perl_module_clean
82 cd perl-module && $(MAKE) $(AM_MAKEFLAGS) clean || true
83 if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
84 rm -f $(module_sources) ; \
86 rm -f perl-module/Makefile.old perl-module/MakefileX perl-module/MakefileX.old perl-module/Makefile
89 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
90 perl-module/pspp-module-config \
91 perl-module/const-c.inc \
92 perl-module/const-xs.inc
94 EXTRA_DIST += $(module_sources)