summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: d9d5c021e1f54669183458fce63b441226ab049c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
dist_man_MANS =
dist_noinst_MANS =
EXTRA_DIST =
MOSTLYCLEANFILES =
MAINTAINERCLEANFILES =

# man3

includepath =
includevpath =
headers =
inst_symbols =
noinst_symbols =

include $(top_srcdir)/charset/Headers.mk
headers += $(libfribidi_char_sets_la_headers)
includepath += -I$(top_srcdir)/charset
includevpath += :$(top_srcdir)/charset
if FRIBIDI_CHARSETS
inst_symbols += $(libfribidi_char_sets_la_symbols)
else # !FRIBIDI_CHARSETS
noinst_symbols += $(libfribidi_char_sets_la_symbols)
endif # !FRIBIDI_CHARSETS

# The lib/Headers.mk stuff should come after all optional stuff.
include $(top_srcdir)/lib/Headers.mk
headers += $(libfribidi_la_headers)
includepath += -I$(top_builddir)/lib -I$(top_srcdir)/lib
includevpath += :$(top_builddir)/lib:$(top_srcdir)/lib
# The las two lines are not functions, we don't want them here.
inst_symbols += $(shell head -n -2 $(top_srcdir)/lib/fribidi.def)

dist_man_MANS += $(inst_symbols:=.3)
dist_noinst_MANS += $(noinst_symbols:=.3)
EXTRA_DIST += c2man.stamp
MOSTLYCLEANFILES += c2man.stamp.tmp
MAINTAINERCLEANFILES += $(man3) c2man.stamp

man3 = $(dist_man_MANS) $(dist_noinst_MANS)

C2MANFLAGS = $(includepath) \
		-D__FRIBIDI_DOC \
		-DDONT_HAVE_FRIBIDI_CONFIG_H \
		-M "Programmer's Manual" 

VPATH += $(includevpath)

c2man.stamp: $(headers)
	@$(RM) $@.tmp
	@touch $@.tmp
	@($(LN_S) $^ . || cp $^ .)
	@echo Running c2man
	@$(top_srcdir)/missing --run c2man -T n $(C2MANFLAGS) $(headers) 2>&1 \
	|| true
	@$(RM) $(headers)
	@mv $@.tmp $@

$(man3): c2man.stamp
	@if ! test -f $@; then \
		$(RM) $<; \
		$(MAKE) $(AM_MAKEFLAGS) $<;\
	fi
	@touch $@

-include $(top_srcdir)/git.mk