freebsd-nq/contrib/groff/doc/Makefile.in

151 lines
4.4 KiB
Makefile
Raw Normal View History

2005-10-20 10:45:19 +00:00
# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
2002-10-11 08:52:17 +00:00
# Written by Werner Lemberg <wl@gnu.org>
#
# This file is part of groff.
#
# groff 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; either version 2, or (at your option) any later
# version.
#
# groff 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 groff; see the file COPYING. If not, write to the Free Software
2005-10-20 10:45:19 +00:00
# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
2002-10-11 08:52:17 +00:00
# Use this file to produce documentation in various formats; e.g. you can
# say
#
# make groff.pdf
#
# to get the groff texinfo manual as a PDF file.
#
# Note that you have to compile the groff package first.
srcdir=@srcdir@
2005-10-20 10:45:19 +00:00
top_srcdir=@abs_top_srcdir@
2002-10-11 08:52:17 +00:00
VPATH=@srcdir@
2005-10-20 10:45:19 +00:00
top_builddir=@abs_top_builddir@
2003-05-01 13:09:50 +00:00
pnmtops=@pnmtops_nosetpage@
2002-10-11 08:52:17 +00:00
2003-05-01 13:09:50 +00:00
# These may be overridden if cross-compiling.
TROFFBIN=$(top_builddir)/src/roff/troff/troff
GROFFBIN=$(top_builddir)/src/roff/groff/groff
GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
2002-10-11 08:52:17 +00:00
2005-10-20 10:45:19 +00:00
# info files are distributed with the groff package, so makeinfo is
# usually not needed (however, to build from CVS you NEED it!)
# FIXME: Add autoconf test to check whether makeinfo exists.
2002-10-11 08:52:17 +00:00
MAKEINFO=makeinfo
# Users who want to print out the groff manual are expected to have
# a working TeX installation.
TEXI2DVI=texi2dvi
groff_bin_dirs=\
$(top_builddir)/src/roff/groff \
$(top_builddir)/src/roff/troff \
$(top_builddir)/src/preproc/pic \
$(top_builddir)/src/preproc/eqn \
$(top_builddir)/src/preproc/tbl \
$(top_builddir)/src/preproc/grn \
$(top_builddir)/src/preproc/refer \
$(top_builddir)/src/preproc/soelim \
$(top_builddir)/src/preproc/html \
$(top_builddir)/src/devices/grops \
$(top_builddir)/src/devices/grodvi \
$(top_builddir)/src/devices/grotty \
$(top_builddir)/src/devices/grolj4 \
$(top_builddir)/src/devices/grolbp \
$(top_builddir)/src/devices/grohtml
version=`cat $(top_srcdir)/VERSION`
# No additional number if revision is zero.
revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
2003-05-01 13:09:50 +00:00
TROFF=$(TROFFBIN) $(TFLAG) $(FFLAG) -ww
2002-10-11 08:52:17 +00:00
GROFF=GROFF_COMMAND_PREFIX=''; \
export GROFF_COMMAND_PREFIX; \
2003-05-01 13:09:50 +00:00
GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
2002-10-11 08:52:17 +00:00
export GROFF_BIN_PATH; \
sed -e "s;@VERSION@;$(version)$(revision);" $< \
2003-05-01 13:09:50 +00:00
| $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
2002-10-11 08:52:17 +00:00
imagedir=img
.SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
2005-10-20 10:45:19 +00:00
.PHONY: all prepare_examples clean distclean realclean extraclean
2002-10-11 08:52:17 +00:00
# For simplicity, we always call grn and eqn.
.me.txt:
$(GROFF) -Tascii -ge -me >$@
.me.ps:
$(GROFF) -Tps -ge -me >$@
.ms.html:
$(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
-P-D$(imagedir) -Thtml -ms >$@
.ms.txt:
$(GROFF) -Tascii -ms -mwww >$@
.ms.ps:
$(GROFF) -Tps -ms -mwww >$@
.texinfo.dvi:
$(TEXI2DVI) -e $<
.texinfo.pdf:
$(TEXI2DVI) -e --pdf $<
.texinfo.html:
2005-10-20 10:45:19 +00:00
$(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< \
&& $(SHELL) $(srcdir)/fixinfo.sh $@
2002-10-11 08:52:17 +00:00
all: prepare_examples
2005-10-20 10:45:19 +00:00
prepare_examples: grnexmpl.g groff.css
2002-10-11 08:52:17 +00:00
test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
2005-10-20 10:45:19 +00:00
test -f groff.css || cp $(srcdir)/groff.css .
2002-10-11 08:52:17 +00:00
groff: groff.texinfo
2005-10-20 10:45:19 +00:00
$(MAKEINFO) --enable-encoding -I$(srcdir) $(srcdir)/groff.texinfo
2002-10-11 08:52:17 +00:00
gnu.eps: gnu.xpm
2003-05-01 13:09:50 +00:00
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | $(pnmtops) -noturn >$@
2002-10-11 08:52:17 +00:00
gnu.png: gnu.xpm
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
2005-10-20 10:45:19 +00:00
pic.html: pic.ms
$(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
-P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \
-Thtml -ms >$@
webpage.html: webpage.ms gnu.png gnu.eps groff.css
2002-10-11 08:52:17 +00:00
webpage.ps: gnu.eps
grnexmpl.ps: grnexmpl.me grnexmpl.g
clean:
2005-10-20 10:45:19 +00:00
-rm -f *.ps *.html *.txt core
2002-10-11 08:52:17 +00:00
-rm -f *.aux *.dvi *.pdf *.log *.toc texput.log
-rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
*.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
*.tp *.tps *.tr *.vr *.vrs
-rm -rf img
distclean: clean
realclean: distclean
2005-10-20 10:45:19 +00:00
-rm -f *.png *.eps
2002-10-11 08:52:17 +00:00
2005-10-20 10:45:19 +00:00
extraclean: distclean
2002-10-11 08:52:17 +00:00
-rm -f core *~ \#* junk temp grot