[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/02: - Detect if built-in variable RM is supported by make - G
From: |
Bertrand Garrigues |
Subject: |
[groff] 01/02: - Detect if built-in variable RM is supported by make - Generate test-groff script |
Date: |
Mon, 15 Sep 2014 22:35:59 +0000 |
bgarrigues pushed a commit to branch automake2
in repository groff.
commit 6f797caa2aaa8630062b659ccdedff2b956a4fe5
Author: Bertrand Garrigues <address@hidden>
Date: Mon Sep 15 00:25:22 2014 +0200
- Detect if built-in variable RM is supported by make
- Generate test-groff script
---
Makefile.am | 5 +++++
TESTS | 3 ---
configure.ac | 5 +++++
m4/groff.m4 | 15 +++++++++++++++
test-groff.in | 30 ++++++------------------------
5 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 8b37cc9..2c131f4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -564,6 +564,11 @@ PDFMOMBIN = $(abs_top_builddir)/pdfmom
FFLAG=-F$(abs_top_builddir)/font -F$(abs_top_srcdir)/font
TFLAG=-M$(abs_top_builddir)/tmac -M$(abs_top_srcdir)/tmac
+# make builtin variable RM
+if MAKE_DONT_HAVE_RM
+RM = rm -f
+endif
+
# Non-recursive makefile system. See Automake manual '7.3 An
# Alternative Approach to Subdirectories'. We use a single Makefile.am
# that includes other .am files, rather than using SUBDIRS. Note that
diff --git a/TESTS b/TESTS
index 6dffc47..c0f7317 100644
--- a/TESTS
+++ b/TESTS
@@ -462,9 +462,6 @@ TODO:
README.git
TESTS
- - Missing files/directories (TODO):
- test-groff.in
-
- Files/directories not present in the git tree that are
distributed:
build-aux/
diff --git a/configure.ac b/configure.ac
index ef7bba9..fcc351d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,7 @@ GROFF_TARGET_PATH_SEPARATOR
GROFF_HTML_PROGRAMS
GROFF_PDFDOC_PROGRAMS
GROFF_PNMTOPS_NOSETPAGE
+GROFF_MAKE_RM
gl_GLIBC21
gl_LOCALCHARSET
@@ -183,6 +184,9 @@ gl_LOCALCHARSET
# src/libs/libxutil
AM_CONDITIONAL([WITHOUT_X11], [test "x$groff_no_x" = "xyes"])
+# make builtin variable RM
+AM_CONDITIONAL([MAKE_DONT_HAVE_RM], [test "x$groff_is_rm_defined" = "xno"])
+
# Some programs have a "g" prefix if an existing groff installation is detected
AM_CONDITIONAL([USEPROGRAMPREFIX], [test x$g = xg])
@@ -195,6 +199,7 @@ AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([test-groff], [chmod +x test-groff])
AC_OUTPUT
GROFF_APPRESDIR_CHECK
diff --git a/m4/groff.m4 b/m4/groff.m4
index f7e30fb..53d26b1 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1402,3 +1402,18 @@ AC_DEFUN([GROFF_GROGDIR_DEFAULT],
# Check for xpmtoppm, for gnu.eps generation
AC_DEFUN([GROFF_PROG_XPMTOPPM],
[AC_CHECK_PROG([XPMTOPPM], [xpmtoppm], [found], [missing])])
+
+# Check for make builtin variable RM
+AC_DEFUN([GROFF_MAKE_RM],
+ [AC_MSG_CHECKING(whether make has builtin variable RM)
+cat <<EOF > test_make_rm.mk
+all:
+ @if test -n "\$(RM)"; then \
+ echo "yes"; \
+ else \
+ echo "no"; \
+ fi
+EOF
+ groff_is_rm_defined=`make -sf test_make_rm.mk`
+ AC_MSG_RESULT([$groff_is_rm_defined])
+ rm -f test_make_rm.mk])
diff --git a/test-groff.in b/test-groff.in
index b58d8be..0c53983 100644
--- a/test-groff.in
+++ b/test-groff.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (C) 1989-2000, 2001-2005, 2009, 2011
+# Copyright (C) 1989-2000, 2001-2005, 2009, 2011, 2014
# Free Software Foundation, Inc.
#
# This file is part of groff.
@@ -21,35 +21,17 @@
# This script runs groff without requiring that it be installed.
SEP='@PATH_SEPARATOR@'
address@hidden@/src
address@hidden@
address@hidden@
-GROFF_BIN_PATH=\
-$builddir/roff/groff$SEP\
-$builddir/roff/troff$SEP\
-$builddir/preproc/preconv$SEP\
-$builddir/preproc/pic$SEP\
-$builddir/preproc/eqn$SEP\
-$builddir/preproc/tbl$SEP\
-$builddir/preproc/grn$SEP\
-$builddir/preproc/refer$SEP\
-$builddir/preproc/soelim$SEP\
-$builddir/preproc/html$SEP\
-$builddir/devices/grops$SEP\
-$builddir/devices/grodvi$SEP\
-$builddir/devices/grotty$SEP\
-$builddir/devices/grolj4$SEP\
-$builddir/devices/grolbp$SEP\
-$builddir/devices/grohtml$SEP\
-$builddir/devices/gropdf$SEP\
-$builddir/devices/xditview
+GROFF_BIN_PATH=$builddir
XENVIRONMENT=$srcdir/src/devices/xditview/GXditview.ad
export XENVIRONMENT
GROFF_COMMAND_PREFIX=
-GROFF_FONT_PATH=$builddir/../font$SEP$srcdir/font
-GROFF_TMAC_PATH=$srcdir/tmac
+GROFF_FONT_PATH=$builddir/font$SEP$srcdir/font
+GROFF_TMAC_PATH=$srcdir/tmac$SEP$builddir/tmac$SEP$srcdir/contrib/mom$SEP$builddir/contrib/mom
export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
-exec $builddir/roff/groff/groff ${1+"$@"}
+exec $builddir/groff ${1+"$@"}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/02: - Detect if built-in variable RM is supported by make - Generate test-groff script,
Bertrand Garrigues <=