Makefile.am 33.7 KB
Newer Older
1

2
# Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
3
# Laboratory (LRDE).
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena.  If not, see <http://www.gnu.org/licenses/>.
#

20
21
# FIXME: To be overhauled! (See ticket #134).

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
# Look for Milena header in srcdir and for (generated) test headers
# (like data.hh) in builddir.
AM_CPPFLAGS =						\
  -I$(top_srcdir)/milena -I$(top_builddir)/milena	\
  -I$(top_srcdir)/milena/doc/tutorial/tools

## FIXME: Upercase variables should be reserved for special names:
## classical Make variables (e.g. `CXXFLAGS') Automake variables
## (e.g. `SUBDIRS'), etc.
##
## Moreover, do we really need all these variables?  See how things
## evolve during the refurbishing of the build system in doc/.
DOC_SRCDIR = $(top_srcdir)/milena/doc
OUTPUTS_SRCDIR = $(DOC_SRCDIR)/outputs
SPLIT_OUTPUTS_SRCDIR = $(OUTPUTS_SRCDIR)/split
FIGURES_SRCDIR = $(DOC_SRCDIR)/figures
EXAMPLES_SRCDIR = $(DOC_SRCDIR)/examples
SPLIT_EXAMPLES_SRCDIR = $(EXAMPLES_SRCDIR)/split
IMG_SRCDIR = $(DOC_SRCDIR)/img

# FIXME: Adjust when $(DOC_SRCDIR) is renamed or removed.
#
# FIXME: Careful, `doc_dir' is close to `docdir', which is reserved by
# Automake.  Change this name?
doc_dir = $(DOC_SRCDIR)
Guillaume Lazzara's avatar
Guillaume Lazzara committed
47
48

DOXYGEN = doxygen
49

50
51
DOXYFILE = Doxyfile

52
53
54
55
# Initialiaze variables.
EXTRA_DIST =
dist_doc_DATA =
CLEANFILES =
56
MAINTAINERCLEANFILES =
57

58
59
# FIXME: Simplify all of this.  ``Devel'' targets are really
# secondary.  And we probably don't need so much target aliases!
60

61
62
63
.PHONY: doc						\
	doc-user doc-devel				\
	doc-pdf doc-html doc-devel-pdf doc-devel-html	\
64
65
	ref-doc ref-doc-pdf				\
	ref-doc-devel ref-doc-devel-pdf
66

67
doc: doc-user doc-devel
68

69
70
doc-user: doc-pdf doc-html
doc-devel: doc-devel-pdf doc-devel-html
71

72
doc-pdf: tutorial-pdf white-paper-pdf ref-guide-pdf ref-doc-pdf
73

74
doc-html: tutorial-html white-paper-html ref-guide-html ref-doc
75

76
doc-devel-pdf: tutorial-pdf ref-guide-pdf white-paper-pdf ref-doc-devel-pdf
77

78
doc-devel-html: tutorial-html ref-guide-html white-paper-html \
79
		ref-doc-devel
80

81

82
83
84
85
86
87
88
89
90
91
92
## --------------------- ##
## LaTeX configuration.  ##
## --------------------- ##

include $(top_srcdir)/build-aux/tex.mk

# FIXME: Check this list.
TEXI2DVI_FLAGS +=							\
  -I $(DOC_SRCDIR) -I $(OUTPUTS_SRCDIR) -I $(SPLIT_OUTPUTS_SRCDIR)	\
  -I $(IMG_SRCDIR) -I $(SPLIT_EXAMPLES_SRCDIR)

93
94
95
96
# Additional files for HeVeA compilations.
DOC_PACKAGES = $(srcdir)/doxyfuns.sty $(srcdir)/milena.sty


97
98
99
100
## ----------------------- ##
## Doxygen documentation.  ##
## ----------------------- ##

101
102
103
# FIXME: Check these dependencies.
# 1. They might be redundant.
# 2. It'd be better to depend on actual files rather than timestamps
104
#    corresponding to a bunch of files.
105
106
107
108
109
110
111
refman_dependencies =				\
  $(srcdir)/split-examples.stamp		\
  $(srcdir)/split-outputs.stamp			\
  $(srcdir)/figures.stamp			\
  $(srcdir)/tutorial/tutorial.hh		\
  $(srcdir)/ref_guide/ref_guide.hh

112
113
114
# ----------------------- #
# User reference manual.  #
# ----------------------- #
115

116
all-local: $(srcdir)/$(USER_REFMAN) $(srcdir)/$(USER_REFMAN_PDF)
117

118
119
120
121
122
# Run "make regen-doc" to forcefully rebuild the Doxygen documentation.
.PHONY: regen-doc
regen-doc:
	-rm -f $(srcdir)/user-refman.stamp
	$(MAKE) $(AM_MAKEFLAGS) $(srcdir)/user-refman.stamp
123

124
DOXYFILE_USER = Doxyfile_user
125

Roland Levillain's avatar
Roland Levillain committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Sed is used to generate Doxyfile from Doxyfile.in instead of
# configure, because the former is way faster than the latter.
#
## FIXME: This is because, as in TC, we depend on $Id$ from the
## ChangeLog.  Maybe we should depend from something less prone to
## change.  See Bison's build system.
edit = sed -e "s|@ID@|$$Id|"					\
	   -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'		\
	   -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g'	\
	   -e 's,@top_srcdir\@,$(top_srcdir),g'			\
	   -e 's,@top_builddir\@,$(top_builddir),g'		\
	   -e 's,@srcdir\@,$(srcdir),g'				\
	   -e 's,@builddir\@,$(builddir),g'

