summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am7
-rw-r--r--NEWS3
-rw-r--r--cfg.mk2
-rw-r--r--configure.ac2
-rw-r--r--maint.mk76
-rw-r--r--man/Makefile.am67
-rw-r--r--man/aid.x4
-rw-r--r--man/defid.x3
-rw-r--r--man/eid.x4
-rw-r--r--man/fid.x4
-rw-r--r--man/fnid.x4
-rw-r--r--man/gid.x4
-rw-r--r--man/lid.x4
-rw-r--r--man/mkid.x4
-rw-r--r--man/xtokid.x4
16 files changed, 183 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 73df85e..3445744 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
*~
.gdb-history
.tarball-version
+.version
ABOUT-NLS
ChangeLog
GNUmakefile
diff --git a/Makefile.am b/Makefile.am
index 1fb8ada..eb6c61e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,10 @@
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = lib libidu src lisp doc testsuite po gnulib-tests
+SUBDIRS = lib libidu src lisp doc man testsuite po gnulib-tests
EXTRA_DIST = \
.prev-version \
+ .version \
.x-sc_cast_of_argument_to_free \
.x-sc_require_config_h \
cfg.mk \
@@ -22,6 +23,10 @@ gen-ChangeLog:
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
+BUILT_SOURCES = .version
+.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+
# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
diff --git a/NEWS b/NEWS
index cfef6fb..a935280 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
idutils NEWS - User visible changes.
+* Noteworthy changes in release 4.3 (????-??-??) [stable]
+
+
Version 4.2 - August 5, 2006, by Claudio Fontana
* Bugfix release
diff --git a/cfg.mk b/cfg.mk
index 5f94cd5..ada134a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -38,3 +38,5 @@ local-checks-to-skip = changelog-check strftime-check patch-check \
# The local directory containing the checked-out copy of gnulib used in
# this release. Used solely to get a date for the "announcement" target.
gnulib_dir = /gnulib
+
+old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e -
diff --git a/configure.ac b/configure.ac
index 647b7a2..7a6da98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,7 @@ AC_CONFIG_SRCDIR([src/mkid.c])
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
# Checks for programs.
+AM_MISSING_PROG(HELP2MAN, help2man)
AC_PROG_CC_STDC
AM_PROG_CC_C_O
AC_PROG_LN_S
@@ -47,6 +48,7 @@ AM_GNU_GETTEXT_VERSION([0.15])
AC_CONFIG_FILES([
po/Makefile.in
doc/Makefile
+ man/Makefile
lib/Makefile
libidu/Makefile
lisp/Makefile
diff --git a/maint.mk b/maint.mk
index 9f49b6e..8f982aa 100644
--- a/maint.mk
+++ b/maint.mk
@@ -1,6 +1,6 @@
# -*-Makefile-*-
-# This Makefile fragment is shared between the coreutils,
-# CPPI, Bison, and Autoconf.
+# This Makefile fragment tries to be general-purpose enough to be
+# used by at least coreutils, idutils, CPPI, Bison, and Autoconf.
## Copyright (C) 2001-2008 Free Software Foundation, Inc.
##
@@ -42,6 +42,7 @@ endif
PREV_VERSION := $(shell cat $(prev_version_file))
VERSION_REGEXP = $(subst .,\.,$(VERSION))
+PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
ifeq ($(VC),$(GIT))
this-vc-tag = v$(VERSION)
@@ -101,7 +102,7 @@ sc_avoid_if_before_free:
exit 1; } || :
sc_cast_of_argument_to_free:
- @grep -nE '\<free \(\(' $$($(VC_LIST_EXCEPT)) && \
+ @grep -nE '\<free *\( *\(' $$($(VC_LIST_EXCEPT)) && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || :
@@ -130,7 +131,7 @@ sc_prohibit_atoi_atof:
# Use STREQ rather than comparing strcmp == 0, or != 0.
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp \(|\<str''cmp \([^)]+\) *==' \
+ @grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
$$($(VC_LIST_EXCEPT)) && \
{ echo '$(ME): use STREQ in place of the above uses of str''cmp' \
1>&2; exit 1; } || :
@@ -149,6 +150,7 @@ sc_file_system:
'rewrite to use "file system"' 1>&2; \
exit 1; } || :
+# Don't use cpp tests of this symbol. All code assumes config.h is included.
sc_no_have_config_h:
@grep -n '^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT)) && \
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
@@ -266,14 +268,17 @@ sc_prohibit_jm_in_m4:
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
+# Ensure that each root-requiring test is run via the "check-root" rule.
sc_root_tests:
@if test -d tests \
&& grep check-root tests/Makefile.am>/dev/null 2>&1; then \
t1=sc-root.expected; t2=sc-root.actual; \
grep -nl '^require_root_$$' \
- $$($(VC_LIST) tests) |sed s,tests,., |sort > $$t1; \
- sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
- $(srcdir)/tests/Makefile.am |sort > $$t2; \
+ $$($(VC_LIST) tests) |sed s,tests/,, |sort > $$t1; \
+ sed -n '/^root_tests =[ ]*\\$$/,/[^\]$$/p' \
+ $(srcdir)/tests/Makefile.am \
+ | sed 's/^ *//;/^root_tests =/d' \
+ | tr -s '\012\\' ' ' | fmt -1 | sort > $$t2; \
diff -u $$t1 $$t2 || diff=1; \
rm -f $$t1 $$t2; \
test "$$diff" \
@@ -336,6 +341,22 @@ sc_system_h_headers: .re-list
1>&2; exit 1; } || :; \
fi
+# Require that the final line of each test-lib.sh-using test be this one:
+# (exit $fail); exit $fail
+# Note: this test requires GNU grep's --label= option.
+sc_require_test_exit_idiom:
+ @if test -f $(srcdir)/tests/test-lib.sh; then \
+ die=0; \
+ for i in $$(grep -l -F /../test-lib.sh $$($(VC_LIST) tests)); do \
+ tail -n1 $$i | grep '^(exit \$$fail); exit \$$fail$$' > /dev/null \
+ && : || { die=1; echo $$i; } \
+ done; \
+ test $$die = 1 && \
+ { echo 1>&2 '$(ME): the final line in each of the above is not:'; \
+ echo 1>&2 '(exit $$fail); exit $$fail'; \
+ exit 1; } || :; \
+ fi
+
sc_sun_os_names:
@grep -nEi \
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
@@ -388,6 +409,41 @@ sc_GPL_version:
@grep -n 'either ''version [^3]' $$($(VC_LIST_EXCEPT)) && \
{ echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || :
+exec_perl_re = \
+ exec \$$PERL -w -I\$$top_srcdir/tests -MCoreutils \
+ -M"CuTmpdir qw(\$$me)" -- - <<\\EOF
+# Ensure that each test invoking $PERL with -MCoreutils uses the same line.
+sc_perl_coreutils_test:
+ @if test -f $(srcdir)/tests/Coreutils.pm; then \
+ die=0; \
+ for i in $$(grep -l '^exec *\$$PERL.*MCoreutils' \
+ $$($(VC_LIST) tests)); do \
+ grep '$(exec_perl_re)' $$i > /dev/null \
+ && : || { die=1; echo $$i; } \
+ done; \
+ test $$die = 1 && \
+ { echo 1>&2 '$(ME): each of the above execs PERL differently:'; \
+ echo 1>&2 '(exit $$fail); exit $$fail'; \
+ exit 1; } || :; \
+ fi
+
+NEWS_hash = \
+ $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
+ $(srcdir)/NEWS | md5sum -)
+
+# Ensure that we don't accidentally insert an entry into an old NEWS block.
+sc_immutable_NEWS:
+ @if test -f $(srcdir)/NEWS; then \
+ test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
+ { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
+ fi
+
+# Update the hash stored above. Do this after each release and
+# for any corrections to old entries.
+update-NEWS-hash: NEWS
+ perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" \
+ $(srcdir)/cfg.mk
+
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2
@@ -507,7 +563,7 @@ writable-files:
test -w $$file \
|| { echo ERROR: $$file is not writable; fail=1; }; \
done; \
- test "$$fail" && exit 1 || :
+ test "$$fail" && exit 1 || : ; \
fi
v_etc_file = lib/version-etc.c
@@ -592,10 +648,12 @@ my-distcheck: $(local-check) check
mkdir -p $(t)
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
cd $(t)/$(distdir) \
- && ./configure --disable-nls \
+ && ./configure --disable-nls --prefix=$(t)/i \
&& $(MAKE) CFLAGS='$(warn_cflags)' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
+ && $(MAKE) install \
+ && test -f $(mandir)/man1/mkid.1 \
&& mkdir $(bin) \
&& ($(write_loser)) > $(bin)/loser \
&& chmod a+x $(bin)/loser \
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..aff98d1
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,67 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-
+dist_man_MANS = mkid.1 lid.1 fid.1 fnid.1 xtokid.1 eid.1 aid.1 gid.1 defid.1
+
+man_aux = $(dist_man_MANS:.1=.x)
+EXTRA_DIST = $(man_aux)
+MAINTAINERCLEANFILES = $(man_MANS)
+
+# Depend on .version to get version number changes.
+common_dep = $(top_srcdir)/.version
+
+mkid.1: $(common_dep) $(srcdir)/mkid.x ../src/mkid.c
+lid.1: $(common_dep) $(srcdir)/lid.x ../src/lid.c
+fid.1: $(common_dep) $(srcdir)/fid.x ../src/fid.c
+fnid.1: $(common_dep) $(srcdir)/fnid.x ../src/fnid.c
+xtokid.1: $(common_dep) $(srcdir)/xtokid.x ../src/xtokid.c
+eid.1: $(common_dep) $(srcdir)/eid.x ../src/eid ../src/lid.c
+aid.1: $(common_dep) $(srcdir)/aid.x ../src/aid ../src/lid.c
+gid.1: $(common_dep) $(srcdir)/gid.x ../src/gid ../src/lid.c
+
+SUFFIXES = .x .1
+
+# Ensure that help2man runs the ../src/ginstall binary as
+# `install' when creating install.1.
+# Similarly, ensure that it uses the ../src/[ binary to create test.1.
+t = $*.td
+mapped_name = `echo $*|sed 's/install/ginstall/; s/test/[/'`
+
+# That is necessary to avoid failures for programs that are also shell built-in
+# functions like echo, false, printf, pwd.
+.x.1:
+ @echo "Updating man page $@"; \
+ PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ $(HELP2MAN) \
+ --include=$(srcdir)/$*.x \
+ --output=$@ $*$(EXEEXT)
+
+check-local: check-x-vs-1 check-programs-vs-x
+
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
+# Ensure that for each .x file in this directory, there is a
+# corresponding .1 file in the definition of $(dist_man_MANS) above.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+ PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ t=ls-files.$$$$; \
+ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+ echo $(dist_man_MANS) | fmt -w1 | sed 's/\.1$$//' | $(ASSORT) \
+ | diff -u - $$t || { rm $$t; exit 1; }; \
+ rm $$t
+
+programs = \
+ echo 'spy:;@echo $$(all_programs)' \
+ | MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \
+ | fmt -1 | $(ASSORT) -u | grep -v '\['
+
+.PHONY: check-programs-vs-x
+check-programs-vs-x:
+ for p in `$(programs)`; do \
+ test $$p = ginstall && p=install || : ; \
+ test -f $(srcdir)/$$p.x \
+ || { echo missing $$p.x 1>&2; missing=1; }; \
+ done; \
+ test "$$missing" = 1 && exit 1 || :
diff --git a/man/aid.x b/man/aid.x
new file mode 100644
index 0000000..940eaf7
--- /dev/null
+++ b/man/aid.x
@@ -0,0 +1,4 @@
+[NAME]
+aid \- Query ID database and report results.
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/defid.x b/man/defid.x
new file mode 100644
index 0000000..f56e0ad
--- /dev/null
+++ b/man/defid.x
@@ -0,0 +1,3 @@
+[NAME]
+defid \- [DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/eid.x b/man/eid.x
new file mode 100644
index 0000000..81036cb
--- /dev/null
+++ b/man/eid.x
@@ -0,0 +1,4 @@
+[NAME]
+eid \- Query ID database and report results.
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/fid.x b/man/fid.x
new file mode 100644
index 0000000..a190b5e
--- /dev/null
+++ b/man/fid.x
@@ -0,0 +1,4 @@
+[NAME]
+fid \- List identifiers in F1; if F2 is also given, list those common to both
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/fnid.x b/man/fnid.x
new file mode 100644
index 0000000..3f0adcb
--- /dev/null
+++ b/man/fnid.x
@@ -0,0 +1,4 @@
+[NAME]
+fnid \- Print constituent file names that match PATTERN,
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/gid.x b/man/gid.x
new file mode 100644
index 0000000..9ae9862
--- /dev/null
+++ b/man/gid.x
@@ -0,0 +1,4 @@
+[NAME]
+gid \- Query ID database and report results.
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/lid.x b/man/lid.x
new file mode 100644
index 0000000..1e9b56f
--- /dev/null
+++ b/man/lid.x
@@ -0,0 +1,4 @@
+[NAME]
+lid \- Query ID database and report results.
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/mkid.x b/man/mkid.x
new file mode 100644
index 0000000..c313181
--- /dev/null
+++ b/man/mkid.x
@@ -0,0 +1,4 @@
+[NAME]
+mkid \- build an identifier database
+[DESCRIPTION]
+.\" Add any additional description here
diff --git a/man/xtokid.x b/man/xtokid.x
new file mode 100644
index 0000000..af17e48
--- /dev/null
+++ b/man/xtokid.x
@@ -0,0 +1,4 @@
+[NAME]
+xtokid \- Print all tokens found in a source file.
+[DESCRIPTION]
+.\" Add any additional description here