Imported Upstream version 1.0.2
[platform/upstream/fribidi.git] / doc / Makefile.am
1 dist_man_MANS =
2 dist_noinst_MANS =
3 EXTRA_DIST =
4 MOSTLYCLEANFILES =
5 MAINTAINERCLEANFILES =
6
7 if FRIBIDI_ENABLE_DOC
8 # man3
9
10 includepath =
11 includevpath =
12 headers =
13 inst_symbols =
14 noinst_symbols =
15
16 # The lib/Headers.mk stuff should come after all optional stuff.
17 include $(top_srcdir)/lib/Headers.mk
18 headers += $(libfribidi_la_headers)
19 includepath += -I$(top_builddir)/lib -I$(top_srcdir)/lib
20 includevpath += :$(top_builddir)/lib:$(top_srcdir)/lib
21 # The las two lines are not functions, we don't want them here.
22 inst_symbols += $(shell sed '$$d' $(top_srcdir)/lib/fribidi.def | sed '$$d')
23
24 dist_man_MANS += $(inst_symbols:=.3)
25 dist_noinst_MANS += $(noinst_symbols:=.3)
26 EXTRA_DIST += c2man.stamp
27 MOSTLYCLEANFILES += c2man.stamp.tmp
28 MAINTAINERCLEANFILES += $(man3) c2man.stamp
29
30 man3 = $(dist_man_MANS) $(dist_noinst_MANS)
31
32 C2MANFLAGS = $(includepath) \
33                 -D__FRIBIDI_DOC \
34                 -DDONT_HAVE_FRIBIDI_CONFIG_H \
35                 -M "Programmer's Manual" 
36
37 VPATH += $(includevpath)
38
39 c2man.stamp: $(headers)
40         @$(RM) $@.tmp
41         @touch $@.tmp
42         @($(LN_S) $^ . || cp $^ .)
43         @echo Running c2man
44         @$(C2MAN) -T n $(C2MANFLAGS) $(headers) 2>&1
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 endif # FRIBIDI_ENABLE_DOC
56
57 -include $(top_srcdir)/git.mk