[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 23/45: Add contrib/gdiffmk, plug gdiffmk test script to `make ch
From: |
Bertrand Garrigues |
Subject: |
[groff] 23/45: Add contrib/gdiffmk, plug gdiffmk test script to `make check'. |
Date: |
Mon, 20 Oct 2014 21:39:52 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 98771a658ff7299ede39c9ef73fa2de5429d2379
Author: Bertrand Garrigues <address@hidden>
Date: Sat Sep 6 14:37:32 2014 +0200
Add contrib/gdiffmk, plug gdiffmk test script to `make check'.
Fix some comments in TESTS.
---
.gitignore | 1 +
Makefile.am | 10 +++
TESTS | 60 +++++++++++++++----
contrib/gdiffmk/.gitignore | 3 +
contrib/gdiffmk/Makefile.sub | 51 -----------------
contrib/gdiffmk/gdiffmk.am | 58 +++++++++++++++++++
contrib/gdiffmk/tests/gdiffmk_tests.sh | 7 ++
contrib/gdiffmk/tests/{runtests.in => runtests.sh} | 7 ++-
8 files changed, 131 insertions(+), 66 deletions(-)
diff --git a/.gitignore b/.gitignore
index c0ce1d4..3821ec9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,6 +88,7 @@ stamp-*
/soelim
/tbl
/test-groff
+/test-suite.log
/tfmtodit
/troff
/xtotroff
diff --git a/Makefile.am b/Makefile.am
index a41fcf7..0c651ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -513,6 +513,15 @@ man7_MANS =
# for lex/yacc
AM_YFLAGS = -d -v
+# tests launched by make check
+check_SCRIPTS =
+check_PROGRAMS =
+TESTS =
+AM_TESTS_ENVIRONMENT = \
+ abs_top_srcdir=$(abs_top_srcdir) \
+ abs_top_builddir=$(abs_top_builddir) \
+ export abs_top_srcdir abs_top_builddir;
+
# 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
@@ -523,6 +532,7 @@ include $(top_srcdir)/lib/gnulib.mk
include $(top_srcdir)/arch/misc/misc.am
include $(top_srcdir)/contrib/chem/chem.am
include $(top_srcdir)/contrib/eqn2graph/eqn2graph.am
+include $(top_srcdir)/contrib/gdiffmk/gdiffmk.am
include $(top_srcdir)/font/devX100/devX100.am
include $(top_srcdir)/font/devX100-12/devX100-12.am
include $(top_srcdir)/font/devX75/devX75.am
diff --git a/TESTS b/TESTS
index 05e3ddc..fca0dd5 100644
--- a/TESTS
+++ b/TESTS
@@ -20,7 +20,10 @@ Current status
- Build font/*
- man files from 'man' directory installed
- tmac files from 'tmac' directory installed
- - Build and installation of contrib/chem, contrib/eqn2graph
+ - Build and installation of contrib:
+ -- chem
+ -- eqn2graph
+ -- gdiffmk
Tests
-----
@@ -140,6 +143,9 @@ from contrib/chem:
from contrib/eqn2graph:
- `eqn2graph' script
+from contrin/gdiffmk:
+ - `gdiffmk' script
+
In order to check and improve the dependencies, the following targets
were built from a clean environment:
- make lib/libgnu.a
@@ -179,6 +185,7 @@ were built from a clean environment:
- make troff
- make chem
- make eqn2graph
+ - make gdiffmk
2.2 make clean
@@ -201,9 +208,9 @@ The following files remain (this is expected):
Differences with former build system:
- - Programs (listed in bin_PROGRAMS) are not cleaned by 'make
- mostlyclean'. This could be changed if needed (MOSTLYCLEANFILES +=
- $(bin_PROGRAMS)).
+ - Programs and scripts (listed in bin_PROGRAMS bin_SCRIPTS) are not
+ cleaned by 'make mostlyclean'. This could be changed if needed
+ (MOSTLYCLEANFILES += $(bin_PROGRAMS) $(bin_SCRIPTS)).
2.4 make distclean
@@ -242,10 +249,11 @@ Differences with former build system:
$(DESTDIR)/usr/local/lib, make install update it by adding 'groff'
to the list of programs using it. Otherwise nothing is installed.
- - programs from src/utils are installed in $(DESTDIR)/usr/local/bin
+ - Programs from 'src' installed in $(DESTDIR)/usr/local/bin:
- - man files from man, src/utils, src/devices are installed in
- $(DESTDIR)/usr/local/share/man/man1, man5 and man7
+ - man files from man, src are installed in
+ $(DESTDIR)/usr/local/share/man/man1, man5 and man7 (TODO:
+ remaining man files from contrib)
- $(DESTDIR)/usr/local/share/groff/1.22.3/eign (from src/utils/indxbib)
@@ -253,7 +261,9 @@ Differences with former build system:
GXditview-color. If these files are already present, they are
first moved to GXditview.old and GXditview-color.old.
- - groff_opts_no_arg.txt and groff_opts_with_arg.txt are installed
+ - usr/local/lib/groff:
+ -- groff_opts_no_arg.txt and groff_opts_with_arg.txt are installed
+ -- grog/sub.pl
- font files are installed in $(DESTDIR)/usr/local/groff/1.22.3/font
and oldfont and identical to the one installed with the previous
@@ -266,6 +276,11 @@ Differences with former build system:
strictly identical to the one install by the original build
system.
+ - contrib scripts installed in $(DESTDIR)/usr/local/bin:
+ -- chem
+ -- eqn2graph
+ -- gdiffmk
+
- contrib/chem:
-- chem.pic installed in
@@ -283,6 +298,12 @@ Diff with previous build system:
TODO:
+ - doc
+
+ - examples from contrib
+
+ - create the 'current' symlink
+
- The original build system might uses tmac_s_prefix,
tmac_an_prefix, tmac_wrap and sys_tmac_prefix during the
installation of some tmac files but set these variables to an empty
@@ -291,6 +312,9 @@ TODO:
- Add automake conditional for examples, html, and doc in `contrib'.
+ - When contrib and doc will be completed, full installation tree
+ comparison with the tree installed by the old build system
+
2.7 make uninstall
- Tree after uninstall:
@@ -310,6 +334,8 @@ TODO:
12 directories, 0 files
+14 directories, 0 files
+
- Notes:
-- $(DESTDIR)/usr/local/lib/charset.alias is removed if exists
-- $(DESTDIR)/usr/local/lib/X11/app-defaults/GXditview and
@@ -351,13 +377,21 @@ TODO:
src/preproc/pic/pic.hpp
src/preproc/refer/label.hpp
src/preproc/refere/label.cpp
-
-2.9 make distcheck
+
+2.9 make check
+
+ - gdiffmk's test script is now plugged to the 'make check'
+ target. The original runtests.in is renamed to runtests.sh with
+ absolute paths. The new script gdiffmk_tests.sh is used to call
+ runtests.sh in $(top_builddir)/contrib/gdiff/tests, because
+ runtest.sh will generate some result files.
+
+2.10 make distcheck
This will attempt to make a tarball, and from this tarball, build
-the package(out-of-source build), clean it (checking that no file
-remains), install it, uninstall it (checking that no file remains in
-the install tree).
+the package(out-of-source build), check it, clean it (checking that no
+file remains), install it, uninstall it (checking that no file remains
+in the install tree).
make distcheck
diff --git a/contrib/gdiffmk/.gitignore b/contrib/gdiffmk/.gitignore
index 3842824..c6ed83e 100644
--- a/contrib/gdiffmk/.gitignore
+++ b/contrib/gdiffmk/.gitignore
@@ -1,2 +1,5 @@
gdiffmk
gdiffmk.n
+tests/gdiffmk_tests.sh.log
+tests/gdiffmk_tests.sh.trs
+tests/result.*
diff --git a/contrib/gdiffmk/Makefile.sub b/contrib/gdiffmk/Makefile.sub
deleted file mode 100644
index 580a9ba..0000000
--- a/contrib/gdiffmk/Makefile.sub
+++ /dev/null
@@ -1,51 +0,0 @@
-# Makefile.sub for `gdiffmk' (integration into the groff source tree)
-
-# File position: <groff-source>/contrib/gdiffmk/Makefile.sub
-
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-# This file is part of the gdiffmk utility, which 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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
-
-########################################################################
-
-MAN1=gdiffmk.n
-MOSTLYCLEANADD=gdiffmk tests/runtests
-RM=rm -f
-
-all: gdiffmk
-
-gdiffmk: gdiffmk.sh
- sed -e "s|@BINDIR@|$(bindir)|g" \
- -e "s|@VERSION@|$(version)$(revision)|g" \
- -e $(SH_SCRIPT_SED_CMD) $(srcdir)/gdiffmk.sh >$@
- chmod +x $@
-
-install_data: gdiffmk
- -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(RM) $(DESTDIR)$(bindir)/gdiffmk
- $(INSTALL_SCRIPT) gdiffmk $(DESTDIR)$(bindir)/gdiffmk
-
-uninstall_sub:
- $(RM) $(DESTDIR)$(bindir)/gdiffmk
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/contrib/gdiffmk/gdiffmk.am b/contrib/gdiffmk/gdiffmk.am
new file mode 100644
index 0000000..62f1dfa
--- /dev/null
+++ b/contrib/gdiffmk/gdiffmk.am
@@ -0,0 +1,58 @@
+# Automake rules for `gdiffmk' (integration into the groff source tree)
+#
+# File position: <groff-source>/contrib/gdiffmk/gdiffmk.am
+#
+# Copyright (C) 2004, 2006, 2009, 2014 Free Software Foundation, Inc.
+# Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
+# Automake migration by Bertrand Garrigues
+#
+# This file is part of the gdiffmk utility, which 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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+########################################################################
+gdiffmk_srcdir = $(top_srcdir)/contrib/gdiffmk
+bin_SCRIPTS += gdiffmk
+TESTS += contrib/gdiffmk/tests/gdiffmk_tests.sh
+man1_MANS += contrib/gdiffmk/gdiffmk.n
+EXTRA_DIST += \
+ contrib/gdiffmk/gdiffmk.man \
+ contrib/gdiffmk/ChangeLog \
+ contrib/gdiffmk/README \
+ contrib/gdiffmk/gdiffmk.sh \
+ contrib/gdiffmk/tests/gdiffmk_tests.sh \
+ contrib/gdiffmk/tests/runtests.sh \
+ contrib/gdiffmk/tests/baseline \
+ contrib/gdiffmk/tests/baseline.6 \
+ contrib/gdiffmk/tests/baseline.7 \
+ contrib/gdiffmk/tests/baseline.8 \
+ contrib/gdiffmk/tests/baseline.9 \
+ contrib/gdiffmk/tests/baseline.10 \
+ contrib/gdiffmk/tests/file1 \
+ contrib/gdiffmk/tests/file2
+
+MOSTLYCLEANFILES += gdiffmk
+
+gdiffmk: $(gdiffmk_srcdir)/gdiffmk.sh
+ sed -e "s|address@hidden@]|$(bindir)|g" \
+ -e "s|address@hidden@]|$(VERSION)|g" \
+ -e $(SH_SCRIPT_SED_CMD) $(gdiffmk_srcdir)/gdiffmk.sh >$@
+ chmod +x $@
+
+clean-local: clean_gdiffmk_check
+clean_gdiffmk_check:
+ if test -d $(top_builddir)/contrib/gdiffmk/tests; then \
+ cd $(top_builddir)/contrib/gdiffmk/tests && \
+ $(abs_top_srcdir)/contrib/gdiffmk/tests/runtests.sh clean; \
+ fi
diff --git a/contrib/gdiffmk/tests/gdiffmk_tests.sh
b/contrib/gdiffmk/tests/gdiffmk_tests.sh
new file mode 100755
index 0000000..68be85f
--- /dev/null
+++ b/contrib/gdiffmk/tests/gdiffmk_tests.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Execute runtests.sh in the builddir
+
+mkdir -p ${abs_top_builddir}/contrib/gdiffmk/tests
+cd ${abs_top_builddir}/contrib/gdiffmk/tests
+${abs_top_srcdir}/contrib/gdiffmk/tests/runtests.sh run
diff --git a/contrib/gdiffmk/tests/runtests.in
b/contrib/gdiffmk/tests/runtests.sh
old mode 100644
new mode 100755
similarity index 94%
rename from contrib/gdiffmk/tests/runtests.in
rename to contrib/gdiffmk/tests/runtests.sh
index 714ce48..e41cffe
--- a/contrib/gdiffmk/tests/runtests.in
+++ b/contrib/gdiffmk/tests/runtests.sh
@@ -21,9 +21,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This file is part of GNU gdiffmk.
address@hidden@
+# abs_top_srcdir and abs_top_builddir are set by AM_TESTS_ENVIRONMENT
+# (defined in Makefile.am) when running make check
-command=../gdiffmk
+srcdir=${abs_top_srcdir}/contrib/gdiffmk/tests
+
+command=${abs_top_builddir}/gdiffmk
# Test the number of arguments and the first argument.
case $#-$1 in
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 23/45: Add contrib/gdiffmk, plug gdiffmk test script to `make check'.,
Bertrand Garrigues <=