annotate config/argz.mk @ 14450:fdc55132bd6b

Tests for module 'unictype/joiningtype-byname'. * modules/unictype/joiningtype-byname-tests: New file. * tests/unictype/test-joiningtype_byname.c: New file.
author Bruno Haible <bruno@clisp.org>
date Mon, 21 Mar 2011 22:58:36 +0100
parents 97fc9a21a8fb
children 8250f2777afc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10162
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
1 # Generate argz.c and argz.in.h from glibc sources.
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
2
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
3 glibc_dir = ../glibc
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
4 glibc_dir = /mirror/d/glibc
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
5
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
6 argz_names = \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
7 append addsep ctsep insert next stringify count \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
8 extract create delete replace
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
9 argz_files = $(patsubst %, $(glibc_dir)/string/argz-%.c, $(argz_names))
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
10
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
11 define print-header
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
12 printf '%s\n' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
13 "/* Functions for dealing with '\0' separated arg vectors." \
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 12559
diff changeset
14 " Copyright (C) 1995-1998, 2000-2002, 2006, 2009-2011 Free Software
12559
c2cbabec01dd update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents: 12518
diff changeset
15 " Foundation, Inc."\
10162
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
16 " This file is part of the GNU C Library." \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
17 "" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
18 " This program is free software; you can redistribute it and/or modify"\
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
19 " it under the terms of the GNU General Public License as published by"\
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
20 " the Free Software Foundation; either version 2, or (at your option)"\
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
21 " any later version." \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
22 "" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
23 " This program is distributed in the hope that it will be useful," \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
24 " but WITHOUT ANY WARRANTY; without even the implied warranty of" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
25 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
26 " GNU General Public License for more details." \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
27 "" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
28 " You should have received a copy of the GNU General Public License along"\
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
29 " with this program; if not, write to the Free Software Foundation," \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
30 " Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */"\
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
31 "" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
32 "#include <config.h>" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
33 "" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
34 "#include <argz.h>" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
35 "#include <errno.h>" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
36 "#include <stdlib.h>" \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
37 "#include <string.h>"
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
38 endef
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
39
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
40 targets = argz.c argz.in.h
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
41
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
42 all: $(targets)
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
43
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
44 argz.c: $(argz_files)
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
45 ($(print-header); \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
46 for i in $^; do \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
47 perl -pe 's/__(argz_|st|mem)/$$1/g' $$i \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
48 | perl -0x0 -pe 's,/\*(.|\n)+?\*/\n,,' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
49 | grep -vE '^(#include|INTDEF|weak_alias|libc_hidden_def)'; \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
50 done) > $@-t && mv $@-t $@
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
51
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
52 argz.in.h: $(glibc_dir)/string/argz.h
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
53 perl -pe 's/__(restrict|const|st|mem)/$$1/g;' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
54 -e 's/\s*__THROW//;' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
55 -e 's/\s*__attribute_pure__//;' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
56 $< \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
57 | perl -ne \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
58 '/^(#include <features\.h>|__(?:BEGIN|END)_DECLS)/ or print' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
59 | perl -0x3b -pe 's/extern \S+ \*?__argz_(.|\n)*?\)\n*;//' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
60 | perl -pe 's/__(argz_next)/$$1/g;' \
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
61 > $@-t && mv $@-t $@
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
62
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
63 clean:
101fa85f1d56 generate argz.c and argz.in.h from glibc sources
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
64 rm -f $(targets)