srcdir=@srcdir@
top_srcdir=@top_srcdir@
VPATH=@srcdir@
top_builddir=@groff_top_builddir@
MAKEINFO=makeinfo
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
groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
version=`cat $(top_srcdir)/VERSION`
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
TROFF=$(top_builddir)/src/roff/troff/troff $(TFLAG) $(FFLAG) -ww
GROFF=GROFF_COMMAND_PREFIX=''; \
export GROFF_COMMAND_PREFIX; \
GROFF_BIN_PATH=$(groff_bin_path); \
export GROFF_BIN_PATH; \
sed -e "s;@VERSION@;$(version)$(revision);" $< \
| $(top_builddir)/src/roff/groff/groff $(TFLAG) $(FFLAG) -Upet -ww
imagedir=img
.SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
.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:
$(MAKEINFO) -I$(srcdir) --html --no-split $<
all: prepare_examples
prepare_examples: grnexmpl.g
test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
groff: groff.texinfo
$(MAKEINFO) -I$(srcdir) $(srcdir)/groff.texinfo
gnu.eps: gnu.xpm
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtops -noturn >$@
gnu.png: gnu.xpm
xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
webpage.html: webpage.ms gnu.png gnu.eps
webpage.ps: gnu.eps
grnexmpl.ps: grnexmpl.me grnexmpl.g
clean:
-rm -f *.ps *.html *.txt *.png *.eps *.gif *.dit core
-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
extraclean: clean
-rm -f core *~ \