2006-02-06 21:25:47 +03:00
|
|
|
# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
2003-06-30 21:51:41 +04: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
|
2006-02-06 21:25:47 +03:00
|
|
|
# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-06-30 21:51:41 +04:00
|
|
|
|
|
|
|
# These may be overridden if cross-compiling.
|
|
|
|
GROFFBIN=$(top_builddir)/src/roff/groff/groff
|
2004-07-30 18:56:51 +04:00
|
|
|
GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SH_SEP)|g'`
|
2003-06-30 21:51:41 +04:00
|
|
|
|
2006-02-06 21:25:47 +03: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.
|
2003-06-30 21:51:41 +04:00
|
|
|
MAKEINFO=makeinfo
|
|
|
|
|
|
|
|
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/grohtml
|
|
|
|
|
|
|
|
FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
|
|
|
|
TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
|
|
|
|
|
|
|
|
GROFF=\
|
|
|
|
GROFF_COMMAND_PREFIX=''; \
|
|
|
|
export GROFF_COMMAND_PREFIX; \
|
|
|
|
GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
|
|
|
|
export GROFF_BIN_PATH; \
|
|
|
|
sed -e "s;@VERSION@;$(version)$(revision);" $< \
|
|
|
|
| $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
|
|
|
|
|
|
|
|
DOCFILES=\
|
|
|
|
meref.me \
|
|
|
|
meintro.me \
|
|
|
|
pic.ms
|
|
|
|
|
|
|
|
PROCESSEDDOCFILES=\
|
|
|
|
meref.ps \
|
|
|
|
meintro.ps \
|
|
|
|
pic.ps
|
|
|
|
|
|
|
|
HTMLDOCFILES=\
|
|
|
|
pic.html
|
|
|
|
|
2004-07-30 18:56:51 +04:00
|
|
|
HTMLDOCFILESALL=\
|
|
|
|
pic*.html
|
|
|
|
|
2003-06-30 21:51:41 +04:00
|
|
|
HTMLDOCIMAGEFILES=\
|
|
|
|
pic*
|
|
|
|
|
|
|
|
EXAMPLEFILES=\
|
|
|
|
webpage.ms \
|
2006-02-06 21:25:47 +03:00
|
|
|
groff.css \
|
2003-06-30 21:51:41 +04:00
|
|
|
grnexmpl.g \
|
|
|
|
grnexmpl.me
|
|
|
|
|
|
|
|
PROCESSEDEXAMPLEFILES=\
|
|
|
|
webpage.ps \
|
|
|
|
grnexmpl.ps
|
|
|
|
|
|
|
|
HTMLEXAMPLEFILES=\
|
|
|
|
webpage.html
|
|
|
|
|
|
|
|
HTMLEXAMPLEIMAGEFILES=\
|
|
|
|
webpage*
|
|
|
|
|
|
|
|
imagedir=img
|
|
|
|
htmldocimagedir=$(htmldocdir)/$(imagedir)
|
|
|
|
exampleimagedir=$(exampledir)/$(imagedir)
|
|
|
|
|
|
|
|
CLEANADD=\
|
|
|
|
$(PROCESSEDDOCFILES) \
|
|
|
|
$(PROCESSEDEXAMPLEFILES) \
|
|
|
|
$(HTMLEXAMPLEFILES) \
|
2004-07-30 18:56:51 +04:00
|
|
|
$(HTMLDOCFILESALL) \
|
2006-02-06 21:25:47 +03:00
|
|
|
groff.aux groff.cp* groff.dvi groff.es* groff.fn* groff.html groff.ky* \
|
|
|
|
groff.log groff.ma* groff.op* groff.pdf groff.pg* groff.ps groff.rq* \
|
|
|
|
groff.st* groff.toc groff.tp groff.vr* \
|
|
|
|
examples.stamp
|
2003-06-30 21:51:41 +04:00
|
|
|
|
|
|
|
CLEANDIRADD=\
|
|
|
|
$(imagedir)
|
|
|
|
|
|
|
|
CLEANNOTSRCDIRADD=\
|
2006-02-06 21:25:47 +03:00
|
|
|
groff.css \
|
2003-06-30 21:51:41 +04:00
|
|
|
grnexmpl.g \
|
|
|
|
groff \
|
|
|
|
groff-* \
|
|
|
|
gnu.eps \
|
|
|
|
gnu.png
|
|
|
|
|
|
|
|
.SUFFIXES: .me .ms .ps .html
|
|
|
|
|
|
|
|
# For simplicity, we always call grn and eqn.
|
|
|
|
.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.ps:
|
|
|
|
$(GROFF) -Tps -ms -mwww >$@
|
|
|
|
|
|
|
|
|
|
|
|
all: groff $(PROCESSEDDOCFILES) prepare_examples \
|
|
|
|
$(PROCESSEDEXAMPLEFILES) $(make_html)
|
|
|
|
|
|
|
|
html: $(HTMLDOCFILES) $(HTMLEXAMPLEFILES)
|
|
|
|
|
2006-02-06 21:25:47 +03:00
|
|
|
prepare_examples: examples.stamp
|
|
|
|
|
|
|
|
examples.stamp: grnexmpl.g groff.css gnu.eps
|
2003-06-30 21:51:41 +04:00
|
|
|
test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
|
2006-02-06 21:25:47 +03:00
|
|
|
test -f groff.css || cp $(srcdir)/groff.css .
|
|
|
|
if test ! -f gnu.eps; then \
|
|
|
|
if test -f $(srcdir)/gnu.eps; then \
|
|
|
|
cp $(srcdir)/gnu.eps .; \
|
|
|
|
elif test -f $(top_builddir)/contrib/pdfmark/gnu.eps; then \
|
|
|
|
cp $(top_builddir)/contrib/pdfmark/gnu.eps .; \
|
|
|
|
fi; \
|
|
|
|
fi
|
|
|
|
echo timestamp > $@
|
2003-06-30 21:51:41 +04:00
|
|
|
|
|
|
|
groff: groff.texinfo
|
2006-02-06 21:25:47 +03:00
|
|
|
$(MAKEINFO) --enable-encoding -I$(srcdir) $(srcdir)/groff.texinfo
|
2003-06-30 21:51:41 +04:00
|
|
|
|
|
|
|
gnu.eps: gnu.xpm
|
2003-10-18 07:01:52 +04:00
|
|
|
@echo "NOT REBUILDING $@"
|
|
|
|
test -f gnu.eps || cp $(srcdir)/gnu.eps .
|
|
|
|
NetBSD_DISABLED_gnu.eps:
|
2003-06-30 21:51:41 +04:00
|
|
|
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | \
|
|
|
|
$(pnmtops_nosetpage) -noturn -rle >$@
|
2006-02-06 21:25:47 +03:00
|
|
|
|
2003-06-30 21:51:41 +04:00
|
|
|
gnu.png: gnu.xpm
|
2003-10-18 07:01:52 +04:00
|
|
|
@echo "NOT REBUILDING $@"
|
|
|
|
NetBSD_DISABLED_gnu.png:
|
2003-06-30 21:51:41 +04:00
|
|
|
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
|
|
|
|
|
2004-07-30 18:56:51 +04: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 >$@
|
|
|
|
|
2006-02-06 21:25:47 +03:00
|
|
|
webpage.html: webpage.ms gnu.png groff.css
|
2003-06-30 21:51:41 +04:00
|
|
|
webpage.ps: gnu.eps
|
|
|
|
|
|
|
|
grnexmpl.ps: grnexmpl.me grnexmpl.g
|
|
|
|
|
|
|
|
distfiles: groff gnu.eps gnu.png
|
|
|
|
|
|
|
|
install_data: groff $(DOCFILES) $(PROCESSEDDOCFILES) $(make_install_html) \
|
|
|
|
$(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES)
|
|
|
|
-test -d $(infodir) || $(mkinstalldirs) $(infodir)
|
|
|
|
# Prefer info files in builddir over srcdir; we test for
|
|
|
|
# the existence of `groff'.
|
|
|
|
d=.; \
|
|
|
|
test -f "groff" || d=$(srcdir); \
|
2004-07-30 18:56:51 +04:00
|
|
|
for f in $$d/groff `ls $$d/groff-*`; do \
|
2003-06-30 21:51:41 +04:00
|
|
|
rm -f $(infodir)/`basename $$f`; \
|
|
|
|
$(INSTALL_DATA) $$f $(infodir)/`basename $$f`; \
|
|
|
|
done
|
|
|
|
$(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/groff
|
|
|
|
-test -d $(docdir) || $(mkinstalldirs) $(docdir)
|
|
|
|
for f in $(DOCFILES); do \
|
|
|
|
rm -f $(docdir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f; \
|
|
|
|
done
|
|
|
|
for f in $(PROCESSEDDOCFILES); do \
|
|
|
|
rm -f $(docdir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $$f $(docdir)/$$f; \
|
|
|
|
done
|
|
|
|
-test -d $(exampledir) || $(mkinstalldirs) $(exampledir)
|
|
|
|
for f in $(EXAMPLEFILES); do \
|
|
|
|
rm -f $(exampledir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/$$f $(exampledir)/$$f; \
|
|
|
|
done
|
|
|
|
for f in $(PROCESSEDEXAMPLEFILES); do \
|
|
|
|
rm -f $(exampledir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $$f $(exampledir)/$$f; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install_html: $(HTMLDOCFILES) $(HTMLEXAMPLEFILES)
|
|
|
|
-test -d $(htmldocdir) || $(mkinstalldirs) $(htmldocdir)
|
2004-07-30 18:56:51 +04:00
|
|
|
for f in `ls $(HTMLDOCFILESALL)`; do \
|
2003-06-30 21:51:41 +04:00
|
|
|
rm -f $(htmldocdir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $$f $(htmldocdir)/$$f; \
|
|
|
|
done
|
|
|
|
-test -d $(htmldocimagedir) || $(mkinstalldirs) $(htmldocimagedir)
|
|
|
|
rm -f $(htmldocimagedir)/$(HTMLDOCIMAGEFILES)
|
|
|
|
$(INSTALL_DATA) $(imagedir)/$(HTMLDOCIMAGEFILES) $(htmldocimagedir)
|
|
|
|
-test -d $(exampledir) || $(mkinstalldirs) $(exampledir)
|
|
|
|
for f in $(HTMLEXAMPLEFILES); do \
|
|
|
|
rm -f $(exampledir)/$$f; \
|
|
|
|
$(INSTALL_DATA) $$f $(exampledir)/$$f; \
|
|
|
|
done
|
|
|
|
-test -d $(exampleimagedir) || $(mkinstalldirs) $(exampleimagedir)
|
|
|
|
rm -f $(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES)
|
|
|
|
$(INSTALL_DATA) $(imagedir)/$(HTMLEXAMPLEIMAGEFILES) $(exampleimagedir)
|
|
|
|
|
|
|
|
uninstall_sub:
|
2004-07-30 18:56:51 +04:00
|
|
|
-for f in groff `ls groff-*`; do \
|
2003-06-30 21:51:41 +04:00
|
|
|
rm -f $(infodir)/$$f; \
|
|
|
|
done
|
2006-02-06 21:25:47 +03:00
|
|
|
$(INSTALL_INFO) --remove --info-dir=$(infodir) $(infodir)/groff
|
2003-06-30 21:51:41 +04:00
|
|
|
-for f in $(DOCFILES) $(PROCESSEDDOCFILES); do \
|
|
|
|
rm -f $(docdir)/$$f; \
|
|
|
|
done
|
2004-07-30 18:56:51 +04:00
|
|
|
-for f in `ls $(HTMLDOCFILESALL)`; do \
|
2003-06-30 21:51:41 +04:00
|
|
|
rm -f $(htmldocdir)/$$f; \
|
|
|
|
done
|
|
|
|
-rm -f $(htmldocimagedir)/$(HTMLDOCIMAGEFILES)
|
|
|
|
-rmdir $(htmldocimagedir)
|
2006-02-06 21:25:47 +03:00
|
|
|
-for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) $(HTMLEXAMPLEFILES); do \
|
2003-06-30 21:51:41 +04:00
|
|
|
rm -f $(exampledir)/$$f; \
|
|
|
|
done
|
|
|
|
-rm -f $(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES)
|
|
|
|
-rmdir $(exampleimagedir)
|