$(DOXYFILE_USER): $(srcdir)/$(DOXYFILE).in
	Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog	\
	      | sed -e 's/\\\$$//g'`;				\
	  $(edit) $< >$@

145
## FIXME: Rename USER_REFMAN_PDF to something else?
146
USER_REFMAN_PDF = user-refman.pdf
147
## FIXME: Likewise?
148
USER_REFMAN = user-refman
149

150
ref-doc-pdf: $(srcdir)/$(USER_REFMAN_PDF)
151
ref-doc: $(srcdir)/$(USER_REFMAN)
152
153
154
155

# FIXME: Use texi2dvi instead of Doxygen's generated Makefile?
# (The LaTeX to PDF rule could be factored using a suffix rule, as in
# LRDE's share/).
156
157
158
$(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
	cd $(srcdir)/$(USER_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
	cp -f $(srcdir)/$(USER_REFMAN)/latex/refman.pdf $@
159

160
161
162
163
164
## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
## rule?  Does Doxygen make a copy of figures, or does it generate
## LaTeX inputs relying on the existence of such figures in the
## initial location?  Investigate.
$(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(refman_dependencies)
165
166
	@rm -f $@.tmp
	@touch $@.tmp
167
	-rm -rf $(USER_REFMAN).tmp
168
169
	$(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_USER)
	$(DOXYGEN) $(DOXYFILE_USER)
170
171
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
172
	test -f $(USER_REFMAN).tmp/latex/refman.tex
173
174
	-rm -rf $(srcdir)/$(USER_REFMAN)
## FIXME: Moving directories between file systems is not portable.
175
	mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
176
177
	@mv -f $@.tmp $@

178
$(srcdir)/$(USER_REFMAN): $(srcdir)/user-refman.stamp
179
180
181
182
183
184
## Recover from the removal of $@
	@if test -d $@; then :; else \
	  rm -f $<; \
	  $(MAKE) $(AM_MAKEFLAGS) $<; \
	fi

185
186
187
# ---------------------------- #
# Developer reference manual.  #
# ---------------------------- #
188

189
190
191
192
193
194
# Run "make regen-devel-doc" to forcefully rebuild the Doxygen
# developer documentation.
.PHONY: regen-devel-doc
regen-devel-doc:
	-rm -f $(srcdir)/devel-refman.stamp
	$(MAKE) $(AM_MAKEFLAGS) $(srcdir)/devel-refman.stamp
195

196
DOXYFILE_DEVEL = Doxyfile_devel
197

Roland Levillain's avatar
Roland Levillain committed
198
edit_devel = sed							      \
199
  -e 's,OUTPUT_DIRECTORY       = @builddir@/user-refman.tmp/,OUTPUT_DIRECTORY       = @builddir@/devel-refman.tmp/,' \
Roland Levillain's avatar
Roland Levillain committed
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
  -e 's,EXTRACT_ALL            = NO,EXTRACT_ALL            = YES,'	      \
  -e 's,EXTRACT_PRIVATE        = NO,EXTRACT_PRIVATE        = YES,'	      \
  -e 's,EXTRACT_STATIC         = NO,EXTRACT_STATIC         = YES,'	      \
  -e 's,EXTRACT_LOCAL_CLASSES  = NO,EXTRACT_LOCAL_CLASSES  = YES,'	      \
  -e 's,HIDE_UNDOC_MEMBERS     = YES,HIDE_UNDOC_MEMBERS     = NO,'	      \
  -e 's,HIDE_UNDOC_CLASSES     = YES,HIDE_UNDOC_CLASSES     = NO,'	      \
  -e 's,HIDE_FRIEND_COMPOUNDS  = YES,HIDE_FRIEND_COMPOUNDS  = NO,'	      \
  -e 's,HIDE_IN_BODY_DOCS      = YES,HIDE_IN_BODY_DOCS      = NO,'	      \
  -e 's,INTERNAL_DOCS          = NO,INTERNAL_DOCS          = YES,'	      \
  -e 's,GENERATE_TODOLIST      = NO,GENERATE_TODOLIST      = YES,'	      \
  -e 's,PROJECT_NUMBER         = \"User documentation ,PROJECT_NUMBER         = \",'	 \
  -e 's,EXCLUDE_SYMBOLS	       = \*::internal\* \*_ mln::trait::\*,EXCLUDE_SYMBOLS	       =,'

$(DOXYFILE_DEVEL): $(srcdir)/$(DOXYFILE).in
	rm -f $@.tmp
	Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog	\
	      | sed -e 's/\\\$$//g'`;				\
	  $(edit) $< >$@.tmp
	$(edit_devel) $@.tmp >$@
	rm -f $@.tmp

221
222
223
## FIXME: Rename DEVEL_REFMAN_PDF to something else?
DEVEL_REFMAN_PDF = devel-refman-pdf
## FIXME: Likewise?
224
DEVEL_REFMAN = devel-refman
225

226
ref-doc-devel-pdf: $(srcdir)/$(DEVEL_REFMAN_PDF)
227
ref-doc-devel: $(srcdir)/$(DEVEL_REFMAN)
228

