update to 0.19.5
[platform/upstream/fribidi.git] / doc / Makefile.am
1 dist_man_MANS =
2 dist_noinst_MANS =
3 EXTRA_DIST =
4 MOSTLYCLEANFILES =
5 MAINTAINERCLEANFILES =
6
7 # man3
8
9 includepath =
10 includevpath =
11 headers =
12 inst_symbols =
13 noinst_symbols =
14
15 include $(top_srcdir)/charset/Headers.mk
16 headers += $(libfribidi_char_sets_la_headers)
17 includepath += -I$(top_srcdir)/charset
18 includevpath += :$(top_srcdir)/charset
19 if FRIBIDI_CHARSETS
20 inst_symbols += $(libfribidi_char_sets_la_symbols)
21 else # !FRIBIDI_CHARSETS
22 noinst_symbols += $(libfribidi_char_sets_la_symbols)
23 endif # !FRIBIDI_CHARSETS
24
25 # The lib/Headers.mk stuff should come after all optional stuff.
26 include $(top_srcdir)/lib/Headers.mk
27 headers += $(libfribidi_la_headers)
28 includepath += -I$(top_builddir)/lib -I$(top_srcdir)/lib
29 includevpath += :$(top_builddir)/lib:$(top_srcdir)/lib
30 inst_symbols += $(libfribidi_la_symbols)
31
32 dist_man_MANS += $(inst_symbols:=.3)
33 dist_noinst_MANS += $(noinst_symbols:=.3)
34 EXTRA_DIST += c2man.stamp
35 MOSTLYCLEANFILES += c2man.stamp.tmp
36 MAINTAINERCLEANFILES += $(man3) c2man.stamp
37
38 man3 = $(dist_man_MANS) $(dist_noinst_MANS)
39
40 C2MANFLAGS = $(includepath) \
41                 -D__FRIBIDI_DOC \
42                 -DDONT_HAVE_FRIBIDI_CONFIG_H \
43                 -M "Programmer's Manual" \
44                 -m "$(PACKAGE_NAME) $(PACKAGE_VERSION)"
45
46 VPATH += $(includevpath)
47
48 c2man.stamp: $(headers)
49         @$(RM) $@.tmp
50         @touch $@.tmp
51         @($(LN_S) $^ . || cp $^ .)
52         @echo Running c2man
53         @$(top_srcdir)/missing --run c2man -T n $(C2MANFLAGS) $(headers) 2>&1 \
54         || true
55         @$(RM) $(headers)
56         @mv $@.tmp $@
57
58 $(man3): c2man.stamp
59         @if ! test -f $@; then \
60                 $(RM) $<; \
61                 $(MAKE) $(AM_MAKEFLAGS) $<;\
62         fi
63         @touch $@
64
65 -include $(top_srcdir)/git.mk