1 # Libtool is utterly broken when it comes to ordering library dependencies.
2 # Hack around this awfulness: https://lists.gnu.org/archive/html/libtool/2004-10/msg00051.html
3 # As libyelp depends on libyelpcommon, force libyelpcommon to be installed
5 install-exec-am: install-pkglibLTLIBRARIES install-libLTLIBRARIES
6 pkglib_LTLIBRARIES = libyelpcommon.la
8 libyelpcommon_la_SOURCES = \
13 libyelpcommon_la_CFLAGS = \
16 -Wno-deprecated-declarations \
17 -DDATADIR=\""$(datadir)"\" \
18 -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\"
21 libyelpcommon_la_LIBADD = $(YELP_LIBS)
22 libyelpcommon_la_LDFLAGS = \
26 libyelpcommon_headers = \
31 libyelpcommon_includedir = $(includedir)/libyelp/
33 libyelpcommon_include_HEADERS = $(libyelpcommon_headers) yelp-common-types.h
39 yelp-common-types.h: $(libyelpcommon_headers)
40 $(AM_V_GEN) (cd $(srcdir) && glib-mkenums \
41 --fhead "#ifndef __LIBYELPCOMMON_TYPES_H__\n" \
42 --fhead "#define __LIBYELPCOMMON_TYPES_H__\n\n" \
43 --fhead "#include <glib-object.h>\n\n" \
44 --fhead "G_BEGIN_DECLS\n\n" \
45 --ftail "G_END_DECLS\n\n" \
46 --ftail "#endif /* __LIBYELPCOMMON_TYPES_H__ */\n" \
47 --fprod "#include \"@filename@\"\n" \
48 --eprod "#define YELP_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
49 --eprod "GType @enum_name@_get_type (void);\n" \
50 $(libyelpcommon_headers)) > $@
52 yelp-common-types.c: $(libyelpcommon_headers)
53 $(AM_V_GEN) (cd $(srcdir) && glib-mkenums \
54 --fhead "#include <glib-object.h>\n" \
55 --fhead "#include \"yelp-types.h\"\n\n" \
56 --fprod "\n/* enumerations from \"@filename@\" */" \
57 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
58 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
59 --vtail " { 0, NULL, NULL }\n};\n\n" \
60 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
61 --vtail " static GType type = 0;\n\n" \
62 --vtail " if (!type)\n" \
63 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
64 --vtail " return type;\n}\n\n" \
65 $(libyelpcommon_headers)) > $@
67 lib_LTLIBRARIES = libyelp.la
69 libyelp_la_SOURCES = \
73 yelp-docbook-document.c \
76 yelp-info-document.c \
78 yelp-magic-decompressor.c \
79 yelp-mallard-document.c \
84 yelp-simple-document.c \
85 yelp-sqlite-storage.c \
92 yelp-bz2-decompressor.h \
97 yelp-lzma-decompressor.h \
98 yelp-magic-decompressor.h \
102 libyelp_la_SOURCES += yelp-lzma-decompressor.c
104 EXTRA_DIST += yelp-lzma-decompressor.c
108 libyelp_la_SOURCES += yelp-bz2-decompressor.c
110 EXTRA_DIST += yelp-bz2-decompressor.c
113 libyelp_la_CFLAGS = \
116 -Wno-deprecated-declarations \
117 -DDATADIR=\""$(datadir)"\" \
118 -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\"
120 libyelp_la_CPPFLAGS = \
121 -DYELP_WEB_EXTENSIONS_DIR=\""$(pkglibdir)/"web-extensions\"
123 libyelp_la_LIBADD = \
129 yelp-docbook-document.h \
132 yelp-info-document.h \
133 yelp-mallard-document.h \
134 yelp-man-document.h \
135 yelp-search-entry.h \
136 yelp-simple-document.h \
137 yelp-sqlite-storage.h \
142 libyelp_includedir = $(includedir)/libyelp/
144 libyelp_include_HEADERS = $(libyelp_headers) yelp-types.h
152 yelp-marshal.h: yelp-marshal.list
153 $(AM_V_GEN) glib-genmarshal --prefix=yelp_marshal $(srcdir)/yelp-marshal.list --header $< > $@
155 yelp-marshal.c: yelp-marshal.list
156 $(AM_V_GEN) glib-genmarshal --prefix=yelp_marshal $(srcdir)/yelp-marshal.list --header --body $< > $@
158 CLEANFILES = $(BUILT_SOURCES)
160 yelp-types.h: $(libyelp_headers)
161 $(AM_V_GEN) (cd $(srcdir) && glib-mkenums \
162 --fhead "#ifndef __LIBYELP_TYPES_H__\n" \
163 --fhead "#define __LIBYELP_TYPES_H__\n\n" \
164 --fhead "#include <glib-object.h>\n\n" \
165 --fhead "G_BEGIN_DECLS\n\n" \
166 --ftail "G_END_DECLS\n\n" \
167 --ftail "#endif /* __LIBYELP_TYPES_H__ */\n" \
168 --fprod "#include \"@filename@\"\n" \
169 --eprod "#define YELP_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
170 --eprod "GType @enum_name@_get_type (void);\n" \
171 $(libyelp_headers)) > $@
173 yelp-types.c: $(libyelp_headers)
174 $(AM_V_GEN) (cd $(srcdir) && glib-mkenums \
175 --fhead "#include <glib-object.h>\n" \
176 --fhead "#include \"yelp-types.h\"\n\n" \
177 --fprod "\n/* enumerations from \"@filename@\" */" \
178 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
179 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
180 --vtail " { 0, NULL, NULL }\n};\n\n" \
181 --vtail "GType\n@enum_name@_get_type (void)\n{\n" \
182 --vtail " static GType type = 0;\n\n" \
183 --vtail " if (!type)\n" \
184 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
185 --vtail " return type;\n}\n\n" \
186 $(libyelp_headers)) > $@