Makefile.am 4.56 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Makefile.am
#
# Copyright (C) 2017, 2018 Vivien Kraus <vivien@planete-kraus.eu>
# 
#  This program is free software: you can redistribute it and/or
#  modify it under the terms of the GNU General Public License as
#  published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see
#  <http://www.gnu.org/licenses/>.

Vivien Kraus's avatar
Vivien Kraus committed
19
20
21
22
23
SUBDIRS = lib-library lib-program

if NEED_LIBOPTS
  SUBDIRS += $(LIBOPTS_DIR)
endif # NEED_LIBOPTS
Vivien Kraus's avatar
Vivien Kraus committed
24

Vivien Kraus's avatar
Vivien Kraus committed
25
AUTOMAKE_OPTIONS = subdir-objects
26
bin_PROGRAMS =
27
bin_SCRIPTS =
28
29
30
31
32
33
dist_bin_SCRIPTS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
include_HEADERS =
check_PROGRAMS =
info_TEXINFOS =
Vivien Kraus's avatar
Vivien Kraus committed
34
dist_man_MANS =
Vivien Kraus's avatar
Vivien Kraus committed
35
36
37
helpdir = $(datadir)/help
chelpdir = $(helpdir)/C
dist_chelp_DATA =
38
39
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA =
40
41
pkgdatadir = $(datadir)/@PACKAGE@
pkgdata_SCRIPTS =
Vivien Kraus's avatar
Vivien Kraus committed
42
43
44
45
46
sysconf_DATA =
dist_sysconf_DATA =
tarotsysconfdir = $(sysconfdir)/tarot
tarotsysconf_DATA =
dist_tarotsysconf_DATA =
Vivien Kraus's avatar
Vivien Kraus committed
47
dist_pkgdata_DATA = COPYING
Vivien Kraus's avatar
Vivien Kraus committed
48
dist_html_DATA =
Vivien Kraus's avatar
Vivien Kraus committed
49
50
51
52
53
54
55
56
57
58
iconsdir = $(datadir)/icons
xlargeiconsdir = $(iconsdir)/hicolor/256x256/apps
largeiconsdir = $(iconsdir)/hicolor/48x48/apps
mediumiconsdir = $(iconsdir)/hicolor/32x32/apps
smalliconsdir = $(iconsdir)/hicolor/22x22/apps
dist_xlargeicons_DATA =
dist_largeicons_DATA =
dist_mediumicons_DATA =
dist_smallicons_DATA =
applicationsdir = $(datadir)/applications
Vivien Kraus's avatar
Vivien Kraus committed
59
applications_DATA = %reldir%/eu.planete_kraus.Tarot.desktop
60
INDENTED =
61
TANGLED =
62
SUFFIXES =
Vivien Kraus's avatar
Vivien Kraus committed
63
64
dist_noinst_SCRIPTS = \
  autogen.sh \
Vivien Kraus's avatar
Vivien Kraus committed
65
  run-tarot.sh \
Vivien Kraus's avatar
Vivien Kraus committed
66
  git-version-gen
67
nodist_noinst_DATA =
Vivien Kraus's avatar
Vivien Kraus committed
68
69
VALGRIND_SUPPRESSION_FILE = \
  valgrind.supp
Vivien Kraus's avatar
Vivien Kraus committed
70
ENUM_HEADER_FILES =
71

Vivien Kraus's avatar
Vivien Kraus committed
72
ACLOCAL_AMFLAGS = -I m4 -I lib-library/m4 -I lib-program/m4
73
EXTRA_DIST = \
Vivien Kraus's avatar
Vivien Kraus committed
74
75
  tarot.org \
  setup.el \
Vivien Kraus's avatar
Vivien Kraus committed
76
  AUTHORS.org \
Vivien Kraus's avatar
Vivien Kraus committed
77
78
79
  lib-library/m4/gnulib-cache.m4 \
  $(top_srcdir)/.version \
  .gitlab-ci.yml \
Vivien Kraus's avatar
Vivien Kraus committed
80
81
82
  $(VALGRIND_SUPPRESSION_FILE) \
  eu.planete_kraus.Tarot.json \
  fix-libopts
Vivien Kraus's avatar
Vivien Kraus committed
83
84
BUILT_SOURCES = \
  $(top_srcdir)/.version
Vivien Kraus's avatar
Vivien Kraus committed
85
CLEANFILES =
86
AM_DISTCHECK_CONFIGURE_FLAGS = \
Vivien Kraus's avatar
Vivien Kraus committed
87
  --enable-silent-rules=yes \
Vivien Kraus's avatar
Vivien Kraus committed
88
  --disable-introspection \
89
  --disable-vala
90
AM_CPPFLAGS = \
Vivien Kraus's avatar
Vivien Kraus committed
91
92
  -DLOCALEDIR="\"$(localedir)\"" \
  -DSYSCONFDIR="\"$(sysconfdir)\"" \
