diff options
-rw-r--r-- | .gitignore | 58 | ||||
-rw-r--r-- | .prev-version | 1 | ||||
-rw-r--r-- | .x-sc_cast_of_argument_to_free | 1 | ||||
-rw-r--r-- | .x-sc_require_config_h | 1 | ||||
-rw-r--r-- | GNUmakefile | 71 | ||||
-rw-r--r-- | INSTALL-cvs | 17 | ||||
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | Makefile.cfg | 40 | ||||
-rw-r--r-- | Makefile.maint | 679 | ||||
-rw-r--r-- | README-hacking | 71 | ||||
-rwxr-xr-x | bootstrap | 612 | ||||
-rw-r--r-- | bootstrap.conf | 127 | ||||
-rwxr-xr-x | build-aux/vc-list-files | 50 | ||||
-rw-r--r-- | configure.ac | 42 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | gnulib-tests/Makefile.am | 1 | ||||
-rw-r--r-- | lib/Makefile.am | 217 | ||||
-rw-r--r-- | libidu/Makefile.am | 1 | ||||
-rw-r--r-- | po/POTFILES.in | 9 |
19 files changed, 1751 insertions, 262 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a4fd0f --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +*.o +*/.deps +*~ +.gdb-history +.version +ABOUT-NLS +INSTALL +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +build-aux +config.cache +config.h +config.hin +config.log +config.status +configure +doc/*.info +doc/stamp-vti +doc/version.texi +gnulib-tests/.gitignore +gnulib-tests/test-* +gnulib-tests/uniwidth +idutils-*.tar.bz2 +idutils-*.tar.bz2.sig +idutils-*.tar.gz +idutils-*.tar.gz.sig +idutils-*.tar.lzma +idutils-*.tar.lzma.sig +lib/.cvsignore +lib/.gitignore +lib/charset.alias +lib/configmake.h +lib/libgnu.a +lib/stamp-h1 +lib/uniwidth +libidu/libidu.a +lisp/elc-stamp +lisp/idutils.elc +m4/.gitignore +po/*.gmo +po/*.po +po/.gitignore +po/.reference +po/LINGUAS +po/Makefile.in +po/Makevars +po/POTFILES +po/coreutils.pot +po/idutils.pot +po/stamp-po +src/fid +src/fnid +src/lid +src/mkid +src/xtokid +testsuite/ID diff --git a/.prev-version b/.prev-version new file mode 100644 index 0000000..bf77d54 --- /dev/null +++ b/.prev-version @@ -0,0 +1 @@ +4.2 diff --git a/.x-sc_cast_of_argument_to_free b/.x-sc_cast_of_argument_to_free new file mode 100644 index 0000000..a0381d1 --- /dev/null +++ b/.x-sc_cast_of_argument_to_free @@ -0,0 +1 @@ +^src/lid\.c$ diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h new file mode 100644 index 0000000..178b03c --- /dev/null +++ b/.x-sc_require_config_h @@ -0,0 +1 @@ +^testsuite/single_file_token_bug\.c$ diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..3dc6f15 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,71 @@ +# Having a separate GNUmakefile lets me `include' the dynamically +# generated rules created via Makefile.maint as well as Makefile.maint itself. +# This makefile is used only if you run GNU Make. +# It is necessary if you want to build targets usually of interest +# only to the maintainer. + +# Copyright (C) 2001, 2003, 2006-2007 Free Software Foundation, Inc. +# +# This program 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. + +# This program 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/>. + +# Systems where /bin/sh is not the default shell need this. The $(shell) +# command below won't work with e.g. stock DOS/Windows shells. +ifeq ($(wildcard /bin/s[h]),/bin/sh) +SHELL = /bin/sh +else +# will be used only with the next shell-test line, then overwritten +# by a configured-in value +SHELL = sh +endif + +have-Makefile := $(shell test -f Makefile && echo yes) + +# If the user runs GNU make but has not yet run ./configure, +# give them a diagnostic. +ifeq ($(have-Makefile),yes) + +# Make tar archive easier to reproduce. +export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner + +include Makefile + +# Ensure that $(VERSION) is up to date for dist-related targets, but not +# for others: running autoreconf and recompiling everything isn't cheap. +ifeq (0,$(MAKELEVEL)) + _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS)) + ifneq (,$(_is-dist-target)) + _curr-ver := $(shell build-aux/git-version-gen .version) + ifneq ($(_curr-ver),$(VERSION)) + $(info INFO: running autoreconf for new version string: $(_curr-ver)) + dummy := $(shell rm -rf autom4te.cache; autoreconf) + endif + endif +endif + +include $(srcdir)/Makefile.cfg +include $(srcdir)/Makefile.maint + +else + +all: + @echo There seems to be no Makefile in this directory. 1>&2 + @echo "You must run ./configure before running \`make'." 1>&2 + @exit 1 + +endif + +# Tell version 3.79 and up of GNU make to not build goals in this +# directory in parallel. This is necessary in case someone tries to +# build multiple targets on one command line. +.NOTPARALLEL: diff --git a/INSTALL-cvs b/INSTALL-cvs deleted file mode 100644 index e5b2910..0000000 --- a/INSTALL-cvs +++ /dev/null @@ -1,17 +0,0 @@ -To be able to build from cvs you will need -the whole autotools suite + gettext. - -run ./autogen.sh -run configure --enable-maintainer-mode - -Now you are set (run make, make install or whatever). - -I had problems to generate in doc/ because of tex / etex -conflicts. - -If this happens to you, try to set your environment variable TEX, -for example: - -TEX=tex -export TEX - diff --git a/Makefile.am b/Makefile.am index ef6afb7..cb3cc2c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,17 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = m4 intl lib libidu src lisp doc testsuite po -EXTRA_DIST = README-alpha config.rpath mkinstalldirs autogen.sh +SUBDIRS = lib libidu src lisp doc testsuite po gnulib-tests +EXTRA_DIST = \ + .prev-version \ + .x-sc_cast_of_argument_to_free \ + .x-sc_require_config_h \ + GNUmakefile \ + Makefile.cfg \ + Makefile.maint \ + bootstrap \ + bootstrap.conf \ + build-aux/vc-list-files # When the version number is composed of only digits and "."s, # ensure that it matches the "Version:" comment in idutils.el. diff --git a/Makefile.cfg b/Makefile.cfg new file mode 100644 index 0000000..1abec60 --- /dev/null +++ b/Makefile.cfg @@ -0,0 +1,40 @@ +# Customize Makefile.maint. -*- makefile -*- +# Copyright (C) 2003-2008 Free Software Foundation, Inc. + +# This program 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. + +# This program 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/>. + +# Use alpha.gnu.org for alpha and beta releases. +# Use ftp.gnu.org for major releases. +gnu_ftp_host-alpha = alpha.gnu.org +gnu_ftp_host-beta = alpha.gnu.org +gnu_ftp_host-major = ftp.gnu.org +gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) + +url_dir_list = \ + ftp://$(gnu_rel_host)/gnu/coreutils + +# The GnuPG ID of the key used to sign the tarballs. +gpg_key_ID = B9AB9A16 + +# Tests not to run as part of "make distcheck". +# Exclude changelog-check here so that there's less churn in ChangeLog +# files -- otherwise, you'd need to have the upcoming version number +# at the top of the file for each `make distcheck' run. +local-checks-to-skip = changelog-check strftime-check patch-check \ + sc_prohibit_atoi_atof sc_changelog sc_tight_scope \ + sc_trailing_blank check-AUTHORS + +# 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 diff --git a/Makefile.maint b/Makefile.maint new file mode 100644 index 0000000..fe6bee5 --- /dev/null +++ b/Makefile.maint @@ -0,0 +1,679 @@ +# -*-Makefile-*- +# This Makefile fragment is shared between the coreutils, +# CPPI, Bison, and Autoconf. + +## Copyright (C) 2001-2007 Free Software Foundation, Inc. +## +## This program 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. +## +## This program 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/>. + +# This is reported not to work with make-3.79.1 +# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +ME := Makefile.maint + +# Do not save the original name or timestamp in the .tar.gz file. +# Use --rsyncable if available. +gzip_rsyncable := \ + $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) +GZIP_ENV = '--no-name --best $(gzip_rsyncable)' + +CVS = cvs +GIT = git +VC = $(GIT) +VC-tag = git-tag -s -m '$(VERSION)' + +CVS_LIST = build-aux/vc-list-files + +CVS_LIST_EXCEPT = \ + $(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi + +ifeq ($(origin prev_version_file), undefined) + prev_version_file = .prev-version +endif + +PREV_VERSION := $(shell cat $(prev_version_file)) +VERSION_REGEXP = $(subst .,\.,$(VERSION)) + +ifeq ($(VC),$(GIT)) +this-vc-tag = v$(VERSION) +this-vc-tag-regexp = v$(VERSION_REGEXP) +else +tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') +tag-this-version = $(subst .,_,$(VERSION)) +this-vc-tag = $(tag-package)-$(tag-this-version) +this-vc-tag-regexp = $(this-vc-tag) +endif +my_distdir = $(PACKAGE)-$(VERSION) + +# Old releases are stored here. +# Used for diffs and xdeltas. +release_archive_dir ?= ../release + +# Prevent programs like 'sort' from considering distinct strings to be equal. +# Doing it here saves us from having to set LC_ALL elsewhere in this file. +export LC_ALL = C + + + +## --------------- ## +## Sanity checks. ## +## --------------- ## + +# FIXME: add a check to prohibit definition in src/*.c of symbols defined +# in system.h. E.g. today I removed from tail.c a useless definition of +# ENOSYS. It was useless because system.h ensures it's defined. + +# Collect the names of rules starting with `sc_'. +syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME)) +.PHONY: $(syntax-check-rules) + +# Checks that don't require cvs. +# Run `changelog-check' last, as previous test may reveal problems requiring +# new ChangeLog entries. +local-checks-available = \ + po-check copyright-check m4-check author_mark_check \ + changelog-check patch-check strftime-check $(syntax-check-rules) \ + makefile_path_separator_check \ + makefile-check check-AUTHORS +.PHONY: $(local-checks-available) + +local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available)) + +syntax-check: $(local-check) +# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \ +# $$(find -type f -name '*.[chly]') && \ +# { echo '$(ME): found conditional include' 1>&2; \ +# exit 1; } || : + +# grep -nE '^# *include <(string|stdlib)\.h>' \ +# $(srcdir)/{lib,src}/*.[chy] && \ +# { echo '$(ME): FIXME' 1>&2; \ +# exit 1; } || : +# FIXME: don't allow `#include .strings\.h' anywhere + +sc_cast_of_argument_to_free: + @grep -nE '\<free \(\(' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): don'\''t cast free argument' 1>&2; \ + exit 1; } || : + +sc_cast_of_x_alloc_return_value: + @grep -nE '\*\) *x(m|c|re)alloc\>' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \ + exit 1; } || : + +sc_cast_of_alloca_return_value: + @grep -nE '\*\) *alloca\>' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): don'\''t cast alloca return value' 1>&2; \ + exit 1; } || : + +sc_space_tab: + @grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ + 1>&2; exit 1; } || : + +# Don't use *scanf or the old ato* functions in `real' code. +# They provide no error checking mechanism. +# Instead, use strto* functions. +sc_prohibit_atoi_atof: + @grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \ + 1>&2; exit 1; } || : + +# Use STREQ rather than comparing strcmp == 0, or != 0. +sc_prohibit_strcmp: + @grep -nE '! *str''cmp \(|\<str''cmp \([^)]+\) *==' \ + $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): use STREQ in place of the above uses of str''cmp' \ + 1>&2; exit 1; } || : + +# Using EXIT_SUCCESS as the first argument to error is misleading, +# since when that parameter is 0, error does not exit. Use `0' instead. +sc_error_exit_success: + @grep -nF 'error (EXIT_SUCCESS,' \ + $$(find -type f -name '*.[chly]') && \ + { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ + exit 1; } || : + +sc_file_system: + @grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found use of "file''system";' \ + 'rewrite to use "file system"' 1>&2; \ + exit 1; } || : + +sc_no_have_config_h: + @grep -n 'HAVE''_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found use of HAVE''_CONFIG_H; remove' \ + 1>&2; exit 1; } || : + +# Nearly all .c files must include <config.h>. +sc_require_config_h: + @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ + grep -L '^# *include <config\.h>' \ + $$($(CVS_LIST_EXCEPT) | grep '\.c$$') \ + | grep . && \ + { echo '$(ME): the above files do not include <config.h>' \ + 1>&2; exit 1; } || :; \ + else :; \ + fi + +# Prohibit the inclusion of assert.h without an actual use of assert. +sc_prohibit_assert_without_use: + @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ + files=$$(grep -l '# *include <assert\.h>' \ + $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \ + grep -L '\<assert (' $$files \ + | grep . && \ + { echo "$(ME): the above files include <assert.h> but don't use it" \ + 1>&2; exit 1; } || :; \ + else :; \ + fi + +# Don't include quotearg.h unless you use one of its functions. +sc_prohibit_quotearg_without_use: + @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ + files=$$(grep -l '# *include "quotearg\.h"' \ + $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \ + grep -LE '\<quotearg(_[^ ]+)? \(' $$files \ + | grep . && \ + { echo "$(ME): the above files include "quotearg.h" but don't use it" \ + 1>&2; exit 1; } || :; \ + else :; \ + fi + +# Don't include quote.h unless you use one of its functions. +sc_prohibit_quote_without_use: + @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ + files=$$(grep -l '# *include "quote\.h"' \ + $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \ + grep -LE '\<quote(_n)? \(' $$files \ + | grep . && \ + { echo "$(ME): the above files include "quote.h" but don't use it" \ + 1>&2; exit 1; } || :; \ + else :; \ + fi + +sc_obsolete_symbols: + @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ + $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \ + 1>&2; exit 1; } || : + +# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ + +# Each nonempty line must start with a year number, or a TAB. +sc_changelog: + @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \ + { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ + exit 1; } || : + +# Ensure that dd's definition of LONGEST_SYMBOL stays in sync +# with the strings from the two affected variables. +dd_c = $(srcdir)/src/dd.c +sc_dd_max_sym_length: +ifneq ($(wildcard $(dd_c)),) + @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\ + sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \ + |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \ + | wc --max-line-length); \ + max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \ + |tr -d '"' | wc --max-line-length); \ + if test "$$len" = "$$max"; then :; else \ + echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \ + exit 1; \ + fi +endif + +# Many m4 macros names once began with `jm_'. +# On 2004-04-13, they were all changed to start with gl_ instead. +# Make sure that none are inadvertently reintroduced. +sc_prohibit_jm_in_m4: + @grep -nE 'jm_[A-Z]' \ + $$($(CVS_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \ + { echo '$(ME): do not use jm_ in m4 macro names' \ + 1>&2; exit 1; } || : + +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 '^PRIV_CHECK_ARG=require-root' \ + $$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \ + sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \ + $(srcdir)/tests/Makefile.am |sort > $$t2; \ + diff -u $$t1 $$t2 || diff=1; \ + rm -f $$t1 $$t2; \ + test "$$diff" \ + && { echo 'tests/Makefile.am: missing check-root action'>&2; \ + exit 1; } || :; \ + fi + +headers_with_interesting_macro_defs = \ + exit.h \ + fcntl_.h \ + fnmatch_.h \ + intprops.h \ + inttypes_.h \ + lchown.h \ + openat.h \ + stat-macros.h \ + stdint_.h + +# Create a list of regular expressions matching the names +# of macros that are guaranteed by parts of gnulib to be defined. +.re-defmac: + @(cd $(srcdir)/lib; \ + for f in $(headers_with_interesting_macro_defs); do \ + test -f $$f && \ + sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \ + done; \ + ) | sort -u \ + | grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \ + | sed 's/^/^# *define /' \ + > $@-t + @mv $@-t $@ + +# Don't define macros that we already get from gnulib header files. +sc_always_defined_macros: .re-defmac + @if test -f $(srcdir)/src/system.h; then \ + trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \ + grep -f .re-defmac $$($(CVS_LIST)) \ + && { echo '$(ME): define the above via some gnulib .h file' \ + 1>&2; exit 1; } || :; \ + fi + +# Create a list of regular expressions matching the names +# of files included from system.h. Exclude a couple. +.re-list: + @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \ + | grep -Ev 'sys/(param|file)\.h' \ + | sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \ + > $@-t + @mv $@-t $@ + +# Files in src/ should not include directly any of +# the headers already included via system.h. +sc_system_h_headers: .re-list + @if test -f $(srcdir)/src/system.h; then \ + trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \ + grep -nE -f .re-list \ + $$($(CVS_LIST) src | \ + grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \ + && { echo '$(ME): the above are already included via system.h'\ + 1>&2; exit 1; } || :; \ + fi + +sc_sun_os_names: + @grep -nEi \ + 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \ + $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \ + exit 1; } || : + +sc_the_the: + @grep -ni '\<the ''the\>' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found use of "the ''the";' 1>&2; \ + exit 1; } || : + +sc_tight_scope: + $(MAKE) -C src $@ + +sc_trailing_blank: + @grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found trailing blank(s)' \ + 1>&2; exit 1; } || : + +# Match lines like the following, but where there is only one space +# between the options and the description: +# -D, --all-repeated[=delimit-method] print all duplicate lines\n +longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)? +sc_two_space_separator_in_usage: + @grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \ + $$($(CVS_LIST_EXCEPT)) && \ + { echo "$(ME): help2man requires at least two spaces between"; \ + echo "$(ME): an option and its description"; \ + 1>&2; exit 1; } || : + +# Look for diagnostics that aren't marked for translation. +# This won't find any for which error's format string is on a separate line. +sc_unmarked_diagnostics: + @grep -nE \ + '\<error \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \ + | grep -v '_''(' && \ + { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \ + exit 1; } || : + +# Avoid useless parentheses like those in this example: +# #if defined (SYMBOL) || defined (SYM2) +sc_useless_cpp_parens: + @grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found useless parentheses in cpp directive' \ + 1>&2; exit 1; } || : + +# Require the latest GPL. +sc_GPL_version: + @grep -n 'either ''version [^3]' $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || : + +# Ensure that the c99-to-c89 patch applies cleanly. +patch-check: + rm -rf src-c89 $@.1 $@.2 + cp -a src src-c89 + (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \ + > $@.1 2>&1 + if test "$$REGEN_PATCH" = yes; then \ + diff -upr src src-c89 | sed 's,src-c89/,src/,' \ + | grep -v '^Only in' > new-diff || : ; fi + grep -v '^patching file ' $@.1 > $@.2 || : + msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \ + rm -f src-c89/*.o || msg='rm failed'; \ + $(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \ + || msg='compile failure with extra options'; \ + test "$$msg" = ok && rm -rf src-c89 $@.1 $@.2 || echo "$$msg" 1>&2; \ + test "$$msg" = ok + +# Ensure that date's --help output stays in sync with the info +# documentation for GNU strftime. The only exception is %N, +# which date accepts but GNU strftime does not. +extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/' +strftime-check: + if test -f $(srcdir)/src/date.c; then \ + grep '^ %. ' $(srcdir)/src/date.c | sort \ + | $(extract_char) > $@-src; \ + { echo N; \ + info libc date calendar format | grep '^ `%.'\' \ + | $(extract_char); } | sort > $@-info; \ + diff -u $@-src $@-info || exit 1; \ + rm -f $@-src $@-info; \ + fi + +check-AUTHORS: + $(MAKE) -C src $@ + +# Ensure that we use only the standard $(VAR) notation, +# not @...@ in Makefile.am, now that we can rely on automake +# to emit a definition for each substituted variable. +makefile-check: + grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \ + && { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || : + +news-date-check: NEWS + today=`date +%Y-%m-%d`; \ + if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \ + >/dev/null; then \ + :; \ + else \ + echo "version or today's date is not in NEWS" 1>&2; \ + exit 1; \ + fi + +changelog-check: + if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \ + >/dev/null; then \ + :; \ + else \ + echo "$(VERSION) not in ChangeLog" 1>&2; \ + exit 1; \ + fi + +m4-check: + @grep -n 'AC_DEFUN([^[]' m4/*.m4 \ + && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \ + exit 1; } || : + +# Verify that all source files using _() are listed in po/POTFILES.in. +# FIXME: don't hard-code file names below; use a more general mechanism. +po-check: + if test -f po/POTFILES.in; then \ + grep -E -v '^(#|$$)' po/POTFILES.in \ + | grep -v '^src/false\.c$$' | sort > $@-1; \ + files=; \ + for file in $$($(CVS_LIST_EXCEPT)) lib/*.[ch]; do \ + case $$file in \ + djgpp/* | man/*) continue;; \ + */c99-to-c89.diff) continue;; \ + esac; \ + case $$file in \ + *.[ch]) \ + base=`expr " $$file" : ' \(.*\)\..'`; \ + { test -f $$base.l || test -f $$base.y; } && continue;; \ + esac; \ + files="$$files $$file"; \ + done; \ + grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ + | sort -u > $@-2; \ + diff -u $@-1 $@-2 || exit 1; \ + rm -f $@-1 $@-2; \ + fi + +# In a definition of #define AUTHORS "... and ..." where the RHS contains +# the English word `and', the string must be marked with `N_ (...)' so that +# gettext recognizes it as a string requiring translation. +author_mark_check: + @grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \ + { echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \ + exit 1; } || : + +# Sometimes it is useful to change the PATH environment variable +# in Makefiles. When doing so, it's better not to use the Unix-centric +# path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'. +# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable, +# and there probably aren't many projects with so many Makefile.am files +# that we'd have to worry about limits on command line length. +msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead' +makefile_path_separator_check: + @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \ + && { echo $(msg) 1>&2; exit 1; } || : + +# Check that `make alpha' will not fail at the end of the process. +writable-files: + if test -d $(release_archive_dir); then :; else \ + mkdir $(release_archive_dir); \ + fi + for file in $(distdir).tar.gz $(xd-delta) \ + $(release_archive_dir)/$(distdir).tar.gz \ + $(release_archive_dir)/$(xd-delta); do \ + test -e $$file || continue; \ + test -w $$file \ + || { echo ERROR: $$file is not writable; fail=1; }; \ + done; \ + test "$$fail" && exit 1 || : + +v_etc_file = lib/version-etc.c +sample-test = tests/sample-test +texi = doc/$(PACKAGE).texi +# Make sure that the copyright date in $(v_etc_file) is up to date. +# Do the same for the $(sample-test) and the main doc/.texi file. +copyright-check: + @if test -f $(v_etc_file); then \ + grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \ + >/dev/null \ + || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \ + exit 1; }; \ + fi + @if test -f $(sample-test); then \ + grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \ + >/dev/null \ + || { echo 'out of date copyright in $(sample-test); update it' 1>&2; \ + exit 1; }; \ + fi + @if test -f $(texi); then \ + grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \ + >/dev/null \ + || { echo 'out of date copyright in $(texi); update it' 1>&2; \ + exit 1; }; \ + fi + +vc-diff-check: + $(VC) diff > vc-diffs || : + if test -s vc-diffs; then \ + cat vc-diffs; \ + echo "Some files are locally modified:" 1>&2; \ + exit 1; \ + else \ + rm vc-diffs; \ + fi + +cvs-check: vc-diff-check + +maintainer-distcheck: + $(MAKE) distcheck + $(MAKE) my-distcheck + + +# Don't make a distribution if checks fail. +# Also, make sure the NEWS file is up-to-date. +vc-dist: $(local-check) cvs-check maintainer-distcheck + $(MAKE) dist + +# Use this to make sure we don't run these programs when building +# from a virgin tgz file, below. +null_AM_MAKEFLAGS = \ + ACLOCAL=false \ + AUTOCONF=false \ + AUTOMAKE=false \ + AUTOHEADER=false \ + MAKEINFO=false + +built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list) + +warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith +bin=bin-$$$$ + +write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)' + +# Use -Wformat -Werror to detect format-string/arg-list mismatches. +# Also, check for shadowing problems with -Wshadow, and for pointer +# arithmetic problems with -Wpointer-arith. +# These CFLAGS are pretty strict. If you build this target, you probably +# have to have a recent version of gcc and glibc headers. +# The for-loop below ensures that there is a bin/ directory full of all +# of the programs under test (except the few that are required for basic +# Makefile rules), all symlinked to the just-built "false" program. +# This is to ensure that if ever a test neglects to make PATH include +# the build srcdir, these always-failing programs will run. +# Otherwise, it is too easy to test the wrong programs. +# Note that "false" itself is a symlink to true, so it too will malfunction. +TMPDIR ?= /tmp +t=$(TMPDIR)/$(PACKAGE)/test +my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz) check + -rm -rf $(t) + mkdir -p $(t) + GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz + cd $(t)/$(distdir) \ + && ./configure --disable-nls \ + && $(MAKE) CFLAGS='$(warn_cflags)' \ + AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \ + && $(MAKE) dvi \ + && mkdir $(bin) \ + && ($(write_loser)) > $(bin)/loser \ + && chmod a+x $(bin)/loser \ + && for i in $(built_programs); do \ + case $$i in \ + rm|expr|basename|echo|sort|ls|tr);; \ + cat|dirname|mv|wc);; \ + *) ln $(bin)/loser $(bin)/$$i;; \ + esac; \ + done \ + && ln -sf ../src/true $(bin)/false \ + && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \ + && $(MAKE) -C gnulib-tests check \ + && rm -rf $(bin) \ + && $(MAKE) distclean + (cd $(t) && mv $(distdir) $(distdir).old \ + && $(AMTAR) -zxf - ) < $(distdir).tar.gz + diff -ur $(t)/$(distdir).old $(t)/$(distdir) + if test -f $(srcdir)/src/c99-to-c89.diff; then \ + cd $(t)/$(distdir) \ + && (cd src && patch -V never --fuzz=0 <c99-to-c89.diff) \ + && ./configure --disable-largefile \ + CFLAGS='-Werror -ansi -Wno-long-long' \ + && $(MAKE); \ + fi + -rm -rf $(t) + @echo "========================"; \ + echo "$(distdir).tar.gz is ready for distribution"; \ + echo "========================" + +WGET = wget +WGETFLAGS = -C off + +rel-check: + tarz=/tmp/rel-check-tarz-$$$$; \ + md5_tmp=/tmp/rel-check-md5-$$$$; \ + set -e; \ + trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \ + $(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \ + echo "$(md5) -" > $$md5_tmp; \ + md5sum -c $$md5_tmp < $$tarz + +prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz +xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta + +rel-files = $(xd-delta) $(DIST_ARCHIVES) + +# Approximate the date of last gnulib "update" by the ChangeLog file's +# mtime, and provide that date in the announcement. +announcement: NEWS ChangeLog $(rel-files) + @cl_date=$$(stat --printf @%Y $(gnulib_dir)/ChangeLog); \ + utc_date=$$(date -u --date $$cl_date '+%Y-%m-%d %T %z'); \ + ./build-aux/announce-gen \ + --release-type=$(RELEASE_TYPE) \ + --package=$(PACKAGE) \ + --prev=$(PREV_VERSION) \ + --curr=$(VERSION) \ + --gpg-key-id=$(gpg_key_ID) \ + --news=NEWS \ + --bootstrap-tools=autoconf,automake,bison,gnulib \ + --gnulib-snapshot-time-stamp="$$utc_date" \ + $(addprefix --url-dir=, $(url_dir_list)) + +## ---------------- ## +## Updating files. ## +## ---------------- ## + +ftp-gnu = ftp://ftp.gnu.org/gnu +www-gnu = http://www.gnu.org + +# Use mv, if you don't have/want move-if-change. +move_if_change ?= move-if-change + +emit_upload_commands: + @echo ===================================== + @echo ===================================== + @echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\" + @echo " --to $(gnu_rel_host):$(PACKAGE) \\" + @echo " $(rel-files)" + @echo '# send the /tmp/announcement e-mail' + @echo ===================================== + @echo ===================================== + +$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz + xdelta delta -9 $^ $@ || : + +.PHONY: alpha beta major +alpha beta major: $(local-check) writable-files + test $@ = major \ + && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ + || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ + || : + $(MAKE) vc-dist + $(MAKE) news-date-check changelog-check + $(MAKE) $(xd-delta) + $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) + ln $(rel-files) $(release_archive_dir) + chmod a-w $(rel-files) + $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ + echo $(VERSION) > $(prev_version_file) + $(VC) commit -m \ + '$(prev_version_file): Record previous version: $(VERSION).' \ + $(prev_version_file) diff --git a/README-hacking b/README-hacking new file mode 100644 index 0000000..563d214 --- /dev/null +++ b/README-hacking @@ -0,0 +1,71 @@ +-*- outline -*- + +These notes intend to help people working on the checked-out sources. +These requirements do not apply when building from a distribution tarball. + +* Requirements + +We've opted to keep only the highest-level sources in the GIT repository. +This eases our maintenance burden, (fewer merges etc.), but imposes more +requirements on anyone wishing to build from the just-checked-out sources. +For example, you have to use the latest stable versions of the maintainer +tools we depend upon, including: + +- Automake <http://www.gnu.org/software/automake/> +- Autoconf <http://www.gnu.org/software/autoconf/> +- Bison <http://www.gnu.org/software/bison/> +- Gettext <http://www.gnu.org/software/gettext/> +- Gperf <http://www.gnu.org/software/gperf/> +- Gzip <http://www.gnu.org/software/gzip/> +- Perl <http://www.cpan.org/> +- Rsync <http://samba.anu.edu.au/rsync/> +- Tar <http://www.gnu.org/software/tar/> + +Valgrind <http://valgrind.org/> is also highly recommended, if +Valgrind supports your architecture. + +Only building the initial full source tree will be a bit painful. +Later, a plain `git pull && make' should be sufficient. + +* First GIT checkout + +You can get a copy of the source repository like this: + + $ git clone git://git.sv.gnu.org/idutils + +The next step is to get other files needed to build, which are +extracted from other source packages: + + $ ./bootstrap + +And there you are! Just + + $ ./configure + $ make + $ make check + +At this point, there should be no difference between your local copy, +and the GIT master copy: + + $ git diff + +should output no difference. + +Enjoy! + +----- + +Copyright (C) 2002-2008 Free Software Foundation, Inc. + +This program 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. + +This program 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/>. diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..e66152f --- /dev/null +++ b/bootstrap @@ -0,0 +1,612 @@ +#! /bin/sh + +# Bootstrap this package from checked-out sources. + +# Copyright (C) 2003-2008 Free Software Foundation, Inc. + +# This program 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. + +# This program 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/>. + +# Written by Paul Eggert. + +nl=' +' + +# Ensure file names are sorted consistently across platforms. +LC_ALL=C +export LC_ALL + +local_gl_dir=gl + +# Temporary directory names. +bt='._bootmp' +bt_regex=`echo "$bt"| sed 's/\./[.]/g'` +bt2=${bt}2 + +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Bootstrap this package from the checked-out sources. + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. + --copy Copy files instead of creating symbolic links. + --force Attempt to bootstrap even if the sources seem + not to have been checked out. + --skip-po Do not download po files. + +If the file bootstrap.conf exists in the current working directory, its +contents are read as shell variables to configure the bootstrap. + +Running without arguments will suffice in most cases. +" +} + +# Configuration. + +# Name of the Makefile.am +gnulib_mk=gnulib.mk + +# List of gnulib modules needed. +gnulib_modules= + +# Any gnulib files needed that are not in modules. +gnulib_files= + +# The command to download all .po files for a specified domain into +# a specified directory. Fill in the first %s is the domain name, and +# the second with the destination directory. Use rsync's -L and -r +# options because the latest/%s directory and the .po files within are +# all symlinks. +po_download_command_format=\ +"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'" + +extract_package_name=' + /^AC_INIT(/{ + /.*,.*,.*, */{ + s/// + s/[][]//g + s/)$// + p + q + } + s/AC_INIT(\[*// + s/]*,.*// + s/^GNU // + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + s/[^A-Za-z0-9_]/-/g + p + } +' +package=`sed -n "$extract_package_name" configure.ac` || exit +gnulib_name=lib$package + +build_aux=build-aux +# Extra files from gnulib, which override files from other sources. +gnulib_extra_files=" + $build_aux/install-sh + $build_aux/missing + $build_aux/mdate-sh + $build_aux/texinfo.tex + $build_aux/depcomp + $build_aux/config.guess + $build_aux/config.sub + doc/INSTALL +" + +# Additional gnulib-tool options to use. Use "\newline" to break lines. +gnulib_tool_option_extras= + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES= + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS='\\\ + --flag=_:1:pass-c-format\\\ + --flag=N_:1:pass-c-format\\\ + --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ +' + +# Files we don't want to import. +excluded_files= + +# File that should exist in the top directory of a checked out hierarchy, +# but not in a distribution tarball. +checkout_only_file=README-hacking + +# Whether to use copies instead of symlinks. +copy=false + +# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want +# those files to be generated in directories like lib/, m4/, and po/. +# Or set it to 'auto' to make this script select which to use based +# on which version control system (if any) is used in the source directory. +vc_ignore=auto + +# Override the default configuration, if necessary. +test -r bootstrap.conf && . ./bootstrap.conf + +if test "$vc_ignore" = auto; then + vc_ignore= + test -d .git && vc_ignore=.gitignore + test -d CVS && vc_ignore="$vc_ignore .cvsignore" +fi + +# Translate configuration into internal form. + +# Parse options. + +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; + --skip-po) + SKIP_PO=t;; + --force) + checkout_only_file=;; + --copy) + copy=true;; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac +done + +if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then + echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2 + exit 1 +fi + +# If $STR is not already on a line by itself in $FILE, insert it, +# sorting the new contents of the file and replacing $FILE with the result. +insert_sorted_if_absent() { + file=$1 + str=$2 + test -f $file || touch $file + echo "$str" | sort -u - $file | cmp -s - $file \ + || echo "$str" | sort -u - $file -o $file \ + || exit 1 +} + +# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. +found_aux_dir=no +grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ + >/dev/null && found_aux_dir=yes +grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ + >/dev/null && found_aux_dir=yes +if test $found_aux_dir = no; then + echo "$0: expected line not found in configure.ac. Add the following:" >&2 + echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2 + exit 1 +fi + +# If $build_aux doesn't exist, create it now, otherwise some bits +# below will malfunction. If creating it, also mark it as ignored. +if test ! -d $build_aux; then + mkdir $build_aux + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + insert_sorted_if_absent $dot_ig $build_aux + done +fi + +echo "$0: Bootstrapping from checked-out $package sources..." + +cleanup_gnulib() { + status=$? + rm -fr gnulib + exit $status +} + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + if [ ! -d gnulib ]; then + echo "$0: getting gnulib files..." + + trap cleanup_gnulib 1 2 13 15 + + git clone --depth 2 git://git.sv.gnu.org/gnulib || + cleanup_gnulib + + trap - 1 2 13 15 + fi + GNULIB_SRCDIR=gnulib +esac + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit + +# Get translations. + +download_po_files() { + subdir=$1 + domain=$2 + echo "$0: getting translations into $subdir for $domain..." + cmd=`printf "$po_download_command_format" "$domain" "$subdir"` + eval "$cmd" +} + +# Download .po files to $po_dir/.reference and copy only the new +# or modified ones into $po_dir. Also update $po_dir/LINGUAS. +update_po_files() { + # Directory containing primary .po files. + # Overwrite them only when we're sure a .po file is new. + po_dir=$1 + domain=$2 + + # Download *.po files into this dir. + # Usually contains *.s1 checksum files. + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return + download_po_files $ref_po_dir $domain \ + && ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" + + langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'` + test "$langs" = '*' && langs=x + for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do + case $po in x) continue;; esac + new_po="$ref_po_dir/$po.po" + cksum_file="$ref_po_dir/$po.s1" + if ! test -f "$cksum_file" || + ! test -f "$po_dir/$po.po" || + ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then + echo "updated $po_dir/$po.po..." + cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file" + fi + done +} + +case $SKIP_PO in +'') + if test -d po; then + update_po_files po $package || exit + fi + + if test -d runtime-po; then + update_po_files runtime-po $package-runtime || exit + fi;; +esac + +symlink_to_dir() +{ + src=$1/$2 + dst=${3-$2} + + test -f "$src" && { + + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=`dirname "$dst"` + if ! test -d "$dst_dir"; then + mkdir -p "$dst_dir" + + # If we've just created a directory like lib/uniwidth, + # tell version control system(s) it's ignorable. + # FIXME: for now, this does only one level + parent=`dirname "$dst_dir"` + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` + done + fi + + if $copy; then + { + test ! -h "$dst" || { + echo "$0: rm -f $dst" && + rm -f "$dst" + } + } && + test -f "$dst" && + cmp -s "$src" "$dst" || { + echo "$0: cp -fp $src $dst" && + cp -fp "$src" "$dst" + } + else + test -h "$dst" && + src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 && + dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 && + test "$src_i" = "$dst_i" || { + dot_dots= + case $src in + /*) ;; + *) + case /$dst/ in + *//* | */../* | */./* | /*/*/*/*/*/) + echo >&2 "$0: invalid symlink calculation: $src -> $dst" + exit 1;; + /*/*/*/*/) dot_dots=../../../;; + /*/*/*/) dot_dots=../../;; + /*/*/) dot_dots=../;; + esac;; + esac + + echo "$0: ln -fs $dot_dots$src $dst" && + ln -fs "$dot_dots$src" "$dst" + } + fi + } +} + +cp_mark_as_generated() +{ + cp_src=$1 + cp_dst=$2 + + if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then + symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst" + elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then + symlink_to_dir $local_gl_dir "$cp_dst" + else + case $cp_dst in + *.[ch]) c1='/* '; c2=' */';; + *.texi) c1='@c '; c2= ;; + *.m4|*/Make*|Make*) c1='# ' ; c2= ;; + *) c1= ; c2= ;; + esac + + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=`dirname "$cp_dst"` + test -d "$dst_dir" || mkdir -p "$dst_dir" + + if test -z "$c1"; then + cmp -s "$cp_src" "$cp_dst" || { + echo "$0: cp -f $cp_src $cp_dst" && + rm -f "$cp_dst" && + sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst" + } + else + # Copy the file first to get proper permissions if it + # doesn't already exist. Then overwrite the copy. + cp "$cp_src" "$cp_dst-t" && + ( + echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" && + echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" && + sed "s!$bt_regex/!!g" "$cp_src" + ) > $cp_dst-t && + if cmp -s "$cp_dst-t" "$cp_dst"; then + rm -f "$cp_dst-t" + else + echo "$0: cp $cp_src $cp_dst # with edits" && + mv -f "$cp_dst-t" "$cp_dst" + fi + fi + fi +} + +version_controlled_file() { + dir=$1 + file=$2 + found=no + if test -d CVS; then + grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | + grep '^/[^/]*/[0-9]' > /dev/null && found=yes + elif test -d .git; then + git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes + else + echo "$0: no version control for $dir/$file?" >&2 + fi + test $found = yes +} + +slurp() { + for dir in . `(cd $1 && find * -type d -print)`; do + copied= + sep= + for file in `ls -a $1/$dir`; do + case $file in + .|..) continue;; + .*) continue;; # FIXME: should all file names starting with "." be ignored? + esac + test -d $1/$dir/$file && continue + for excluded_file in $excluded_files; do + test "$dir/$file" = "$excluded_file" && continue 2 + done + if test $file = Makefile.am; then + copied=$copied${sep}$gnulib_mk; sep=$nl + remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g" + sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || { + echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." && + rm -f $dir/$gnulib_mk && + sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk + } + elif { test "${2+set}" = set && test -r $2/$dir/$file; } || + version_controlled_file $dir $file; then + echo "$0: $dir/$file overrides $1/$dir/$file" + else + copied=$copied$sep$file; sep=$nl + if test $file = gettext.m4; then + echo "$0: patching m4/gettext.m4 to remove need for intl/* ..." + rm -f $dir/$file + sed ' + /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\ + AC_DEFUN([AM_INTL_SUBDIR], [ + /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\ + AC_DEFUN([gt_INTL_SUBDIR_CORE], []) + $a\ + AC_DEFUN([gl_LOCK_EARLY], []) + ' $1/$dir/$file >$dir/$file + else + cp_mark_as_generated $1/$dir/$file $dir/$file + fi + fi || exit + done + + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$dir/$dot_ig + if test -n "$copied"; then + insert_sorted_if_absent $ig "$copied" + # If an ignored file name ends with .in.h, then also add + # the name with just ".h". Many gnulib headers are generated, + # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc. + # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed + f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'` + insert_sorted_if_absent $ig "$f" + + # For files like sys_stat.in.h and sys_time.in.h, record as + # ignorable the directory we might eventually create: sys/. + f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'` + insert_sorted_if_absent $ig "$f" + fi + done + done +} + + +# Create boot temporary directories to import from gnulib and gettext. +rm -fr $bt $bt2 && +mkdir $bt $bt2 || exit + +# Import from gnulib. + +gnulib_tool_options="\ + --import\ + --no-changelog\ + --aux-dir $bt/$build_aux\ + --doc-base $bt/doc\ + --lib $gnulib_name\ + --m4-base $bt/m4/\ + --source-base $bt/lib/\ + --tests-base $bt/tests\ + --local-dir $local_gl_dir\ + $gnulib_tool_option_extras\ +" +echo "$0: $gnulib_tool $gnulib_tool_options --import ..." +$gnulib_tool $gnulib_tool_options --import $gnulib_modules && +slurp $bt || exit + +for file in $gnulib_files; do + symlink_to_dir "$GNULIB_SRCDIR" $file || exit +done + + +# Import from gettext. +with_gettext=yes +grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ + with_gettext=no + +if test $with_gettext = yes; then + echo "$0: (cd $bt2; autopoint) ..." + cp configure.ac $bt2 && + (cd $bt2 && autopoint && rm configure.ac) && + slurp $bt2 $bt || exit + + rm -fr $bt $bt2 || exit +fi + +# Coreutils is unusual in that it generates some of its test-related +# Makefile.am files. That must be done before invoking automake. +mam_template=tests/Makefile.am.in +if test -f $mam_template; then + PERL=perl + for tool in cut head join pr sort tac tail test tr uniq wc; do + m=tests/$tool/Makefile.am + t=${m}t + rm -f $m $t + sed -n '1,/^##test-files-begin/p' $mam_template > $t + echo "x = $tool" >> $t + srcdir=tests/$tool + $PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t + sed -n '/^##test-files-end/,$p' $mam_template >> $t + chmod -w $t + mv $t $m + done +fi + +# Horrible, kludges. +# Change paths in gnulib-tests/gnulib.mk from "../.." to "..". +# This must be done before running automake. +m=gnulib-tests/gnulib.mk +sed 's,\.\./\.\.,..,g' $m > $m-t +mv -f $m-t $m + +# Reconfigure, getting other files. + +for command in \ + libtool \ + 'aclocal --force -I m4' \ + 'autoconf --force' \ + 'autoheader --force' \ + 'automake --add-missing --copy --force-missing'; +do + if test "$command" = libtool; then + grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null || + continue + command='libtoolize -c -f' + fi + echo "$0: $command ..." + $command || exit +done + + +# Get some extra files from gnulib, overriding existing files. +for file in $gnulib_extra_files; do + case $file in + */INSTALL) dst=INSTALL;; + build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;; + *) dst=$file;; + esac + symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit +done + +if test $with_gettext = yes; then + # Create gettext configuration. + echo "$0: Creating po/Makevars from po/Makevars.template ..." + rm -f po/Makevars + sed ' + /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} + } + ' po/Makevars.template >po/Makevars + + if test -d runtime-po; then + # Similarly for runtime-po/Makevars, but not quite the same. + rm -f runtime-po/Makevars + sed ' + /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ + /^subdir *=.*/s/=.*/= runtime-po/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} + } + ' <po/Makevars.template >runtime-po/Makevars + + # Copy identical files from po to runtime-po. + (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi +fi + +chmod a+x gnulib-tests/test-*.sh + +echo "$0: done. Now you can run './configure'." diff --git a/bootstrap.conf b/bootstrap.conf new file mode 100644 index 0000000..6e92612 --- /dev/null +++ b/bootstrap.conf @@ -0,0 +1,127 @@ +# Bootstrap configuration. + +# Copyright (C) 2006-2008 Free Software Foundation, Inc. + +# This program 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, or (at your option) +# any later version. + +# This program 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + + +# We don't need these modules, even though gnulib-tool mistakenly +# includes them because of gettext and fchdir dependencies. +avoided_gnulib_modules=' + --avoid=lock + --avoid=canonicalize-lgpl +' + +# These modules are obsolete and can probably be removed soon, +# but leave them in for now to minimize changes. +obsolete_gnulib_modules=' + atexit free memchr memcmp memcpy memmove memset rename + strcspn strtod strtol utime +' + +gnulib_name=libgnu + +# gnulib modules used by this package. +gnulib_modules=" + $avoided_gnulib_modules + $obsolete_gnulib_modules + alloca + alloca-opt + atexit + closeout + dirname + error + exclude + exit + exitfail + extensions + fnmatch + fnmatch-gnu + fpending + getcwd + getopt + gettext + git-version-gen + gnu-make + gnupload + havelib + inttostr + lstat + malloc + mbchar + mbuiter + memchr + memcpy + mempcpy + memset + obstack + pathmax + quotearg + realloc + regex + stat-macros + stdbool + strcase + strcspn + strdup + strsep + strnlen1 + strpbrk + strsep + xalloc + xalloc-die + xgetcwd +" + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES= + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ + --from-code=UTF-8\\\ + --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ + --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ + --flag=wrapf:1:c-format\\\ +' + +# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" +# appears in configure.ac, exclude some unnecessary files. +# Without grep's -E option (not portable enough, pre-configure), +# the following test is ugly. Also, this depends on the existence +# of configure.ac, not the obsolescent-named configure.in. But if +# you're using this infrastructure, you should care about such things. + +gettext_external=0 +grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && + gettext_external=1 +grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && + gettext_external=1 + +if test $gettext_external = 1; then + # Gettext supplies these files, but we don't need them since + # we don't have an intl subdirectory. + excluded_files=' + m4/glibc2.m4 + m4/intdiv0.m4 + m4/lcmessage.m4 + m4/lock.m4 + m4/uintmax_t.m4 + m4/ulonglong.m4 + m4/visibility.m4 + ' +fi + +gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests" diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files new file mode 100755 index 0000000..72a6f54 --- /dev/null +++ b/build-aux/vc-list-files @@ -0,0 +1,50 @@ +#!/bin/sh +# List the specified version-controlled files. + +# Copyright (C) 2006, 2007 Free Software Foundation, Inc. + +# This program 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. + +# This program 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/>. + + +# List the specified version-controlled files. +# With no argument, list them all. +# This script must be run solely from the top of a $srcdir build directory. + +# If there's an argument, it must be a single, "."-relative directory name. +# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ + +dir= +case $# in + 0) ;; + 1) dir=$1 ;; + *) echo "$0: too many arguments" 1>&2; exit 1 ;; +esac + +test "x$dir" = x && dir=. + +if test -d CVS; then + if test -x build-aux/cvsu; then + build-aux/cvsu --find --types=AFGM "$dir" + else + awk -F/ '{ \ + if (!$1 && $3 !~ /^-/) { \ + f=FILENAME; \ + sub(/CVS\/Entries/, "", f); \ + print f $2; \ + }}' \ + $(find ${*-*} -name Entries -print) /dev/null; + fi +else + git-ls-files "$dir" +fi diff --git a/configure.ac b/configure.ac index b18893b..d01ec7c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,32 +1,26 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) -AC_INIT([idutils], [cvs], [bug-idutils@gnu.org]) -AC_GNU_SOURCE +AC_PREREQ(2.61) +AC_INIT([idutils], m4_esyscmd([build-aux/git-version-gen .version]), + [bug-idutils@gnu.org]) -AM_INIT_AUTOMAKE -AM_MAINTAINER_MODE +AC_CONFIG_AUX_DIR(build-aux) +AM_INIT_AUTOMAKE([1.10]) -AC_CONFIG_SRCDIR([config.h.in]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_SRCDIR([src/mkid.c]) +AC_CONFIG_HEADERS([lib/config.h:lib/config.hin]) # Checks for programs. -AC_PROG_CC +AC_PROG_CC_STDC +AM_PROG_CC_C_O +AC_PROG_LN_S gl_EARLY +gl_INIT -AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_RANLIB -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_FUNC_ALLOCA - -# gettext support - -AM_GNU_GETTEXT - # check functions # if HAVE_LINK, then in the code we look for file aliases @@ -36,10 +30,6 @@ AC_CHECK_FUNCS([link sbrk lstat]) AM_PATH_LISPDIR -# gnulib - -gl_INIT - # Checks for header files. AC_CHECK_HEADERS([termios.h sys/ioctl.h termio.h sgtty.h]) @@ -51,20 +41,18 @@ AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_CHECK_TYPES(ptrdiff_t) +AM_GNU_GETTEXT([external], [need-formatstring-macros]) +AM_GNU_GETTEXT_VERSION([0.15]) + AC_CONFIG_FILES([ - intl/Makefile po/Makefile.in doc/Makefile - m4/Makefile lib/Makefile libidu/Makefile lisp/Makefile testsuite/Makefile + gnulib-tests/Makefile src/Makefile Makefile ]) AC_OUTPUT - - - - diff --git a/doc/Makefile.am b/doc/Makefile.am index 689a90e..7fb71ad 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,6 +2,4 @@ info_TEXINFOS = idutils.texi -EXTRA_DIST = texinfo.tex - DISTCLEANFILES = idutils.fl diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am new file mode 100644 index 0000000..6635f70 --- /dev/null +++ b/gnulib-tests/Makefile.am @@ -0,0 +1 @@ +include gnulib.mk diff --git a/lib/Makefile.am b/lib/Makefile.am index e1e87de..2aadabf 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,222 +1,15 @@ ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2004-2006 Free Software Foundation, Inc. +# Copyright (C) 2004-2007 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=. --macro-prefix=gl --assume-autoconf=2.59 alloca alloca-opt atexit closeout dirname error exclude exit exitfail extensions fnmatch fnmatch-gnu fpending getcwd getopt gettext gettext-h havelib inttostr lstat malloc mbchar mbuiter memchr memcpy mempcpy memset obstack pathmax quotearg realloc regex restrict stat-macros stdbool strcase strcspn strdup strnlen1 strpbrk strsep strstr xalloc xalloc-die xgetcwd - -AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies - -noinst_LIBRARIES = libgnu.a - -libgnu_a_SOURCES = -libgnu_a_LIBADD = @LIBOBJS@ -noinst_HEADERS = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = - -## begin gnulib module alloca - - -libgnu_a_LIBADD += @ALLOCA@ -## end gnulib module alloca - -## begin gnulib module alloca-opt - -BUILT_SOURCES += $(ALLOCA_H) -EXTRA_DIST += alloca_.h - -# We need the following in order to create <alloca.h> when the system -# doesn't have one that works with the given compiler. -alloca.h: alloca_.h - cp $(srcdir)/alloca_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += alloca.h alloca.h-t - -## end gnulib module alloca-opt - -## begin gnulib module dirname - -## end gnulib module dirname - -## begin gnulib module exit - -libgnu_a_SOURCES += exit.h - -## end gnulib module exit - -## begin gnulib module fnmatch - -BUILT_SOURCES += $(FNMATCH_H) -EXTRA_DIST += fnmatch_.h fnmatch_loop.c - -# We need the following in order to create <fnmatch.h> when the system -# doesn't have one that supports the required API. -fnmatch.h: fnmatch_.h - cp $(srcdir)/fnmatch_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t - -## end gnulib module fnmatch - -## begin gnulib module getopt - -BUILT_SOURCES += $(GETOPT_H) -EXTRA_DIST += getopt_.h getopt_int.h - -# We need the following in order to create <getopt.h> when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt_.h - cp $(srcdir)/getopt_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t - -## end gnulib module getopt - -## begin gnulib module gettext - -# This is for those projects which use "gettextize --intl" to put a source-code -# copy of libintl into their package. In such projects, every Makefile.am needs -# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory. -# For the Makefile.ams in other directories it is the maintainer's -# responsibility; for the one from gnulib we do it here. -# This option has no effect when the user disables NLS (because then the intl -# directory contains no libintl.h file) or when the project does not use -# "gettextize --intl". -AM_CPPFLAGS += -I$(top_builddir)/intl - -## end gnulib module gettext - -## begin gnulib module gettext-h - -libgnu_a_SOURCES += gettext.h - -## end gnulib module gettext-h - -## begin gnulib module intprops - -EXTRA_DIST += intprops.h - -## end gnulib module intprops - -## begin gnulib module inttostr - -EXTRA_DIST += inttostr.c - -## end gnulib module inttostr - -## begin gnulib module mbchar - -libgnu_a_SOURCES += mbchar.h - -## end gnulib module mbchar - -## begin gnulib module mbuiter - -libgnu_a_SOURCES += mbuiter.h - -## end gnulib module mbuiter - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) -EXTRA_DIST += stdbool_.h - -# We need the following in order to create <stdbool.h> when the system -# doesn't have one that works. -stdbool.h: stdbool_.h - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t - mv $@-t $@ -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -## end gnulib module stdbool - -## begin gnulib module strcase - -libgnu_a_SOURCES += strcase.h - -## end gnulib module strcase - -## begin gnulib module strnlen1 - -libgnu_a_SOURCES += strnlen1.h strnlen1.c - -## end gnulib module strnlen1 - -## begin gnulib module strpbrk - -libgnu_a_SOURCES += strpbrk.h - -## end gnulib module strpbrk - -## begin gnulib module strsep - -libgnu_a_SOURCES += strsep.h - -## end gnulib module strsep - -## begin gnulib module strstr - -libgnu_a_SOURCES += strstr.h - -## end gnulib module strstr - -## begin gnulib module unistd - -BUILT_SOURCES += $(UNISTD_H) - -# We need the following in order to create an empty placeholder for -# <unistd.h> when the system doesn't have one. -unistd.h: - echo '/* Empty placeholder for $@. */' >$@ -MOSTLYCLEANFILES += unistd.h - -## end gnulib module unistd - -## begin gnulib module verify - -libgnu_a_SOURCES += verify.h - -## end gnulib module verify - -## begin gnulib module wcwidth - -libgnu_a_SOURCES += wcwidth.h - -## end gnulib module wcwidth - -## begin gnulib module xalloc-die - -libgnu_a_SOURCES += xalloc-die.c - -## end gnulib module xalloc-die - -## begin gnulib module xstrndup - -libgnu_a_SOURCES += xstrndup.h xstrndup.c - -## end gnulib module xstrndup +include gnulib.mk -mostlyclean-local: - @test -z "$(MOSTLYCLEANDIRS)" || \ - for dir in $(MOSTLYCLEANDIRS); do \ - if test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done +AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS) -# Makefile.am ends here +libgnu_a_LIBADD += $(LIBOBJS) +libgnu_a_DEPENDENCIES += $(LIBOBJS) diff --git a/libidu/Makefile.am b/libidu/Makefile.am index 7666e41..c058839 100644 --- a/libidu/Makefile.am +++ b/libidu/Makefile.am @@ -23,4 +23,3 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib \ idudir = $(datadir) idu_DATA = id-lang.map EXTRA_DIST = $(idu_DATA) - diff --git a/po/POTFILES.in b/po/POTFILES.in index fe8332e..6452444 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,11 @@ +lib/closeout.c +lib/error.c +lib/getopt.c +lib/obstack.c +lib/openat-die.c +lib/quotearg.c +lib/regcomp.c +lib/xalloc-die.c libidu/fnprint.c libidu/hash.c libidu/idfile.c @@ -5,7 +13,6 @@ libidu/idread.c libidu/idwrite.c libidu/scanners.c libidu/walker.c -lib/getopt.c src/fid.c src/fnid.c src/lid.c |