1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
From 3dc5768c045c400ff522b8a510b789001aa93df4 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Fri, 4 Jan 2019 11:31:14 +0100
Subject: [PATCH 2/2] Make valadoc doclets & data parallel installable
---
libvaladoc/Makefile.am | 12 ++++++++++--
valadoc/Makefile.am | 7 ++++++-
valadoc/doclets/devhelp/Makefile.am | 11 ++++++++---
valadoc/doclets/gtkdoc/Makefile.am | 11 ++++++++---
valadoc/doclets/html/Makefile.am | 11 ++++++++---
valadoc/icons/Makefile.am | 4 ++++
valadoc/tests/Makefile.am | 7 ++++++-
7 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
index f3f790e76..86875631b 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -3,8 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
$(COVERAGE_CFLAGS) \
$(LIBGVC_CFLAGS) \
@@ -16,6 +14,16 @@ AM_CFLAGS = \
-I$(top_srcdir)/codegen \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += \
+ -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
+ -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += \
+ -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\" \
+ -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
AM_VALAFLAGS = \
$(NULL)
diff --git a/valadoc/Makefile.am b/valadoc/Makefile.am
index 33f3a9375..2f3dec848 100644
--- a/valadoc/Makefile.am
+++ b/valadoc/Makefile.am
@@ -9,7 +9,6 @@ SUBDIRS = \
$(NULL)
AM_CFLAGS = \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-I$(top_srcdir)/libvaladoc/ \
-I$(top_srcdir)/gee \
@@ -22,6 +21,12 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
BUILT_SOURCES = valadoc.vala.stamp
bin_PROGRAMS = valadoc
diff --git a/valadoc/doclets/devhelp/Makefile.am b/valadoc/doclets/devhelp/Makefile.am
index 5783c0b5a..afbb8f7f9 100644
--- a/valadoc/doclets/devhelp/Makefile.am
+++ b/valadoc/doclets/devhelp/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/devhelp
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/devhelp
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/devhelp
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/doclets/gtkdoc/Makefile.am b/valadoc/doclets/gtkdoc/Makefile.am
index 763e46932..f689018ce 100644
--- a/valadoc/doclets/gtkdoc/Makefile.am
+++ b/valadoc/doclets/gtkdoc/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/gtkdoc
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/gtkdoc
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/gtkdoc
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/doclets/html/Makefile.am b/valadoc/doclets/html/Makefile.am
index 885fbfbab..855184020 100644
--- a/valadoc/doclets/html/Makefile.am
+++ b/valadoc/doclets/html/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.common
NULL =
AM_CFLAGS = \
- -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\" \
-I$(top_srcdir)/gee/ \
-I$(top_srcdir)/vala/ \
-I$(top_srcdir)/libvaladoc/ \
@@ -12,12 +11,18 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc/icons/\"
+docletdir = $(libdir)/valadoc/doclets/html
+else
+AM_CFLAGS += -DPACKAGE_ICONDIR=\"$(datadir)/valadoc@PACKAGE_SUFFIX@/icons/\"
+docletdir = $(libdir)/valadoc@PACKAGE_SUFFIX@/doclets/html
+endif
+
BUILT_SOURCES = libdoclet.vala.stamp
doclet_LTLIBRARIES = libdoclet.la
-docletdir = $(libdir)/valadoc/doclets/html
-
libdoclet_la_LDFLAGS = -module -avoid-version -no-undefined
libdoclet_la_VALASOURCES = \
diff --git a/valadoc/icons/Makefile.am b/valadoc/icons/Makefile.am
index 454bdba7c..668956f3b 100644
--- a/valadoc/icons/Makefile.am
+++ b/valadoc/icons/Makefile.am
@@ -1,6 +1,10 @@
NULL =
+if ENABLE_UNVERSIONED
iconsdir = $(datadir)/valadoc/icons
+else
+iconsdir = $(datadir)/valadoc@PACKAGE_SUFFIX@/icons
+endif
dist_icons_DATA = \
abstractclass.png \
diff --git a/valadoc/tests/Makefile.am b/valadoc/tests/Makefile.am
index e40cc1ca3..2bca58128 100644
--- a/valadoc/tests/Makefile.am
+++ b/valadoc/tests/Makefile.am
@@ -22,7 +22,6 @@ check-TESTS: $(TESTS)
G_DEBUG=fatal_warnings $(builddir)/driver
AM_CFLAGS = \
- -DPACKAGE_DATADIR=\"$(libdir)/valadoc\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
-DTOP_SRC_DIR=\"$(abs_top_srcdir)\" \
-I$(top_srcdir)/libvaladoc/ \
@@ -36,6 +35,12 @@ AM_CFLAGS = \
$(LIBGVC_CFLAGS) \
$(NULL)
+if ENABLE_UNVERSIONED
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc\"
+else
+AM_CFLAGS += -DPACKAGE_DATADIR=\"$(libdir)/valadoc@PACKAGE_SUFFIX@\"
+endif
+
BUILT_SOURCES = driver.vala.stamp
check_PROGRAMS = driver
--
2.20.1
|