pivot table procedure conceptually works
[pspp] / perl-module / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 # PSPP
4
5 module_sources = \
6  perl-module/Changes \
7  perl-module/COPYING \
8  perl-module/Examples.pod \
9  perl-module/Makefile.PL \
10  perl-module/MANIFEST \
11  perl-module/ppport.h \
12  perl-module/PSPP.xs \
13  perl-module/README \
14  perl-module/typemap \
15  perl-module/lib/PSPP.pm \
16  perl-module/t/Pspp.t
17
18 PERL_MAKEFLAGS = $(AM_MAKEFLAGS) LD_RUN_PATH=$(pkglibdir)
19
20 perl-module/pspp-module-config: Makefile
21         $(AM_V_GEN)(echo '%Locations = (';\
22          printf "  SourceDir => '";\
23          (cd $(top_srcdir) && echo `pwd`\', ) ;\
24          printf "  BuildDir => '";\
25          (cd $(top_builddir) && echo `pwd`\' );\
26          echo ');') > $(top_builddir)/perl-module/pspp-module-config
27
28 perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
29         $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix)
30
31 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/Makefile
32         $(AM_V_at)rm -f $@
33         $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) tardist
34
35 PHONY += module-make
36 module-make: perl-module/Makefile
37         $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS)
38
39 ALL_LOCAL += perl_module_tarball
40 perl_module_tarball: $(module_sources) src/libpspp-core.la
41         @if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
42          for f in $(module_sources); do \
43           destdir=`dirname $$f` ;\
44           mkdir -p $$destdir ;\
45           if test ! -e "$(top_builddir)/$$f" || \
46              test "$(top_srcdir)/$$f" -nt "$(top_builddir)/$$f" ; then \
47                  if $(AM_V_P); then \
48                       echo cp $(top_srcdir)/$$f $$destdir ; \
49                  else \
50                       echo "  GEN      $$destdir/$$f"; \
51                  fi; \
52                  cp $(top_srcdir)/$$f $$destdir ; \
53           fi ; \
54          done \
55         fi
56         $(AM_V_GEN)$(MAKE) $(PERL_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz
57
58 CLEAN_LOCAL += perl_module_clean
59 perl_module_clean:
60         cd perl-module && $(MAKE) $(AM_MAKEFLAGS) clean || true
61         if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
62           rm -f $(module_sources) ; \
63         fi
64         rm -f perl-module/Makefile.old
65
66 CLEANFILES += \
67         perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
68         perl-module/pspp-module-config \
69         perl-module/const-c.inc \
70         perl-module/const-xs.inc 
71
72 EXTRA_DIST +=  $(module_sources)