summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-06-09 10:52:20 +0200
committerJim Meyering <meyering@redhat.com>2008-06-09 10:54:57 +0200
commit263bb1be67cae52f2bf20fdf1edf8e4e716ec4ee (patch)
tree440db78bda5780c65dfc9a90a2b5582d0a852561 /maint.mk
parent23c2a0cbac6d48df85151de9e2ea6891973687ac (diff)
downloadcoreutils-263bb1be67cae52f2bf20fdf1edf8e4e716ec4ee.tar.xz
enforce the proper_name_utf8-requires-ICONV link rule
* maint.mk (sc_proper_name_utf8_requires_ICONV): New rule. * src/Makefile.am (timeout_LDADD, truncate_LDADD): Add $(LIBICONV).
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/maint.mk b/maint.mk
index 9363baf73..7f86349b2 100644
--- a/maint.mk
+++ b/maint.mk
@@ -466,6 +466,23 @@ sc_immutable_NEWS:
{ echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
fi
+# Each program that uses proper_name_utf8 must link with
+# one of the ICONV libraries.
+sc_proper_name_utf8_requires_ICONV:
+ progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
+ if test "x$$progs" != x; then \
+ fail=0; \
+ for p in $$progs; do \
+ dir=$$(dirname "$$p"); \
+ base=$$(basename "$$p" .c); \
+ grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
+ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
+ done; \
+ test $$fail = 1 && \
+ { echo 1>&2 '$(ME): the above not link with any ICONV library'; \
+ exit 1; } || :; \
+ fi
+
# Update the hash stored above. Do this after each release and
# for any corrections to old entries.
update-NEWS-hash: NEWS