summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-04-05 08:37:33 +0000
committerwlemb <wlemb>2003-04-05 08:37:33 +0000
commit80148ac258c3ecd3fd70f4b21f309520c5720ff2 (patch)
treeca755baa4d7fd75bdcb045050f7ecff204d6d51f
parentd92feffc0709d4e509663cffb1fdf97537069c13 (diff)
downloadgroff-80148ac258c3ecd3fd70f4b21f309520c5720ff2.tar.gz
* 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. * Makefile.comm (install_dev): Install scripts from DEVSCRIPTS with INSTALL_SCRIPT. (uninstall_dev): Uninstall scripts from DEVSCRIPTS. * Makefile.dev (all): Depend on DEVSCRIPTS. (install_dev): Likewise. * font/devdvi/Makefile.sub (DEVSCRIPTS): New variable to hold scripts. * font/devps/Makefile.sub (DEVSCRIPTS): Likewise. (DEVGENSCRIPTS): New variable to hold generated scripts. * src/libs/libdriver/input.cc (IntArray::operator[], IntArray::get_data): Remove meaningless `const' in return value. * README.CVS: New file.
-rw-r--r--ChangeLog34
-rw-r--r--Makefile.comm10
-rw-r--r--Makefile.dev4
-rw-r--r--README.CVS6
-rw-r--r--contrib/mom/Makefile.sub11
-rw-r--r--doc/Makefile.in11
-rw-r--r--doc/Makefile.sub9
-rw-r--r--font/devdvi/Makefile.sub3
-rw-r--r--font/devps/Makefile.sub6
-rw-r--r--src/libs/libdriver/input.cc26
10 files changed, 86 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 329f59cb..609bcc4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2003-04-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * 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.
+
+ * Makefile.comm (install_dev): Install scripts from DEVSCRIPTS
+ with INSTALL_SCRIPT.
+ (uninstall_dev): Uninstall scripts from DEVSCRIPTS.
+ * Makefile.dev (all): Depend on DEVSCRIPTS.
+ (install_dev): Likewise.
+ * font/devdvi/Makefile.sub (DEVSCRIPTS): New variable to hold
+ scripts.
+ * font/devps/Makefile.sub (DEVSCRIPTS): Likewise.
+ (DEVGENSCRIPTS): New variable to hold generated scripts.
+
+2003-04-05 Werner LEMBERG <wl@gnu.org>
+
+ * src/libs/libdriver/input.cc (IntArray::operator[],
+ IntArray::get_data): Remove meaningless `const' in return value.
+
+ * README.CVS: New file.
+
2003-04-04 Werner LEMBERG <wl@gnu.org>
Check for stdint.h in C++, not in C.
diff --git a/Makefile.comm b/Makefile.comm
index e4141476..a0f995c3 100644
--- a/Makefile.comm
+++ b/Makefile.comm
@@ -246,10 +246,18 @@ install_dev:
$(INSTALL_DATA) $(srcdir)/$$f $(fontsubdir)/$$f; \
fi; \
done
+ -for f in $(DEVSCRIPTS); do \
+ rm -f $(fontsubdir)/$$f; \
+ if test -f $$f; then \
+ $(INSTALL_SCRIPT) $$f $(fontsubdir)/$$f; \
+ else \
+ $(INSTALL_SCRIPT) $(srcdir)/$$f $(fontsubdir)/$$f; \
+ fi; \
+ done
.PHONY: uninstall_dev
uninstall_dev:
- -for f in $(DEVFILES); do rm -f $(fontsubdir)/$$f; done
+ -for f in $(DEVFILES) $(DEVSCRIPTS); do rm -f $(fontsubdir)/$$f; done
-if test -d $(fontsubdir)/generate; then \
rmdir $(fontsubdir)/generate; \
fi
diff --git a/Makefile.dev b/Makefile.dev
index ae9a6722..6c70fff6 100644
--- a/Makefile.dev
+++ b/Makefile.dev
@@ -1,4 +1,4 @@
-all: $(DEVFILES)
+all: $(DEVFILES) $(DEVSCRIPTS)
install_data: install_dev
uninstall_sub: uninstall_dev
-install_dev: $(DEVFILES)
+install_dev: $(DEVFILES) $(DEVSCRIPTS)
diff --git a/README.CVS b/README.CVS
new file mode 100644
index 00000000..3d7fdf27
--- /dev/null
+++ b/README.CVS
@@ -0,0 +1,6 @@
+You need the following tools to build groff directly from CVS:
+
+ the netpbm package
+ texinfo > 4.3
+ bison or yacc
+ ghostscript
diff --git a/contrib/mom/Makefile.sub b/contrib/mom/Makefile.sub
index 881c0522..f066153a 100644
--- a/contrib/mom/Makefile.sub
+++ b/contrib/mom/Makefile.sub
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# Written by Werner Lemberg (wl@gnu.org)
#
# This file is part of groff.
@@ -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 --git a/doc/Makefile.in b/doc/Makefile.in
index 58190c8d..313889d2 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -34,6 +34,10 @@ VPATH=@srcdir@
top_builddir=@groff_top_builddir@
pnmtops=@pnmtops_nosetpage@
+# 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.
@@ -59,7 +63,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.
@@ -68,13 +71,13 @@ 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
+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 --git a/doc/Makefile.sub b/doc/Makefile.sub
index 2e14a86d..b0111c63 100644
--- a/doc/Makefile.sub
+++ b/doc/Makefile.sub
@@ -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_srcdir)/tmac
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 \
diff --git a/font/devdvi/Makefile.sub b/font/devdvi/Makefile.sub
index e3d09a25..052e00a4 100644
--- a/font/devdvi/Makefile.sub
+++ b/font/devdvi/Makefile.sub
@@ -4,11 +4,12 @@ DEVFILES=DESC \
TREC TIEC TBEC TBIEC CWEC CWIEC HREC HIEC HBEC HBIEC \
TRTC TITC TBTC TBITC CWTC CWITC HRTC HITC HBTC HBITC \
MI S EX SA SB SC \
- generate/CompileFonts generate/Makefile \
+ generate/Makefile \
generate/msam.map generate/msbm.map \
generate/texb.map generate/texex.map generate/texi.map generate/texmi.map \
generate/texr.map generate/texsy.map generate/textt.map generate/textex.map \
generate/ec.map generate/tc.map
+DEVSCRIPTS=generate/CompileFonts
CLEANADD=DESC
diff --git a/font/devps/Makefile.sub b/font/devps/Makefile.sub
index f08e53d9..404efaa7 100644
--- a/font/devps/Makefile.sub
+++ b/font/devps/Makefile.sub
@@ -5,10 +5,12 @@ DISTFILES=text.enc download \
NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI \
EURO freeeuro.pfa
PSFILES=prologue symbolsl.pfa zapfdr.pfa
-DEVGENFILES=generate/Makefile generate/afmname generate/dingbats.map \
- generate/dingbats.rmap generate/lgreekmap generate/symbol.sed \
+DEVGENFILES=generate/Makefile generate/dingbats.map \
+ generate/dingbats.rmap generate/lgreekmap \
generate/symbolchars generate/symbolsl.afm generate/textmap
+DEVGENSCRIPTS=generate/afmfile generate/symbol.sed
DEVFILES=DESC $(PSFILES) $(DISTFILES) $(DEVGENFILES)
+DEVSCRIPTS=$(DEVGENSCRIPTS)
CLEANADD=DESC $(PSFILES)
diff --git a/src/libs/libdriver/input.cc b/src/libs/libdriver/input.cc
index bc9b7f57..abe2e20e 100644
--- a/src/libs/libdriver/input.cc
+++ b/src/libs/libdriver/input.cc
@@ -8,7 +8,7 @@
Written by James Clark (jjc@jclark.com)
Major rewrite 2001 by Bernd Warken (bwarken@mayn.de)
- Last update: 11 Mar 2003
+ Last update: 04 Apr 2003
This file is part of groff, the GNU roff text processing system.
@@ -33,18 +33,14 @@
This file implements the parser for the intermediate groff output,
see groff_out(5), and does the printout for the given device.
- All parsed information is processed within the function do_file() by
- using the global object `pr' of class `printer'. So a device
- postprocessor just needs to fill in the methods for the class
- `printer' without having to worry about the syntax of the
- intermediate output format. Consequently, the programming of groff
- postprocessors is similar to the development of device-drivers.
+ All parsed information is processed within the function do_file().
+ A device postprocessor just needs to fill in the methods for the class
+ `printer' (or rather a derived class) without having to worry about
+ the syntax of the intermediate output format. Consequently, the
+ programming of groff postprocessors is similar to the development of
+ device drivers.
The prototyping for this file is done in driver.h (and error.h).
-
- Postprocessor programs must deallocate the global variables `pr' and
- `device' with `delete', `current_filename' and
- `current_source_filename' with `free((char *))'.
*/
/* Changes of the 2001 rewrite of this file.
@@ -148,10 +144,6 @@
devices to the postprocessor device (seems to be reasonably
easy).
- The external, global pointer variables are not optimally handled.
- - `pr' isn't used outside besides initialization and deletion.
- So it could be replaced by a static local variable. For
- example, a wrapper class `Postprocessor' for class `printer' with
- internal make_printer() and automatic clean-up would make sense.
- The global variables `current_filename',
`current_source_filename', and `current_lineno' are only used for
error reporting. So implement a static class `Error'
@@ -284,11 +276,11 @@ public:
{
if (i >= num_stored)
fatal("index out of range");
- return (const IntArg) data[i];
+ return (IntArg) data[i];
}
void append(IntArg);
const IntArg * const
- get_data(void) const { return (const IntArg * const) data; }
+ get_data(void) const { return (IntArg *) data; }
const size_t len(void) const { return num_stored; }
};