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