Hide the subtitle when it matches the title
[yelp.git] / libyelp / Makefile.am
blob73efd41dc4e31ad0b0e77f090fa2ef527847fa4f
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
4 # first.
5 install-exec-am: install-pkglibLTLIBRARIES install-libLTLIBRARIES
6 pkglib_LTLIBRARIES = libyelpcommon.la
8 libyelpcommon_la_SOURCES =      \
9         yelp-uri.c                  \
10         yelp-uri-builder.c          \
11         yelp-settings.c
13 libyelpcommon_la_CFLAGS =               \
14         $(WARN_CFLAGS)                          \
15         $(YELP_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 =      \
23         -avoid-version          \
24         -no-undefined
26 libyelpcommon_headers =               \
27         yelp-uri.h                  \
28         yelp-uri-builder.h          \
29         yelp-settings.h
31 libyelpcommon_includedir = $(includedir)/libyelp/
33 libyelpcommon_include_HEADERS = $(libyelpcommon_headers) yelp-common-types.h
35 BUILT_SOURCES =                  \
36         yelp-common-types.c             \
37         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 =                \
70         yelp-bookmarks.c            \
71         yelp-debug.c                \
72         yelp-error.c                \
73         yelp-docbook-document.c     \
74         yelp-document.c             \
75         yelp-help-list.c            \
76         yelp-info-document.c        \
77         yelp-info-parser.c          \
78         yelp-magic-decompressor.c   \
79         yelp-mallard-document.c     \
80         yelp-man-document.c         \
81         yelp-man-parser.c           \
82         yelp-marshal.c              \
83         yelp-search-entry.c         \
84         yelp-simple-document.c      \
85         yelp-sqlite-storage.c       \
86         yelp-storage.c              \
87         yelp-transform.c            \
88         yelp-types.c                \
89         yelp-view.c
91 EXTRA_DIST =                        \
92         yelp-bz2-decompressor.h     \
93         yelp-debug.h                \
94         yelp-error.h                \
95         yelp-info-parser.h          \
96         yelp-man-parser.h           \
97         yelp-lzma-decompressor.h    \
98         yelp-magic-decompressor.h   \
99         yelp-marshal.list
101 if ENABLE_LZMA
102 libyelp_la_SOURCES += yelp-lzma-decompressor.c
103 else
104 EXTRA_DIST += yelp-lzma-decompressor.c
105 endif
107 if ENABLE_BZ2
108 libyelp_la_SOURCES += yelp-bz2-decompressor.c
109 else
110 EXTRA_DIST += yelp-bz2-decompressor.c
111 endif
113 libyelp_la_CFLAGS =                             \
114         $(WARN_CFLAGS)                          \
115         $(YELP_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 =  \
124         $(YELP_LIBS)     \
125         libyelpcommon.la
127 libyelp_headers =                   \
128         yelp-bookmarks.h            \
129         yelp-docbook-document.h     \
130         yelp-document.h             \
131         yelp-help-list.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       \
138         yelp-storage.h              \
139         yelp-transform.h            \
140         yelp-view.h
142 libyelp_includedir = $(includedir)/libyelp/
144 libyelp_include_HEADERS = $(libyelp_headers) yelp-types.h
146 BUILT_SOURCES +=                 \
147         yelp-marshal.c           \
148         yelp-marshal.h           \
149         yelp-types.c             \
150         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)) > $@