Fix build of pspp.xml
[pspp] / Makefile.am
1 ## PSPP - a program for statistical analysis.
2 ## Copyright (C) 2019, 2020 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 AUTOMAKE_OPTIONS = std-options check-news 1.10.1 subdir-objects
20
21 SUBDIRS = gl po
22 DISTCLEANFILES = ./po/stamp-po xconfigure
23 BUILT_SOURCES =
24
25 AM_CPPFLAGS = \
26         -I$(top_srcdir)/gl \
27         -I$(top_builddir)/gl \
28         -DINSTALLDIR=\"$(bindir)\"
29
30 AM_V_P ?= :
31
32 AM_CFLAGS=
33
34 if cc_is_gcc
35 AM_CFLAGS+=-Wall -Wextra -Wwrite-strings -Wstrict-prototypes \
36 -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes
37 endif
38
39 .q.c:
40         @$(MKDIR_P) `dirname $@`
41         $(AM_V_GEN)./src/language/lexer/q2c$(EXEEXT_FOR_BUILD) $< $@
42
43 $(all_q_sources:.q=.c): src/language/lexer/q2c$(EXEEXT_FOR_BUILD)
44 all_q_sources =
45
46 pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
47
48
49 EXTRA_DIST = ONEWS
50
51 CLEANFILES =
52 CLEAN_LOCAL =
53 ALL_LOCAL =
54 CHECK_LOCAL =
55 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
56 noinst_LIBRARIES=
57 noinst_LTLIBRARIES=
58 noinst_PROGRAMS=
59 check_PROGRAMS=
60 bin_PROGRAMS=
61 dist_man_MANS =
62 DIST_HOOKS =
63 INSTALL_DATA_HOOKS =
64 UNINSTALL_DATA_HOOKS =
65 PHONY =
66 SUFFIXES = .q
67 LDADD = gl/libgl.la
68
69 gl/libgl.la: config.h
70         $(MAKE) -C gl
71
72 dist: gl/libgl.la
73
74 # This ensures that files added to EXTRA_DIST are always distributed,
75 # even if they are inside an Automake if...endif conditional block that is
76 # disabled by some particular "configure" run.  For more information, see:
77 # http://article.gmane.org/gmane.comp.sysutils.automake.general/10891
78 noinst_HEADERS = $(EXTRA_DIST)
79
80 generate-changelog:
81         if test -d $(top_srcdir)/.git; then                     \
82           $(top_srcdir)/build-aux/gitlog-to-changelog --since=2008-07-27  --srcdir=$(top_srcdir) \
83             > $(distdir)/cl-t || exit 1;                                        \
84           rm -f $(distdir)/ChangeLog;                           \
85           mv $(distdir)/cl-t $(distdir)/ChangeLog;              \
86         fi
87
88 DIST_HOOKS += generate-changelog
89
90
91 include $(top_srcdir)/build-aux/automake.mk
92 include $(top_srcdir)/po/automake.mk
93 include $(top_srcdir)/lib/automake.mk
94 include $(top_srcdir)/examples/automake.mk
95 include $(top_srcdir)/src/automake.mk
96 include $(top_srcdir)/utilities/automake.mk
97 include $(top_srcdir)/tests/automake.mk
98 include $(top_srcdir)/doc/automake.mk
99
100 if WITH_PERL_MODULE
101 include $(top_srcdir)/perl-module/automake.mk
102 endif
103
104 PHONY += $(DIST_HOOKS) $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS)
105
106 .PHONY: $(PHONY)
107
108 dist-hook: $(DIST_HOOKS)
109
110 install-data-hook: $(INSTALL_DATA_HOOKS)
111
112 uninstall-hook: $(UNINSTALL_DATA_HOOKS)
113
114 clean-local: $(CLEAN_LOCAL)
115 all-local: $(ALL_LOCAL)
116 check-local: $(CHECK_LOCAL)
117
118 # A convenience target to build all the binaries
119 programs: $(PROGRAMS)
120
121 # The following rules are from Open vSwitch.  The original copyright notice
122 # and license are:
123 #
124 # Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
125 #
126 # Copying and distribution of this file, with or without modification,
127 # are permitted in any medium without royalty provided the copyright
128 # notice and this notice are preserved.  This file is offered as-is,
129 # without warranty of any kind.
130
131 # If we're checked out from a Git repository, make sure that every
132 # file that is in Git is distributed.
133 # The debian package is now also maintained in git and that contains
134 # the distribution files. Do not run this check if we are
135 # in a debian package git repository, because the check fails there
136 ALL_LOCAL += dist-hook-git
137 dist-hook-git: distfiles
138         @if test -e $(srcdir)/.git &&                                       \
139             test ! -d $(srcdir)/debian &&                                   \
140             (git --version) >/dev/null 2>&1; then                           \
141           (cd $(srcdir) && git ls-files)                                    \
142             | grep -vE '\.gitignore|README.Git|Smake|Bug-administration'    \
143             | grep -vE '\.gitattributes'                                    \
144             | LC_ALL=C sort -u > gitfiles;                                  \
145           LC_ALL=C comm -1 -3 distfiles gitfiles > missing-distfiles;       \
146           if test -s missing-distfiles; then                                \
147             echo "The distribution is missing the following files:";        \
148             cat missing-distfiles;                                          \
149             exit 1;                                                         \
150           fi;                                                               \
151         fi
152 # The following is based on commands for the Automake "distdir" target.
153 distfiles: Makefile
154         @srcdirstrip=`echo "$(srcdir)" | $(SED) 's/[].[^$$\\*]/\\\\&/g'`; \
155         topsrcdirstrip=`echo "$(top_srcdir)" | $(SED) 's/[].[^$$\\*]/\\\\&/g'`; \
156         list='$(DISTFILES)'; \
157         for file in $$list; do echo $$file; done | \
158           $(SED) -e "s|^$$srcdirstrip/||;t" \
159               -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" \
160           | LC_ALL=C sort -u > $@
161 CLEANFILES += distfiles gitfiles missing-distfiles
162 PHONY += dist-hook-git