aboutsummaryrefslogtreecommitdiff
path: root/gfsm/gfsm/doc/libgfsm/Makefile.am
blob: ff92d8a0b06e0b22dbb46cb044e7774b6fef1dbc (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
## File: doc/libX/Makefile.am
## Package: *
## Description:
##   + automake file for library documentation subdir
##
## Process this file with Automake to create Makefile.in.
##-----------------------------------------------------------------------

SUFFIXES = .doxy .stamp .tag .log

##-----------------------------------------------------------------------
## Literals
##-----------------------------------------------------------------------

LIBBASE=libgfsm
LIBCSS=$(LIBBASE).css

##-----------------------------------------------------------------------
## Conditional targets
##-----------------------------------------------------------------------

DOXY_MAN3_MANS=
DOXY_HTML_STATIC=
DOXY_INSTALL_SUBDIRS=
DOXY_LATEX_TARGETS=

if HAVE_DOXYGEN

if DOC_WANT_MAN
DOXY_MAN3_MANS +=man/man3/*
endif

if DOC_WANT_HTML
DOXY_HTML_STATIC     +=$(LIBCSS)
DOXY_INSTALL_SUBDIRS +=html
endif

##-- LaTeX
if DOC_WANT_LATEX
if DOC_WANT_DVI
DOXY_LATEX_TARGETS +=refman.dvi
endif
if DOC_WANT_PS
DOXY_LATEX_TARGETS +=refman.ps
endif

if DOC_WANT_PDF
DOXY_LATEX_TARGETS +=refman.pdf
endif
endif
##--/DOC_WANT_LATEX

endif
##--/HAVE_DOXYGEN

##-----------------------------------------------------------------------
## Primaries: documentation (real)
##-----------------------------------------------------------------------

## --- recursion subdirectories
#SUBDIRS =

## --- doxygen hack: doxy config files
DOXYBASE = $(LIBBASE)
DOXYFILE = $(DOXYBASE).doxy

## --- doxygen hack: doxy stamp files: dependencies
STAMPFILE = $(DOXYFILE:.doxy=.stamp)
TAGFILE   = $(DOXYFILE:.doxy=.tag)

## -- section 3 manpages
man3_MANS = $(DOXY_MAN3_MANS)

all-local: $(STAMPFILE)

#-----------------------------------------------------------------------
# doxygen hack: sources
#-----------------------------------------------------------------------

## -- directories for prerequisite-search
DOXY_INCLUDES = $(top_srcdir)/src/libgfsm $(top_builddir)/src/libgfsm
vpath %.h $(DOXY_INCLUDES)

DOXY_INPUTS = \
	mainpage.dox \
	$(foreach dir,$(DOXY_INCLUDES),$(wildcard $(dir)/*.h))

#-----------------------------------------------------------------------
# Additional dependencies
#-----------------------------------------------------------------------

## --- doxygen hacks: dependencies
DOXY_FILTER_DEPS=

if HAVE_DOXY_FILTER
DOXY_FILTER_DEPS += doxy-filter.cfg
endif

if HAVE_DOXYGEN
$(man3_MANS): $(STAMPFILE)

$(STAMPFILE): $(DOXY_INPUTS) $(DOXY_FILTER_DEPS)
endif


#-----------------------------------------------------------------------
# doxygen hack: build rules (recurse in this directory)
#-----------------------------------------------------------------------
doxy-filter.cfg:
	echo '$$config_cppflags .= "-C -x c $(patsubst %,-I%,$(DOXY_INCLUDES))";' > $@
	echo '$$config_cpp    = "$(CPP)";' >> $@
	echo '$$config_tmpdir = "$(PWD)";' >> $@
	echo '1;' >> $@

builddir ?= $(top_builddir)/doc/libgfsm

if HAVE_DOXYGEN
.doxy.stamp: $(DOXY_FILTER_DEPS) @srcdir@/$(LIBCSS)
	$(DOXYGEN) $<
if DOC_WANT_LATEX
	if test \( -n "$(DOXY_LATEX_TARGETS)" -a -d ./latex \) ; then \
	  for t in $(DOXY_LATEX_TARGETS); do \
	    $(MAKE) -i -C ./latex $$t ;\
	  done;\
	fi
endif
##--/DOC_WANT_LATEX
if DOC_WANT_HTML
	if test \( -d "$(builddir)html" \) ; then \
	  $(INSTALL_DATA) @srcdir@/$(LIBCSS) $(builddir)html/$(LIBCSS) ;\
	fi
endif
##--/DOC_WANT_HTML
else
##--!HAVE_DOXYGEN
.doxy.stamp:
	@echo "-------------------------------------------------------------------"
	@echo "doxygen support disabled:"
	@echo "not building library documentation from $(DOXYFILE)"
	@echo "-------------------------------------------------------------------"
endif
	touch $@
##--/HAVE_DOXYGEN

#-----------------------------------------------------------------------
# Variables: cleanup
#-----------------------------------------------------------------------

## --- mostlyclean: built by 'make' & commonly rebuilt
#MOSTLYCLEANFILES =

## --- clean:  built by 'make'
CLEANFILES = $(STAMPFILE) $(TAGFILE) $(DOXYBASE).log \
	doxy-filter.log \
	doxy-filter.cfg

clean-local:
	rm -rf html latex man

## --- distclean: built by 'configure'
#DISTCLEANFILES =

## -- maintainerclean: built by maintainer / by hand
MAINTAINERCLEANFILES = \
	*~ .*~ Makefile Makefile.in \
	$(DOXYFILE) $(DOXYFILE:.doxy=.log)

##-----------------------------------------------------------------------
## installation rules: local
##-----------------------------------------------------------------------
.PHONY: install-data-local install-doc-sub install-latex-sub

##-- always install the .doxy file
pkgdoclib_DATA = $(DOXYBASE).doxy


if HAVE_DOXYGEN

pkgdoclib_DATA +=$(DOXYBASE).tag

$(DOXYBASE).tag: $(STAMPFILE)

install-data-local:
	if test -n "$(DOXY_INSTALL_SUBDIRS)"; then \
	  $(MAKE) $(AM_MAKEFLAGS) install-doc-sub ;\
	fi

install-doc-sub:
	  $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(DOXYBASE)
	  for d in $(DOXY_INSTALL_SUBDIRS) ; do \
	    if test -d "$$d" ; then \
	      $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(DOXYBASE)/$$d ;\
	      (cd $$d ;\
	       for f in * ; do \
	        $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdocdir)/$(DOXYBASE)/$$d/$$f ;\
	       done) ;\
	    fi ;\
	  done

if DOC_WANT_LATEX
if DOC_WANT_DVI
pkgdoclib_DATA += latex/refman.dvi
endif
if DOC_WANT_PS
pkgdoclib_DATA += latex/refman.ps
endif
if DOC_WANT_PDF
pkgdoclib_DATA += latex/refman.pdf
endif
endif
##--/DOC_WANT_LATEX

endif
##--/HAVE_DOXYGEN

#-----------------------------------------------------------------------
# Variables: distribution
#-----------------------------------------------------------------------

## --- extra distribution files
EXTRA_DIST = \
	doxy-filter.perl \
	mainpage.dox \
	$(LIBCSS) \
	libgfsm-header.html

## --- recursion subdirectories for 'make dist'
#DIST_SUBDIRS =

#-----------------------------------------------------------------------
# Rules: cleanup
#-----------------------------------------------------------------------
.PHONY: cvsclean

cvsclean: maintainer-clean ;