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
|
pod_dir = $(top_srcdir)/pod
version_file = $(top_srcdir)/doc/Version.pm
timestamp = $(srcdir)/timestamp
htmldir = $(datadir)/doc/$(PACKAGE)/html
imagedir = $(datadir)/doc/$(PACKAGE)/html/images
if BUILDDOCS
# List of all files that are built by the doc system
# This is a pain because for non-GNU Make (like on BSD) must specify
# the srcdir for these targets, which means they must be separated by
# directory -- and that means need to write things twice below. All has to do with VPATH...
targets = \
$(srcdir)/CHANGES.html \
$(srcdir)/INSTALL.html \
$(srcdir)/README.html \
$(srcdir)/SWISH-3.0.html \
$(srcdir)/SWISH-BUGS.html \
$(srcdir)/SWISH-CONFIG.html \
$(srcdir)/SWISH-FAQ.html \
$(srcdir)/SWISH-LIBRARY.html \
$(srcdir)/SWISH-RUN.html \
$(srcdir)/SWISH-SEARCH.html \
$(srcdir)/API.html \
$(srcdir)/spider.html \
$(srcdir)/swish.html \
$(srcdir)/search.html \
$(srcdir)/Filter.html \
$(srcdir)/style.css \
$(srcdir)/index.html \
$(srcdir)/index_long.html
image_targets = \
$(srcdir)/images/dotrule1.gif \
$(srcdir)/images/swish2b.gif \
$(srcdir)/images/swish2.gif \
$(srcdir)/images/swishbanner1.gif \
$(srcdir)/images/swish.gif
endif
# These are the source files -- if any are newer than the timestamp
# then the docs need to be rebuilt
source_files = \
$(pod_dir)/CHANGES.pod \
$(pod_dir)/INSTALL.pod \
$(pod_dir)/README.pod \
$(pod_dir)/SWISH-3.0.pod \
$(pod_dir)/SWISH-BUGS.pod \
$(pod_dir)/SWISH-CONFIG.pod \
$(pod_dir)/SWISH-FAQ.pod \
$(pod_dir)/SWISH-LIBRARY.pod \
$(pod_dir)/SWISH-RUN.pod \
$(pod_dir)/SWISH-SEARCH.pod \
$(top_srcdir)/perl/API.pm \
$(top_srcdir)/prog-bin/spider.pl.in \
$(top_srcdir)/example/swish.cgi.in \
$(top_srcdir)/example/search.cgi.in \
$(top_srcdir)/filters/SWISH/Filter.pm.in
# Extra files for creating the search page for the docs:
search_doc_files = \
.htaccess \
searchdoc.html \
.swishcgi.conf \
swish.conf \
split.pl
# These are what get installed -- they will also be
# a dependency of the all-am target (because of _DATA)
html_DATA = $(targets) $(search_doc_files)
image_DATA = $(image_targets)
# These are all placed in the distribution
EXTRA_DIST = $(targets) $(image_targets) $(source_files) $(timestamp) $(search_doc_files)
## Here's the work
if BUILDDOCS
# Deal with missing targets - which is the case in a fresh CVS checkout
# Automake automatically adds this target by the "html_DATA" entry above
# Touch the time-stamp, but make it very old so any source_file will be newer
# (is touch -t portable?)
$(targets) $(image_targets):
@touch -t 197001010000 $(timestamp)
# Make sure the version is up to date -- the version is in configure.in
$(version_file): $(top_srcdir)/configure.in
@echo "updating version file $(version_file) = $(VERSION)"
@echo 'package SWISHE::Doc;$$VERSION=q[$(VERSION)];1' > $(version_file)
@touch -t 197001010000 $(timestamp)
# Need some way to have make check the source files against the timestamp
all-local: $(version_file) $(timestamp)
# If any source files are *newer* than the timestamp then
# run the "build_docs" program, and then update the timestamp
$(timestamp) : $(source_files)
@(cd $(top_srcdir)/doc && bin/build -f)
@touch $(timestamp)
endif
# @(cd $(htmldir) && $(PERL) split.pl | $(bindir)/swish-e$(EXEEXT) -S prog -i stdin -c swish.conf -v0)
# Target to build searchable HTML docs
searchdoc :
cp $(libexecdir)/swish.cgi $(htmldir)
( cd $(htmldir) && \
$(PERL) split.pl | $(bindir)/swish-e$(EXEEXT) -S prog -i stdin -c swish.conf && \
$(PERL) -i.orig -pe 's{<!-- SEARCH -->}{<center>[<a target="_parent" href="searchdoc.html">Search The Documentation</a>]</center>}' index.html index_long.html)
|