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
|
# Makefile for swish-e Documentation
#
# $Id: Makefile.in,v 1.20 2003/04/08 00:32:30 whmoseley Exp $
#
# Any suggestions to improve this makefile are welcome -- Bill Moseley swish@hank.org
#
# To Do: get a portable way to use "echo -e"
prefix = @prefix@
mandir = @mandir@/man1
datadir = @datadir@
VERSION = @VERSION@
SHELL = @SHELL@
top_srcdir = @top_srcdir@
INSTALL = @INSTALL@
POD2MAN = @POD2MAN@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
docdir = $(datadir)/doc/swish-e
SOURCEPODS = ../pod/CHANGES.pod ../pod/README.pod ../pod/SWISH-CONFIG.pod ../pod/SWISH-LIBRARY.pod \
../pod/SWISH-RUN.pod ../pod/INSTALL.pod ../pod/SWISH-3.0.pod ../pod/SWISH-FAQ.pod \
../pod/SWISH-PERL.pod ../pod/SWISH-SEARCH.pod
MANPAGES = SWISH-RUN.1 SWISH-CONFIG.1 SWISH-FAQ.1 SWISH-LIBRARY.1 SWISH-PERL.1
HTMLDOCS = ../html/API.html ../html/CHANGES.html ../html/Filter.html \
../html/index.html ../html/index_long.html ../html/INSTALL.html \
../html/README.html ../html/search.cgi ../html/spider.html \
../html/style.css ../html/SWISH-3.0.html ../html/SWISH-BUGS.html \
../html/SWISH-CONFIG.html ../html/SWISH-FAQ.html ../html/swish.html \
../html/SWISH-LIBRARY.html ../html/SWISH-PERL.html ../html/SWISH-RUN.html \
../html/SWISH-SEARCH.html
HTMLIMAGES = ../html/images/dotrule1.gif \
../html/images/swish2b.gif \
../html/images/swish2.gif \
../html/images/swishbanner1.gif \
../html/images/swish.gif
# How portable is .PHONY?
.PHONY: all html pod readme pdf man install-man clean realclean
.SUFFIXES: # remove default rules
all: readme installpage html man
#--- convert README.pod to README ---
../README: ../pod/README.pod
pod2text ../pod/README.pod > ../README && chmod 644 ../README
readme: ../README
#--- convert INSTALL.pod to INSTALL ---
../INSTALL: ../pod/INSTALL.pod
pod2text ../pod/INSTALL.pod > ../INSTALL && chmod 644 ../INSTALL
installpage: ../INSTALL
#--- create/install man pages ----------
# Does every
%.1: ../pod/%.pod
pod2man --center="SWISH-E Documentation" --lax --release='$(VERSION)' $< > $@
$(MANPAGES): ../configure
man: $(MANPAGES)
install-man: man
@echo "Installing man pages $(MANPAGES) to $(mandir)"
@$(MKINSTALLDIRS) $(mandir)
@list='$(MANPAGES)'; \
for p in $$list; do $(INSTALL_DATA) $$p $(mandir); done
install-docs:
@echo "Instaling HTML files to $(docdir)/html"
@$(MKINSTALLDIRS) $(docdir)/html/images
@list='$(HTMLDOCS)'; \
for p in $$list; do $(INSTALL_DATA) $$p $(docdir)/html; done
@list='$(HTMLIMAGES)'; \
for p in $$list; do $(INSTALL_DATA) $$p $(docdir)/html/images; done
# Check to see if the HTML docs exist
# should always be able to install man because pod2man is part of perl
# Question: should filter-bin, example, prog-bin, conf be installed?
install-docs-test:
@if test -f ../html/index.html; then \
$(MAKE) $(MFLAGS) $(MVARS) install-docs; \
else \
echo " *** No HTML docs to install - may need to run make docs first ***"; \
fi
@if test $(POD2MAN)x = x; then \
echo " *** No pod2man command -- not installing man pages ***"; \
else \
$(MAKE) $(MFLAGS) $(MVARS) install-man; \
fi
@if test -f ../README; then \
$(MKINSTALLDIRS) $(docdir); $(INSTALL_DATA) ../README $(docdir); \
fi
@if test -f ../INSTALL; then \
$(MKINSTALLDIRS) $(docdir); $(INSTALL_DATA) ../INSTALL $(docdir); \
fi
#--- create html pages ------
# This is to display the version in the documetation
./Version.pm: Makefile
@echo 'package SWISHE::Doc;$$VERSION=q[$(VERSION)];1' > ./Version.pm
html: ./Version.pm
@bin/build
#--- split version (for searchable version of documentation ) ---
split: ./Version.pm
@echo "Checking for swish binary..."
test -x ../src/swish-e
bin/build -s
cp ../src/swish-e ../html/split/swish-e
../html/split/swish-e -c split.conf
chmod 755 ../html/split/search.cgi
perl -i.orig -pe 's{<!-- SEARCH -->}{<center>[<a href="split/search.cgi">Search The Documentation</a>]</center>}' ../html/index.html ../html/index_long.html
perl -i.orig -pe 's{<!-- SEARCH -->}{<center>[<a href="search.cgi">Search</a>] [<a href="../index.html">Back to Non-Split Documentation</a>]</center>}' ../html/split/index.html ../html/split/index_long.html
@echo -e "\n** Don't forget to refresh in your browser to see the new pages! **\n"
#--- create PDF and PostScript ----
pdf: ./Version.pm
bin/build -d
cp -f rel_ps/swish-e_documentation.pdf ..
cp -f rel_ps/swish-e_documentation.ps ..
rm -rf rel_ps
@echo "swish-e_documentation.pdf"
#---- clean -------------
# This cleans split and pdf/ps and man pages
clean:
rm -rf rel_ps
rm -f ../swish-e_documentation.pdf ../swish-e_documentation.ps
rm -rf ../html
rm -f ./*.1
-chmod 644 ../pod/*.pod
realclean: clean
rm -f Makefile
rm -f ./pod2html-dircache ./pod2html-itemcache
distclean: realclean
|