229
230
231
232
# Be warned, most LaTeX installations will not be able to compile the
# PDF development documentation as-is, as TeX's default memory
# capacities are usually too small to handle such a large document.
#
233
234
235
## FIXME: Use texi2dvi instead of Doxygen's generated Makefile?  (The
## LaTeX to PDF rule could be factored using a suffix rule, as in
## LRDE's share/).
236
237
238
$(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
	cd $(srcdir)/$(DEVEL_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
	cp -f $(srcdir)/$(DEVEL_REFMAN)/latex/refman.pdf $@
239

240
241
242
243
244
## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
## rule?  Does Doxygen make a copy of figures, or does it generate
## LaTeX inputs relying on the existence of such figures in the
## initial location?  Investigate.
$(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(refman_dependencies)
245
246
	@rm -f $@.tmp
	@touch $@.tmp
247
	-rm -rf $(DEVEL_REFMAN).tmp
248
249
	$(MAKE) $(AM_MAKE_FLAGS) $(DOXYFILE_DEVEL)
	$(DOXYGEN) $(DOXYFILE_DEVEL)
250
251
## Doxygen may generate an incomplete output and exit with success!
## Check some files before deeming the output as acceptable.
252
	test -f $(DEVEL_REFMAN).tmp/latex/refman.tex
253
254
	-rm -rf $(srcdir)/$(DEVEL_REFMAN)
## FIXME: Moving directories between file systems is not portable.
255
	mv $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
256
257
	@mv -f $@.tmp $@

258
$(srcdir)/$(DEVEL_REFMAN): $(srcdir)/devel-refman.stamp
259
260
261
262
263
264
265
266
267
## Recover from the removal of $@
	@if test -d $@; then :; else \
	  rm -f $<; \
	  $(MAKE) $(AM_MAKEFLAGS) $<; \
	fi


# Clean Doxygen products.
maintainer-clean-local:
268
269
	-rm -rf $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
	-rm -rf $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
270
271
272
273
274
275
	-rm -f $(EXAMPLES_BUILDDIR)/*.cc
# FIXME: If we remove a *directory*, we are supposed to know how to
# recreate it later.  I doubt our rules are all currently able to
# handle this.  See how `make maintainer-clean all' behaves.
	-rm -rf $(OUTPUTS_BUILDDIR)
	-rm -rf $(FIGURES_BUILDDIR)
276

Guillaume Lazzara's avatar
Guillaume Lazzara committed
277

278
279
280
281
## ------------------------- ##
## Technical Documentation.  ##
## ------------------------- ##

282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
.PHONY: technical technical-html technical-pdf

technical: technical-html technical-pdf

technical_dir = $(doc_dir)/technical

# FIXME: Check these dependencies.  And it'd be better to depend on
# actual files rather than timestamps corresponding to a bunch of
# files.
technical_dependencies = $(doc_dir)/figures.stamp

# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
#   FOO = $(srcdir)/foo.pdf
#   $(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# we should use:
#
#   FOO = foo.pdf
#   $(srcdir)/$(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# since it minimizes installation issues (see milena/doc/Makefile.am
# and Vaucanson's doc/Makefile.am).

# FIXME: Distributed products should be generated in the source dir.
# That's actually the case, *but* the current solution is not clean
# and might break sometimes.  The clean approach is to create a
# temporary directory, try to generate the documentation there, and
# move its contents to the source dir in case of success.  If the
# product is a directory, also refresh a timestamp (in the source
# dir).

317
318
319
320
321
322
323
324
325
326
## FIXME: technical technical.hh does not seem to be used (by the
## Doyxgen documentation); remove its generation? Careful,
## technical/technical.html *is* probably required, though.

TECHNICAL_HTML = $(technical_dir)/technical.html
$(TECHNICAL_HTML): $(technical_dir)/technical.tex $(technical_dependencies)
	hevea -O -fix $(DOC_PACKAGES) $< -o $@

dist_doc_DATA += $(TECHNICAL_HTML)

327
328
329
330
331
332
333
# Intermediate product for the various doc targets of the parent
# directory.
#
# This is not a bug: TECHNICAL_HH is meant to have a `.hh'
# extension, since it is later parsed by Doxygen, which complains
# about `.html' files.
TECHNICAL_HH = $(technical_dir)/technical.hh
334
335
# FIXME: Careful, technical-html depends on $(TECHNICAL_HH), not
# $(TECHNICAL_HTML).  Anyway, this shortcut should vanish soon.
336
technical-html: $(TECHNICAL_HH)
337
$(TECHNICAL_HH): $(TECHNICAL_HTML) $(doc_dir)/tools/todoxygen.sh
338
339
340
341
342
343
	$(doc_dir)/tools/todoxygen.sh $< $(technical_dir) $(doc_dir)


# Final product.
TECHNICAL_PDF = $(technical_dir)/technical.pdf
technical-pdf: $(TECHNICAL_PDF)
344
345
# Extra dependencies.
$(TECHNICAL_PDF): $(technical_dependencies)
346
347
348
349
350
351
352

dist_doc_DATA += $(TECHNICAL_PDF)

EXTRA_DIST +=					\
  $(technical_dir)/technical.tex		\
  $(TECHNICAL_HH)

353
CLEANFILES += $(technical_dir)/technical.haux
354

355

356
357
358
359
## ---------- ##
## Tutorial.  ##
## ---------- ##

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
.PHONY: tutorial tutorial-html tutorial-pdf

tutorial: tutorial-html tutorial-pdf

tutorial_dir = $(doc_dir)/tutorial

# FIXME: Check these dependencies.
# 1. They might be redundant.
# 2. It'd be better to depend on actual files rather than timestamps
#    corresponding to a bunch of files.
tutorial_dependencies =				\
  $(doc_dir)/split-examples.stamp		\
  $(doc_dir)/split-outputs.stamp		\
  $(doc_dir)/figures.stamp

# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
#   FOO = $(srcdir)/foo.pdf
#   $(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# we should use:
#
#   FOO = foo.pdf
#   $(srcdir)/$(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# since it minimizes installation issues (see milena/doc/Makefile.am
# and Vaucanson's doc/Makefile.am).

# FIXME: Distributed products should be generated in the source dir.
# That's actually the case, *but* the current solution is not clean
# and might break sometimes.  The clean approach is to create a
# temporary directory, try to generate the documentation there, and
# move its contents to the source dir in case of success.  If the
# product is a directory, also refresh a timestamp (in the source
# dir).

399
400
401
402
403
404
TUTORIAL_HTML = $(tutorial_dir)/tutorial.html
$(TUTORIAL_HTML): $(tutorial_dir)/tutorial.tex $(tutorial_dependencies)
	hevea -O -fix $(DOC_PACKAGES) $< -o $@

dist_doc_DATA += $(TUTORIAL_HTML)

405
406
407
408
409
410
411
# Intermediate product for the various doc targets of the parent
# directory.
#
# This is not a bug: TUTORIAL_HH is meant to have a `.hh' extension,
# since it is later parsed by Doxygen, which complains about `.html'
# files.
TUTORIAL_HH = $(tutorial_dir)/tutorial.hh
412
413
# FIXME: Careful, tutorial-html depends on $(TUTORIAL_HH), not
# $(TUTORIAL_HTML).  Anyway, this shortcut should vanish soon.
414
tutorial-html: $(TUTORIAL_HH)
415
$(TUTORIAL_HH): $(TUTORIAL_HTML) $(doc_dir)/tools/todoxygen.sh
416
417
	$(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)

418

419
420
421
# Final product.
TUTORIAL_PDF = $(tutorial_dir)/tutorial.pdf
tutorial-pdf: $(TUTORIAL_PDF)
422
423
# Extra dependencies.
$(TUTORIAL_PDF): $(tutorial_dependencies)
424
425
426
427
428
429
430

dist_doc_DATA += $(TUTORIAL_PDF)

EXTRA_DIST +=					\
  $(tutorial_dir)/tutorial.tex			\
  $(TUTORIAL_HH)

431
# FIXME: Why is $(TUTORIAL_HH) listed here?  It should be
432
433
# automatically cleaned.  I'm not sure either about the rest of
# CLEANFILES.
434
CLEANFILES += $(tutorial_dir)/tutorial.haux
435

436

437
438
439
440
## ------------- ##
## White Paper.  ##
## ------------- ##

441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
.PHONY: white-paper white-paper-html white-paper-pdf

white_paper_dir = $(doc_dir)/white_paper

PNGS =								\
  $(white_paper_dir)/figures/house.png				\
  $(white_paper_dir)/figures/house_rag.png			\
  $(white_paper_dir)/figures/house_wshed.png			\
  $(white_paper_dir)/figures/house_wshed_mean_colors.png

EPSS = $(PNGS:png=eps)

# FIXME: we want to check if 'figures' exists only once!
.png.eps:
	test -d figures || mkdir figures
	convert $< $@


white-paper: white-paper-pdf white-paper-html

# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
#   FOO = $(srcdir)/foo.pdf
#   $(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# we should use:
#
#   FOO = foo.pdf
#   $(srcdir)/$(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# since it minimizes installation issues (see milena/doc/Makefile.am
# and Vaucanson's doc/Makefile.am).

# FIXME: Distributed products should be generated in the source dir.
# That's actually the case, *but* the current solution is not clean
# and might break sometimes.  The clean approach is to create a
# temporary directory, try to generate the documentation there, and
# move its contents to the source dir in case of success.  If the
# product is a directory, also refresh a timestamp (in the source
# dir).

# FIXME: Use texi2dvi/TeX4ht instead of plain hevea.
486
# FIXME: Why is WHITE_PAPER_HTML generated in a subdirectory?
487
488
489
490
491
WHITE_PAPER_HTML = $(white_paper_dir)/white_paper_html/index.html
white-paper-html: $(WHITE_PAPER_HTML)
$(WHITE_PAPER_HTML): $(white_paper_dir)/white_paper.tex $(EPSS)
	test -d $(white_paper_dir)/white_paper_html	\
	  || mkdir $(white_paper_dir)/white_paper_html
492
	TEXINPUTS="$(DOC_SRCDIR):$(white_paper_dir):" hevea -O -fix $< -o $@
493
494
495
496
497
	$(doc_dir)/tools/clearbanner.sh $@


WHITE_PAPER_PDF = $(white_paper_dir)/white_paper.pdf
white-paper-pdf: $(WHITE_PAPER_PDF)
498
499
# Extra dependencies.
$(WHITE_PAPER_PDF): $(PNGS)
500
501
502
503
504
505
506
507
508
509

dist_doc_DATA +=				\
  $(WHITE_PAPER_HTML)				\
  $(WHITE_PAPER_PDF)

EXTRA_DIST +=					\
  $(white_paper_dir)/white_paper.tex		\
  $(PNGS)					\
  $(EPSS)

510
CLEANFILES += $(EPSS)
511
512

clean-local:
513
	-rm -rf $(white_paper_dir)/white_paper_html
514

515

516
517
518
519
## ----------------- ##
## Reference Guide.  ##
## ----------------- ##

520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
.PHONY: ref-guide ref-guide-html ref-guide-pdf

ref-guide: ref-guide-html ref-guide-pdf

ref_guide_dir = $(doc_dir)/ref_guide

# FIXME: Check these dependencies.
# 1. They might be redundant.
# 2. It'd be better to depend on actual files rather than timestamps
#    corresponding to a bunch of files.
ref_guide_dependencies =			\
  $(doc_dir)/split-examples.stamp		\
  $(doc_dir)/split-outputs.stamp		\
  $(doc_dir)/figures.stamp

# FIXME: As in milena/doc/Makefile.am, we should probably strip
# $(srcdir) prefixes from target variables, e.g. instead of:
#
#   FOO = $(srcdir)/foo.pdf
#   $(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# we should use:
#
#   FOO = foo.pdf
#   $(srcdir)/$(FOO): foo.tex bar.tex
#   dist_doc_DATA = $(FOO)
#
# since it minimizes installation issues (see milena/doc/Makefile.am
# and Vaucanson's doc/Makefile.am).

# FIXME: Distributed products should be generated in the source dir.
# That's actually the case, *but* the current solution is not clean
# and might break sometimes.  The clean approach is to create a
# temporary directory, try to generate the documentation there, and
# move its contents to the source dir in case of success.  If the
# product is a directory, also refresh a timestamp (in the source
# dir).

559
560
561
562
563
564
REF_GUIDE_HTML = $(ref_guide_dir)/ref_guide.html
$(REF_GUIDE_HTML): $(ref_guide_dir)/ref_guide.tex $(ref_guide_dependencies)
	hevea -O -fix $(DOC_PACKAGES) $< -o $@

dist_doc_DATA += $(REF_GUIDE_HTML)

565
566
567
568
569
570
571
# Intermediate product for the various doc targets of the parent
# directory.
#
# This is not a bug: REF_GUIDE_HH is meant to have a `.hh' extension,
# since it is later parsed by Doxygen, which complains about `.html'
# files.
REF_GUIDE_HH = $(ref_guide_dir)/ref_guide.hh
572
573
# FIXME: Careful, ref-guide-html depends on $(REF_GUIDE_HH), not
# $(REF_GUIDE_HTML).  Anyway, this shortcut should vanish soon.
574
ref-guide-html: $(REF_GUIDE_HH)
575
$(REF_GUIDE_HH): $(REF_GUIDE_HTML) $(doc_dir)/tools/todoxygen.sh
576
577
578
579
580
581
	$(doc_dir)/tools/todoxygen.sh $< $(ref_guide_dir) $(doc_dir)


# Final product.
REF_GUIDE_PDF = $(ref_guide_dir)/ref_guide.pdf
ref-guide-pdf: $(REF_GUIDE_PDF)
582
583
# Extra dependencies.
$(REF_GUIDE_PDF): $(ref_guide_dependencies)
584
585
586
587
588
589
590

dist_doc_DATA += $(REF_GUIDE_PDF)

EXTRA_DIST +=					\
  $(ref_guide_dir)/ref_guide.tex		\
  $(REF_GUIDE_HH)

591
592
593
CLEANFILES +=					\
  $(ref_guide_dir)/ref_guide.haux		\
  $(ref_guide_dir)/ref_guide.htoc
Guillaume Lazzara's avatar
Guillaume Lazzara committed
594
595


596
597
598
## --------- ##
## Figures.  ##
## --------- ##
599

600
601
602
603
$(srcdir)/figures/figures.mk: $(srcdir)/headers.stamp
include $(srcdir)/figures/figures.mk

EXTRA_DIST += figures.stamp
604
605
606
607
608
609
610
611
$(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
	rm -f $@.tmp
	touch $@.tmp
	failcom='exit 1';						\
	list="$(FIGURES_SRCDIR)/*.p*m"; for img in $$list; do		\
	  echo "Converting $$img to PNG";				\
	  name=`basename $$img`						\
	  ext=`echo $$name | cut -d '.' -f 2`;				\
Guillaume Lazzara's avatar
Guillaume Lazzara committed
612
	  convert -scale 250 -bordercolor black -border 2x2 $$img 	\
613
	    $(FIGURES_SRCDIR)/`basename $$img $$ext`png			\
614
615
616
	    || eval $$failcom;						\
	done
	mv -f $@.tmp $@
Guillaume Lazzara's avatar
Guillaume Lazzara committed
617

618

619
620
621
622
## ---------- ##
## Examples.  ##
## ---------- ##

623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
PROGRAMS_examples =		\
  accu-right-instanciation 	\
  borderthickness 		\
  box2d-bbox 			\
  domain-display 		\
  dpoint-1 			\
  estim-sites 			\
  extend 			\
  extension-ignore 		\
  fill 				\
  fill-call-1			\
  fill-imageif-cfun 		\
  fill-part-image 		\
  fill-subdomain 		\
  fill-subdomain-shorter	\
  first_routine 		\
  forall-piter  		\
  fun-p2v-1 			\
  graph-data 			\
  graph-iter 			\
  ima-has 			\
  ima-save 			\
  ima-size 			\
  ima2d-1 			\
  ima2d-2 			\
  ima2d-3 			\
  ima2d-4 			\
  ima2d-5 			\
  ima2d-6-clone			\
  ima2d-7 			\
  ima2d-rot 			\
  labeling-compute 		\
  logical-not 			\
  mln_var 			\
  parray-append 		\
  parray-bbox 			\
  paste 			\
  paste-call-1 			\
  point-1 			\
  predicate-1 			\
  win-create-1 			\
  win-create-2

PROGRAMS_examples += 	\
  tuto2_first_image 		\
  tuto3_rw_image 		\
  tuto4_genericity_and_algorithms

# Tuto3
PROGRAMS_examples += 	\
  tuto3_colorize 		\
  tuto3_println 		\
  tuto3_trace

# Tuto4
PROGRAMS_examples += 	\
  tuto4_point2d			\
  tuto4_site_set_create

EXTRA_PROGRAMS = $(PROGRAMS_examples)
CLEANFILES += $(PROGRAMS_examples)

# FIXME: Careful, this will only work if this file is included by
# `milena/doc/Makefile.am', since `examples/' is a subdirectory of
# `milena/doc/'.  Anyway, this file is to be eventually inlined in
# `milena/doc/Makefile.am', so this is not a big deal.
accu_right_instanciation_SOURCES = examples/accu-right-instanciation.cc
borderthickness_SOURCES = examples/borderthickness.cc
box2d_bbox_SOURCES = examples/box2d-bbox.cc
domain_display_SOURCES = examples/domain-display.cc
dpoint_1_SOURCES = examples/dpoint-1.cc
estim_sites_SOURCES = examples/estim-sites.cc
extend_SOURCES = examples/extend.cc
extension_ignore_SOURCES = examples/extension-ignore.cc
fill_SOURCES = examples/fill.cc
fill_call_1_SOURCES = examples/fill-call-1.cc
fill_imageif_cfun_SOURCES = examples/fill-imageif-cfun.cc
fill_part_image_SOURCES = examples/fill-part-image.cc
fill_subdomain_SOURCES = examples/fill-subdomain.cc
fill_subdomain_shorter_SOURCES = examples/fill-subdomain-shorter.cc
first_routine_SOURCES = examples/tuto3/first_routine.cc
forall_piter_SOURCES = examples/forall-piter.cc
fun_p2v_1_SOURCES = examples/fun-p2v-1.cc
graph_data_SOURCES = examples/graph-data.cc
graph_iter_SOURCES = examples/graph-iter.cc
ima2d_1_SOURCES = examples/ima2d-1.cc
ima2d_2_SOURCES = examples/ima2d-2.cc
ima2d_3_SOURCES = examples/ima2d-3.cc
ima2d_4_SOURCES = examples/ima2d-4.cc
ima2d_5_SOURCES = examples/ima2d-5.cc
ima2d_6_clone_SOURCES = examples/ima2d-6-clone.cc
ima2d_7_SOURCES = examples/ima2d-7.cc
ima2d_rot_SOURCES = examples/ima2d-rot.cc
ima_has_SOURCES = examples/ima-has.cc
ima_save_SOURCES = examples/ima-save.cc
ima_size_SOURCES = examples/ima-size.cc
labeling_compute_SOURCES = examples/labeling-compute.cc
logical_not_SOURCES = examples/logical-not.cc
mln_var_SOURCES = examples/mln_var.cc
parray_append_SOURCES = examples/parray-append.cc
parray_bbox_SOURCES = examples/parray-bbox.cc
paste_SOURCES = examples/paste.cc
paste_call_1_SOURCES = examples/paste-call-1.cc
point_1_SOURCES = examples/point-1.cc
predicate_1_SOURCES = examples/predicate-1.cc
win_create_1_SOURCES = examples/win-create-1.cc
win_create_2_SOURCES = examples/win-create-2.cc

tuto2_first_image_SOURCES = examples/tuto2_first_image.cc
tuto3_rw_image_SOURCES = examples/tuto3_rw_image.cc
tuto4_genericity_and_algorithms_SOURCES = examples/tuto4_genericity_and_algorithms.cc

# Tuto 3
tuto3_colorize_SOURCES = examples/tuto3/colorize.cc
tuto3_println_SOURCES = examples/tuto3/println.cc
tuto3_trace_SOURCES = examples/tuto3/trace.cc

# Tuto 4
tuto4_point2d_SOURCES = examples/tuto4/point2d.cc
tuto4_site_set_create_SOURCES = examples/tuto4/site_set_create.cc


# FIXME: Try to avoid the use an extensive list: either use Make's
# substitution rules or generate it.  Actually this list is already
# generated (see outputs/outputs.mk).
OUTPUTS =						\
  $(srcdir)/outputs/accu-right-instanciation.txt	\
  $(srcdir)/outputs/borderthickness.txt			\
  $(srcdir)/outputs/box2d-bbox.txt			\
  $(srcdir)/outputs/domain-display.txt			\
  $(srcdir)/outputs/dpoint-1.txt			\
  $(srcdir)/outputs/estim-sites.txt			\
  $(srcdir)/outputs/extend.txt				\
  $(srcdir)/outputs/extension-ignore.txt		\
  $(srcdir)/outputs/fill-call-1.txt			\
  $(srcdir)/outputs/fill-imageif-cfun.txt		\
  $(srcdir)/outputs/fill-part-image.txt			\
  $(srcdir)/outputs/fill-subdomain-shorter.txt		\
  $(srcdir)/outputs/fill-subdomain.txt			\
  $(srcdir)/outputs/fill.txt				\
  $(srcdir)/outputs/first_routine.txt			\
  $(srcdir)/outputs/forall-piter.txt			\
  $(srcdir)/outputs/fun-p2v-1.txt			\
  $(srcdir)/outputs/graph-data.txt			\
  $(srcdir)/outputs/graph-iter.txt			\
768
769
770
  $(srcdir)/outputs/ima-has.txt				\
  $(srcdir)/outputs/ima-save.txt			\
  $(srcdir)/outputs/ima-size.txt			\
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
  $(srcdir)/outputs/ima2d-1.txt				\
  $(srcdir)/outputs/ima2d-2.txt				\
  $(srcdir)/outputs/ima2d-3.txt				\
  $(srcdir)/outputs/ima2d-4.txt				\
  $(srcdir)/outputs/ima2d-5.txt				\
  $(srcdir)/outputs/ima2d-6-clone.txt			\
  $(srcdir)/outputs/ima2d-7.txt				\
  $(srcdir)/outputs/ima2d-rot.txt			\
  $(srcdir)/outputs/labeling-compute.txt		\
  $(srcdir)/outputs/logical-not.txt			\
  $(srcdir)/outputs/mln_var.txt				\
  $(srcdir)/outputs/parray-append.txt			\
  $(srcdir)/outputs/parray-bbox.txt			\
  $(srcdir)/outputs/paste-call-1.txt			\
  $(srcdir)/outputs/paste.txt				\
  $(srcdir)/outputs/point-1.txt				\
  $(srcdir)/outputs/predicate-1.txt			\
  $(srcdir)/outputs/tuto2_first_image.txt		\
  $(srcdir)/outputs/tuto3_colorize.txt			\
  $(srcdir)/outputs/tuto3_println.txt			\
  $(srcdir)/outputs/tuto3_rw_image.txt			\
  $(srcdir)/outputs/tuto3_trace.txt			\
  $(srcdir)/outputs/tuto4_genericity_and_algorithms.txt	\
  $(srcdir)/outputs/tuto4_point2d.txt			\
  $(srcdir)/outputs/tuto4_site_set_create.txt		\
  $(srcdir)/outputs/win-create-1.txt			\
  $(srcdir)/outputs/win-create-2.txt

799
800
801
802
803
804
805
806
807
808
809
810
811
## FIXME: These outpouts are also required by the (LaTeX)
## documentation.  However, they have no corresponding program in
## examples/, hence they cannot be regenerated.  Are they hand-made
## outputs?  Or maybe outputs of which program has been removed since?
MORE_OUTPUTS =					\
  $(srcdir)/outputs/graph-output-1.txt		\
  $(srcdir)/outputs/ima2d-display-1.txt		\
  $(srcdir)/outputs/ima2d-display-2.txt		\
  $(srcdir)/outputs/ima2d-display-output-1.txt	\
  $(srcdir)/outputs/ima2d-display-output-2.txt	\
  $(srcdir)/outputs/parray-display-1.txt	\
  $(srcdir)/outputs/win-create-1-display.txt

812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
$(DOC_SRCDIR)/examples-outputs.mk: $(DOC_SRCDIR)/gen-examples-outputs-mk $(srcdir)/Makefile.am
	$(DOC_SRCDIR)/gen-examples-outputs-mk $(PROGRAMS_examples) >$@.tmp
	mv -f $@.tmp $@
	chmod -w $@
include $(DOC_SRCDIR)/examples-outputs.mk

MAINTAINERCLEANFILES += $(OUTPUTS)

# FIXME: Warning: $(SPLIT_EXAMPLES_SRCDIR) might not exist.  Ensure it
# exists.

# FIXME: Try to avoid the use an extensive list: either use Make's
# substitution rules or generate it.
EXAMPLES =						\
  $(srcdir)/examples/accu-right-instanciation.cc	\
  $(srcdir)/examples/borderthickness.cc			\
  $(srcdir)/examples/box2d-bbox.cc			\
  $(srcdir)/examples/domain-display.cc			\
  $(srcdir)/examples/dpoint-1.cc			\
  $(srcdir)/examples/estim-sites.cc			\
  $(srcdir)/examples/extend.cc				\
  $(srcdir)/examples/extension-ignore.cc		\
  $(srcdir)/examples/fill-call-1.cc			\
  $(srcdir)/examples/fill-imageif-cfun.cc		\
  $(srcdir)/examples/fill-part-image.cc			\
  $(srcdir)/examples/fill-subdomain-shorter.cc		\
  $(srcdir)/examples/fill-subdomain.cc			\
  $(srcdir)/examples/fill.cc				\
  $(srcdir)/examples/forall-piter.cc			\
  $(srcdir)/examples/fun-p2v-1.cc			\
  $(srcdir)/examples/graph-data.cc			\
  $(srcdir)/examples/graph-iter.cc			\
  $(srcdir)/examples/ima-has.cc				\
  $(srcdir)/examples/ima-load.cc			\
846
  $(srcdir)/examples/ima-save.cc			\
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
  $(srcdir)/examples/ima-size.cc			\
  $(srcdir)/examples/ima2d-1.cc				\
  $(srcdir)/examples/ima2d-2.cc				\
  $(srcdir)/examples/ima2d-3.cc				\
  $(srcdir)/examples/ima2d-4.cc				\
  $(srcdir)/examples/ima2d-5.cc				\
  $(srcdir)/examples/ima2d-6-clone.cc			\
  $(srcdir)/examples/ima2d-7.cc				\
  $(srcdir)/examples/ima2d-rot.cc			\
  $(srcdir)/examples/labeling-compute.cc		\
  $(srcdir)/examples/logical-not.cc			\
  $(srcdir)/examples/mln_var.cc				\
  $(srcdir)/examples/parray-append.cc			\
  $(srcdir)/examples/parray-bbox.cc			\
  $(srcdir)/examples/paste-call-1.cc			\
  $(srcdir)/examples/paste.cc				\
  $(srcdir)/examples/point-1.cc				\
  $(srcdir)/examples/predicate-1.cc			\
  $(srcdir)/examples/trash/accu.cc			\
  $(srcdir)/examples/trash/box.cc			\
  $(srcdir)/examples/trash/cpp_issue.cc			\
  $(srcdir)/examples/trash/erosion.cc			\
  $(srcdir)/examples/trash/for_Z.cc			\
  $(srcdir)/examples/trash/graph.cc			\
  $(srcdir)/examples/trash/image2d.cc			\
  $(srcdir)/examples/trash/image_flat.cc		\
  $(srcdir)/examples/trash/image_if.cc			\
  $(srcdir)/examples/trash/image_plain.cc		\
  $(srcdir)/examples/trash/image_safe.cc		\
  $(srcdir)/examples/trash/labeling_algo.cc		\
  $(srcdir)/examples/trash/mk_graph.cc			\
  $(srcdir)/examples/trash/p_array.2.cc			\
  $(srcdir)/examples/trash/p_array.cc			\
  $(srcdir)/examples/trash/p_image.cc			\
  $(srcdir)/examples/trash/p_key.2.cc			\
  $(srcdir)/examples/trash/p_key.cc			\
  $(srcdir)/examples/trash/p_line2d.cc			\
  $(srcdir)/examples/trash/p_mutable_array_of.cc	\
  $(srcdir)/examples/trash/p_queue.cc			\
  $(srcdir)/examples/trash/p_run.cc			\
  $(srcdir)/examples/trash/p_vaccess.cc			\
  $(srcdir)/examples/trash/proxy.cc			\
  $(srcdir)/examples/trash/sub_image.cc			\
  $(srcdir)/examples/trash/sub_image_if.cc		\
  $(srcdir)/examples/trash/tuto_bis.cc			\
  $(srcdir)/examples/trash/tuto_one.cc			\
  $(srcdir)/examples/trash/vec.cc			\
  $(srcdir)/examples/trash/win_multiple.cc		\
  $(srcdir)/examples/trash/window.cc			\
  $(srcdir)/examples/tuto2_first_image.cc		\
  $(srcdir)/examples/tuto3/colorize.cc			\
  $(srcdir)/examples/tuto3/first_routine.cc		\
  $(srcdir)/examples/tuto3/println.cc			\
  $(srcdir)/examples/tuto3/trace.cc			\
  $(srcdir)/examples/tuto3_rw_image.cc			\
  $(srcdir)/examples/tuto4/image.cc			\
  $(srcdir)/examples/tuto4/point2d.cc			\
  $(srcdir)/examples/tuto4/site_set_create.cc		\
  $(srcdir)/examples/tuto4_genericity_and_algorithms.cc	\
  $(srcdir)/examples/win-create-1.cc			\
  $(srcdir)/examples/win-create-2.cc

# FIXME: Place split files in their own directory, e.g.: split
# `examples/foo.cc' into `examples/split/foo.dir/foo-1.cc',
# `examples/split/foo.dir/foo-2.cc', etc.  It makes removal of these
# files easier.  We probably also nee a stamp file to keep track of
# dependencies.

# FIXME: Loops are bad, as they prevent parallelism.  And we prefer
# data-driven actions anyway.  This would imply that we know in
# advance the list out outputs (here, split examples).  Maybe we can
# infer it from the LaTeX document.
$(srcdir)/split-examples.stamp: $(EXAMPLES)
	@rm -f $@.tmp
	@touch $@.tmp
	failcom='exit 1';				\
	for file in $(EXAMPLES); do			\
	  $(DOC_SRCDIR)/tools/split_sample.sh		\
	      $$file cc raw $(SPLIT_EXAMPLES_SRCDIR)	\
	    || eval $$failcom;				\
	done
	@mv -f $@.tmp $@

# FIXME: Loops are bad, as they prevent parallelism.  And we prefer
# data-driven actions anyway.  This would imply that we know in
# advance the list out outputs (here, split outputs).  Maybe we can
# infer it from the LaTeX document.
$(srcdir)/split-outputs.stamp: $(OUTPUTS)
	@rm -f $@.tmp
	@touch $@.tmp
	failcom='exit 1';				\
	for file in $(OUTPUTS); do			\
	  $(DOC_SRCDIR)/tools/split_sample.sh		\
	      $$file txt "" $(SPLIT_OUTPUTS_SRCDIR)	\
	    || eval $$failcom;				\
	done
	@mv -f $@.tmp $@

945

946
# Regen Make helpers.
947
EXTRA_DIST += generate_dist_files.sh headers.stamp
948
include $(top_srcdir)/build-aux/regen-recursive.mk
949
950
## FIXME: It'd probably be better to separate the rules generating
## examples/examples.mk, outputs/outputs.mk and figures/figures.mk.
951
952
953
regen-am:
	@rm -f $(srcdir)/headers.stamp.tmp
	@touch $(srcdir)/headers.stamp.tmp
954
955
956
957
	@cd $(srcdir) && 				\
	  ./generate_dist_files.sh figures 'p*m' && 	\
	  ./generate_dist_files.sh outputs txt &&	\
	  ./generate_dist_files.sh examples cc.raw
958
	@mv -f $(srcdir)/headers.stamp.tmp $(srcdir)/headers.stamp
959
## FIXME: Regen examples-outputs.mk as well?
Guillaume Lazzara's avatar
Guillaume Lazzara committed
960
961
962
963
964
965
966
967

$(srcdir)/examples/examples.mk: $(srcdir)/headers.stamp
$(srcdir)/outputs/outputs.mk: $(srcdir)/headers.stamp


$(srcdir)/headers.stamp: $(srcdir)/generate_dist_files.sh
	@rm -f $@.tmp
	@touch $@.tmp
968
969
970
971
	@cd $(srcdir) && 				\
	  ./generate_dist_files.sh figures 'p*m' && 	\
	  ./generate_dist_files.sh outputs txt &&	\
	  ./generate_dist_files.sh examples cc.raw
Guillaume Lazzara's avatar
Guillaume Lazzara committed
972
973
974
975
976
977
	@mv -f $@.tmp $@


include $(srcdir)/examples/examples.mk
include $(srcdir)/outputs/outputs.mk

978

979
980
981
982
983
## -------------- ##
## Installation.  ##
## -------------- ##

# PDF.
984
dist_doc_DATA += $(USER_REFMAN_PDF)
985

986
# HTML.
987
# Installing a directory located in the source dir is not supported by
988
# Automake by default, so we cannot add `$(USER_REFMAN)/html' to
989
990
# `dist_doc_DATA'.  The following two rules are are workaround from
# the Vaucanson project.
991
EXTRA_DIST += $(USER_REFMAN)/html
992
993
994
995
996

# We install by hand, otherwise Automake produces "install .../srcdoc
# .../srcdoc", which installs our dir into the previous one, instead
# of replacing it.
install-data-local:
997
	rm -rf $(DESTDIR)$(htmldir)/$(USER_REFMAN)/html
998
	$(mkdir_p) $(DESTDIR)$(htmldir)
999
	cp -r $(srcdir)/$(USER_REFMAN)/html $(DESTDIR)$(htmldir)/user-refman
1000
## Try GNU chmod's X mode before resorting to something slower but