2006-08-17 19:58:17 +00:00
|
|
|
# Make coreutils. -*-Makefile-*-
|
|
|
|
|
|
2008-01-26 15:48:53 +01:00
|
|
|
# Copyright (C) 1990, 1993-2008 Free Software Foundation, Inc.
|
2006-08-17 19:58:17 +00:00
|
|
|
|
2007-07-23 14:35:58 +02:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
2006-08-17 19:58:17 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-23 14:35:58 +02:00
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
2006-08-17 19:58:17 +00:00
|
|
|
# (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
|
2007-07-23 14:35:58 +02:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-07-01 08:13:49 +00:00
|
|
|
|
2007-11-10 18:33:07 +01:00
|
|
|
SUBDIRS = lib src doc man po tests gnulib-tests
|
2002-07-01 08:13:49 +00:00
|
|
|
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
|
2007-08-30 10:47:11 +02:00
|
|
|
.prev-version THANKS-to-translators THANKStt.in \
|
2008-01-28 15:16:17 +01:00
|
|
|
.version \
|
2006-07-14 14:27:38 +00:00
|
|
|
.vg-suppressions \
|
2006-02-11 20:43:20 +00:00
|
|
|
.x-po-check \
|
2007-08-16 16:28:11 +02:00
|
|
|
.x-sc_GPL_version \
|
2005-07-02 12:02:21 +00:00
|
|
|
.x-sc_file_system .x-sc_obsolete_symbols \
|
2006-07-14 14:27:38 +00:00
|
|
|
.x-sc_prohibit_atoi_atof \
|
2007-06-23 10:11:25 +02:00
|
|
|
.x-sc_prohibit_strcmp \
|
2006-09-23 17:00:29 +00:00
|
|
|
.x-sc_require_config_h \
|
|
|
|
|
.x-sc_space_tab .x-sc_sun_os_names \
|
2006-07-14 14:27:38 +00:00
|
|
|
.x-sc_trailing_blank \
|
2006-09-23 17:00:29 +00:00
|
|
|
.x-sc_unmarked_diagnostics \
|
|
|
|
|
.x-sc_useless_cpp_parens \
|
|
|
|
|
ChangeLog-2005 \
|
2008-02-10 10:27:42 +01:00
|
|
|
ChangeLog-2006 \
|
|
|
|
|
ChangeLog-2007 \
|
|
|
|
|
ChangeLog-2008 \
|
2006-09-23 17:00:29 +00:00
|
|
|
bootstrap \
|
2006-10-13 14:13:24 +00:00
|
|
|
bootstrap.conf \
|
2005-12-07 16:22:24 +00:00
|
|
|
build-aux/cvsu \
|
2007-08-26 00:48:41 +02:00
|
|
|
build-aux/git-version-gen \
|
2006-07-19 09:54:53 +00:00
|
|
|
build-aux/vc-list-files \
|
2006-09-23 17:00:29 +00:00
|
|
|
gl/modules/getloadavg.diff \
|
2004-05-03 11:52:33 +00:00
|
|
|
m4/ChangeLog \
|
2002-10-02 06:40:46 +00:00
|
|
|
old/fileutils/ChangeLog \
|
|
|
|
|
old/fileutils/ChangeLog-1997 \
|
2006-09-23 17:00:29 +00:00
|
|
|
old/fileutils/NEWS \
|
2002-10-02 06:40:46 +00:00
|
|
|
old/sh-utils/ChangeLog \
|
|
|
|
|
old/sh-utils/ChangeLog.0 \
|
|
|
|
|
old/sh-utils/NEWS \
|
2006-09-23 17:00:29 +00:00
|
|
|
old/textutils/ChangeLog \
|
2002-10-02 06:40:46 +00:00
|
|
|
old/textutils/NEWS
|
2002-07-01 08:13:49 +00:00
|
|
|
|
|
|
|
|
install-root:
|
|
|
|
|
cd src && $(MAKE) $@
|
|
|
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
|
|
# Some tests always need root privileges, others need them only sometimes.
|
|
|
|
|
check-root:
|
|
|
|
|
cd tests && $(MAKE) $@
|
|
|
|
|
|
|
|
|
|
# Just prior to distribution, ...
|
|
|
|
|
# transform the automake-generated rule that runs `rm -f rm'.
|
|
|
|
|
# On some systems, that command would fail with a diagnostic like
|
|
|
|
|
# `rm: cannot unlink `rm': Text file busy' when `.' appears so early
|
|
|
|
|
# in the shell's search path that running `rm' would run the `rm'
|
|
|
|
|
# executable in the current directory.
|
|
|
|
|
# Similarly, adjust the clean-binPROGRAMS rule.
|
|
|
|
|
rm_subst = \
|
2007-08-30 10:47:11 +02:00
|
|
|
s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
|
|
|
|
|
|
2008-01-29 17:19:29 +01:00
|
|
|
BUILT_SOURCES = .version
|
2008-01-28 15:16:17 +01:00
|
|
|
.version:
|
|
|
|
|
echo $(VERSION) > $@-t && mv $@-t $@
|
|
|
|
|
|
2008-02-07 23:30:07 +01:00
|
|
|
# Arrange so that .tarball-version appears only in the distribution
|
|
|
|
|
# tarball, and never in a checked-out repository.
|
2007-08-30 10:47:11 +02:00
|
|
|
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
|
|
|
|
|
# See the rm_subst comment for details.
|
2008-02-10 10:27:42 +01:00
|
|
|
dist-hook: gen-ChangeLog
|
2008-02-07 23:30:07 +01:00
|
|
|
echo $(VERSION) > $(distdir)/.tarball-version
|
2007-08-30 10:47:11 +02:00
|
|
|
perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
|
2002-08-26 12:58:30 +00:00
|
|
|
|
2008-02-10 10:27:42 +01:00
|
|
|
gen_start_date = 2008-02-08
|
|
|
|
|
.PHONY: gen-ChangeLog
|
|
|
|
|
gen-ChangeLog:
|
|
|
|
|
if test -d .git; then \
|
|
|
|
|
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
|
|
|
|
--since=$(gen_start_date) > $(distdir)/cl-t; \
|
|
|
|
|
rm -f $(distdir)/ChangeLog; \
|
|
|
|
|
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
|
|
|
|
fi
|
|
|
|
|
|
2008-02-13 14:33:02 +01:00
|
|
|
distcheck-hook: check-ls-dircolors
|
2007-08-30 10:47:11 +02:00
|
|
|
$(MAKE) my-distcheck
|
2006-07-14 14:27:38 +00:00
|
|
|
|
2008-01-26 15:48:53 +01:00
|
|
|
DISTCLEANFILES = VERSION
|
2007-08-30 10:47:11 +02:00
|
|
|
MAINTAINERCLEANFILES = THANKS-to-translators
|
2002-08-26 12:58:30 +00:00
|
|
|
THANKS-to-translators: po/LINGUAS THANKStt.in
|
|
|
|
|
( \
|
|
|
|
|
cat $(srcdir)/THANKStt.in; \
|
2006-10-12 21:10:43 +00:00
|
|
|
for lang in `cat $(srcdir)/po/LINGUAS`; do \
|
2002-08-26 12:58:30 +00:00
|
|
|
echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
|
|
|
|
|
done; \
|
|
|
|
|
) > $@-tmp && mv $@-tmp $@
|
2008-02-13 14:33:02 +01:00
|
|
|
|
|
|
|
|
# Ensure that the sets of two-letter codes in ls.c and dircolors.c
|
|
|
|
|
# remain in sync.
|
|
|
|
|
.PHONY: check-ls-dircolors
|
|
|
|
|
check-ls-dircolors:
|
|
|
|
|
dc=$$(sed -n '/static.*ls_codes\[/,/};'/p src/dircolors.c \
|
|
|
|
|
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
|
|
|
|
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
|
|
|
|
ls=$$(sed -n '/static.*indicator_name\[/,/};'/p src/ls.c \
|
|
|
|
|
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
|
|
|
|
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
|
|
|
|
test "$$dc" = "$$ls"
|