Vivien Kraus's avatar
Vivien Kraus committed
93
  -I. -I$(srcdir) \
Vivien Kraus's avatar
Vivien Kraus committed
94
95
  -Ilib-library -I$(srcdir)/lib-library \
  -Ilib-program -I$(srcdir)/lib-program
96
AM_CFLAGS =
Vivien Kraus's avatar
Vivien Kraus committed
97
AM_YFLAGS = -d
Vivien Kraus's avatar
Vivien Kraus committed
98
AM_LIBS =
Vivien Kraus's avatar
Vivien Kraus committed
99
AM_LDADD =
100
AM_VALAFLAGS =
101
102
# Texinfo -> html flags, overriden in doc/Makefile.am
AM_MAKEINFOHTMLFLAGS =
103
TESTS =
104
105
AM_TESTS_ENVIRONMENT = \
  LANG="C" \
Vivien Kraus's avatar
Vivien Kraus committed
106
  LD_LIBRARY_PATH="src/.libs:$$LD_LIBRARY_PATH" \
107
108
109
110
  GUILE_AUTO_COMPILE=0 \
  GUILE_LOAD_PATH="$(srcdir)/src/scm:src/scm:$$GUILE_LOAD_PATH" \
  GUILE_COMPILED_LOAD_PATH="src/scm:$$GUILE_COMPILED_LOAD_PATH" \
  $(LIBTOOL) --mode=execute
111
if HAVE_VALGRIND
Vivien Kraus's avatar
Vivien Kraus committed
112
113
114
115
AM_TESTS_ENVIRONMENT += \
  $(VALGRIND) --tool=memcheck \
              --leak-check=full \
              --error-exitcode=42 \
Vivien Kraus's avatar
Vivien Kraus committed
116
117
              --suppressions=$(srcdir)/$(VALGRIND_SUPPRESSION_FILE) \
              --gen-suppressions=all
118
endif # HAVE_VALGRIND
119

Vivien Kraus's avatar
Vivien Kraus committed
120
121
122
123
TEST_EXTENSIONS = .tarot
TAROT_LOG_COMPILER = $(SHELL) $(top_srcdir)/run-tarot.sh
AM_TAROT_LOG_FLAGS =

Vivien Kraus's avatar
Vivien Kraus committed
124
include ci/Makefile.am
125
126
include doc/Makefile.am
include src/Makefile.am
Vivien Kraus's avatar
Vivien Kraus committed
127
include games/Makefile.am
Vivien Kraus's avatar
Vivien Kraus committed
128
include icon/Makefile.am
129

130
EXTRA_DIST += $(TANGLED) %reldir%/README.md %reldir%/README
131

132
TESTS += $(check_PROGRAMS)
133
134
indent_verbose = $(indent_verbose_@AM_V@)
indent_verbose_ = $(indent_verbose_@AM_DEFAULT_V@)
Vivien Kraus's avatar
Vivien Kraus committed
135
indent_verbose_0 = @echo "  INDENT   ";
136
137
.PHONY: indent
indent: $(INDENTED)
138
	$(indent_verbose) (cd $(srcdir) \
Vivien Kraus's avatar
Vivien Kraus committed
139
	  && for file in $(INDENTED); do $(INDENT) --no-tabs $$file; done)
140
141
142
org_verbose = $(org_verbose_@AM_V@)
org_verbose_ = $(org_verbose_@AM_DEFAULT_V@)
org_verbose_0 = @echo "ORG-EXPORT $@";
143
README.md: %reldir%/tarot.org
Vivien Kraus's avatar
Vivien Kraus committed
144
145
146
147
	$(org_verbose) ($(EMACS) \
	  --batch -q \
	  -l "$(srcdir)/setup.el" \
	  --file "$(srcdir)/tarot.org" \
148
149
150
	  -f org-md-export-to-markdown \
	  && mv "$(srcdir)/tarot.md" "$(srcdir)/README.md")
README: README.md
151
	$(AM_V_GEN) cp $(srcdir)/README.md $(srcdir)/README
Vivien Kraus's avatar
Vivien Kraus committed
152
AUTHORS: %reldir%/AUTHORS.org
Vivien Kraus's avatar
Vivien Kraus committed
153
154
155
	$(org_verbose) ($(EMACS) \
	  --batch -q \
	  -l "$(srcdir)/setup.el" \
Vivien Kraus's avatar
Vivien Kraus committed
156
	  --file "$(srcdir)/AUTHORS.org" \
Vivien Kraus's avatar
Vivien Kraus committed
157
	  -f org-ascii-export-to-ascii \
Vivien Kraus's avatar
Vivien Kraus committed
158
159
160
161
162
	  && mv "$(srcdir)/AUTHORS.txt" "$(srcdir)/AUTHORS")
$(top_srcdir)/.version:
	$(AM_V_GEN) echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
	$(AM_V_GEN) echo $(VERSION) > $(distdir)/.tarball-version