[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] groff 1.18.1: Permit building docs when cross-compiling
From: |
Maciej W. Rozycki |
Subject: |
[patch] groff 1.18.1: Permit building docs when cross-compiling |
Date: |
Thu, 24 Oct 2002 14:36:38 +0200 (MET DST) |
Hello,
Building groff fails when cross-compiling as the newly built binaries are
used to prepare documentation. With a few changes to Makefiles it's
possible to make a cross-build use groff programs already installed in the
build systems and thus not fail. Here is a patch that introduces a few
overrideable variables that may be used by a user to point to build system
tools like this:
$ make "GROFFBIN=groff" "TROFFBIN=troff" "GROFF_BIN_PATH="
Since 1.17.2 I have successfully cross-compiled groff a few times this way
for the mipsel-linux-gnu host with an i386-linux-gnu build system.
2002-10-22 Maciej W. Rozycki <address@hidden>
* contrib/mom/Makefile.sub (GROFFBIN): New variable for groff
binary path.
(groff_bin_path): Rename to GROFF_BIN_PATH.
(GROFF): Use GROFFBIN and GROFF_BIN_PATH.
* doc/Makefile.in (TROFFBIN): New variable for troff
binary path.
(GROFFBIN): New variable for groff binary path.
(groff_bin_path): Rename to GROFF_BIN_PATH.
(TROFF): Use TROFFBIN.
(GROFF): Use GROFFBIN and GROFF_BIN_PATH.
* doc/Makefile.sub (GROFFBIN): New variable for groff
binary path.
(groff_bin_path): Rename to GROFF_BIN_PATH.
(GROFF): Use GROFFBIN and GROFF_BIN_PATH.
Please apply.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: address@hidden, PGP key available +
groff-1.18.1-cross.patch
diff -up --recursive --new-file groff-1.18.1.macro/contrib/mom/Makefile.sub
groff-1.18.1/contrib/mom/Makefile.sub
--- groff-1.18.1.macro/contrib/mom/Makefile.sub 2002-07-29 05:22:05.000000000
+0000
+++ groff-1.18.1/contrib/mom/Makefile.sub 2002-10-20 10:18:35.000000000
+0000
@@ -17,20 +17,23 @@
# with groff; see the file COPYING. If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# These may be overridden if cross-compiling.
+GROFFBIN=$(top_builddir)/src/roff/groff/groff
+GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
+
groff_bin_dirs=\
$(top_builddir)/src/roff/groff \
$(top_builddir)/src/roff/troff \
$(top_builddir)/src/devices/grops
-groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir)
GROFF=GROFF_COMMAND_PREFIX=''; \
export GROFF_COMMAND_PREFIX; \
- GROFF_BIN_PATH=$(groff_bin_path); \
+ GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
export GROFF_BIN_PATH; \
- $(top_builddir)/src/roff/groff/groff $(FFLAG) $(TFLAG)
+ $(GROFFBIN) $(FFLAG) $(TFLAG)
MAN7=\
groff_mom.n
diff -up --recursive --new-file groff-1.18.1.macro/doc/Makefile.in
groff-1.18.1/doc/Makefile.in
--- groff-1.18.1.macro/doc/Makefile.in 2002-09-09 19:31:37.000000000 +0000
+++ groff-1.18.1/doc/Makefile.in 2002-10-20 10:21:28.000000000 +0000
@@ -33,6 +33,10 @@ address@hidden@
address@hidden@
address@hidden@
+# 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'`
# Since info files are distributed within the groff package, no
# autoconf test for the makeinfo binary is done.
@@ -58,7 +62,6 @@ groff_bin_dirs=\
$(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`
# No additional number if revision is zero.
@@ -67,13 +70,13 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9]
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
+TROFF=$(TROFFBIN) $(TFLAG) $(FFLAG) -ww
GROFF=GROFF_COMMAND_PREFIX=''; \
export GROFF_COMMAND_PREFIX; \
- GROFF_BIN_PATH=$(groff_bin_path); \
+ 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
+ | $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
imagedir=img
diff -up --recursive --new-file groff-1.18.1.macro/doc/Makefile.sub
groff-1.18.1/doc/Makefile.sub
--- groff-1.18.1.macro/doc/Makefile.sub 2002-07-26 13:48:54.000000000 +0000
+++ groff-1.18.1/doc/Makefile.sub 2002-10-20 10:22:33.000000000 +0000
@@ -17,6 +17,10 @@
# with groff; see the file COPYING. If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# These may be overridden if cross-compiling.
+GROFFBIN=$(top_builddir)/src/roff/groff/groff
+GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
+
# Since info files are distributed within the groff package, no
# autoconf test for the makeinfo binary is done.
MAKEINFO=makeinfo
@@ -33,7 +37,6 @@ groff_bin_dirs=\
$(top_builddir)/src/preproc/html \
$(top_builddir)/src/devices/grops \
$(top_builddir)/src/devices/grohtml
-groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
@@ -41,10 +44,10 @@ TFLAG=-M$(top_builddir)/tmac -M$(top_src
GROFF=\
GROFF_COMMAND_PREFIX=''; \
export GROFF_COMMAND_PREFIX; \
- GROFF_BIN_PATH=$(groff_bin_path); \
+ 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
+ | $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
DOCFILES=\
meref.me \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch] groff 1.18.1: Permit building docs when cross-compiling,
Maciej W. Rozycki <=