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