Imported Upstream version 1.0.10
[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 # The lib/Headers.mk stuff should come after all optional stuff.
16 include $(top_srcdir)/lib/Headers.mk
17 headers += $(libfribidi_la_headers)
18 includepath += -I$(top_builddir)/lib -I$(top_srcdir)/lib
19 includevpath += :$(top_builddir)/lib:$(top_srcdir)/lib
20 # The las two lines are not functions, we don't want them here.
21 inst_symbols += $(shell sed '$$d' $(top_srcdir)/lib/fribidi.def | sed '$$d')
22
23 dist_man_MANS += $(inst_symbols:=.3)
24 dist_noinst_MANS += $(noinst_symbols:=.3)
25 EXTRA_DIST += c2man.stamp
26 MOSTLYCLEANFILES += c2man.stamp.tmp
27 MAINTAINERCLEANFILES += $(man3) c2man.stamp
28
29 man3 = $(dist_man_MANS) $(dist_noinst_MANS)
30
31 C2MANFLAGS = $(includepath) \
32                 -D__FRIBIDI_DOC \
33                 -DDONT_HAVE_FRIBIDI_CONFIG_H \
34                 -M "Programmer's Manual" 
35
36 VPATH += $(includevpath)
37
38 c2man.stamp: $(headers)
39         @$(RM) $@.tmp
40         @touch $@.tmp
41         @($(LN_S) $^ . || cp $^ .)
42         @echo Running c2man
43         @$(top_srcdir)/missing --run c2man -T n $(C2MANFLAGS) $(headers) 2>&1 \
44         || true
45         @$(RM) $(headers)
46         @mv $@.tmp $@
47
48 $(man3): c2man.stamp
49         @if ! test -f $@; then \
50                 $(RM) $<; \
51                 $(MAKE) $(AM_MAKEFLAGS) $<;\
52         fi
53         @touch $@
54
55 -include $(top_srcdir)/git.mk