ANNOUNCE sync.
[libidn.git] / Makefile.am
blobc3e8813d7fc44c4f8b241d333b0e4c25f32f1bf0
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2002, 2003 Simon Josefsson.
4 # This file is part of GNU Libidn.
6 # GNU Libidn is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of
9 # the License, or (at your option) any later version.
11 # GNU Libidn is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with GNU Libidn; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 DIST_SUBDIRS = reference
21 SUBDIRS = @GTKDOC@
23 ACLOCAL_AMFLAGS = -I .
25 EXTRA_DIST = libidn.pc.in iconv.m4 \
26         gen-stringprep-tables.pl rfc3454.txt \
27         gen-unicode-tables.pl UnicodeData-3.2.0.txt LineBreak-3.2.0.txt \
28         SpecialCasing-3.2.0.txt CaseFolding-3.2.0.txt \
29         CompositionExclusions-3.2.0.txt \
30         gdoc libidn.html libidn.ps libidn.pdf lgpl.texi \
31         libc/README libc/Makefile libc/Versions libc/configure \
32         libc/example.c libc/getaddrinfo.c libc/libc.patch libc/netdb.h \
33         contrib/README contrib/idn-python/README contrib/idn-python/Makefile \
34         contrib/idn-python/idn.c contrib/idn-python/test.py \
35         getopt.h getopt.c getopt1.c strdup.c memset.c
37 clean-local:
38         rm -f idn_cmd.c idn_cmd.h
40 # Library
42 pkgconfigdir = $(libdir)/pkgconfig
43 pkgconfig_DATA = libidn.pc
45 lib_LTLIBRARIES = libidn.la
47 include_HEADERS = stringprep.h stringprep_generic.h stringprep_nameprep.h \
48         stringprep_kerberos5.h stringprep_xmpp.h stringprep_plain.h \
49         stringprep_iscsi.h idna.h punycode.h
51 libidn_la_SOURCES = gunicomp.h gunidecomp.h internal.h \
52         stringprep.c nfkc.c version.c toutf8.c \
53         stringprep_generic.c profiles.c \
54         punycode.h punycode.c \
55         idna.h idna.c
56 libidn_la_LIBADD = @LTLIBOBJS@ @LTLIBICONV@
57 libidn_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
59 nfkc.c: gunicomp.h gunidecomp.h
61 gunicomp.h gunidecomp.h: gen-unicode-tables.pl UnicodeData-3.2.0.txt LineBreak-3.2.0.txt SpecialCasing-3.2.0.txt CaseFolding-3.2.0.txt CompositionExclusions-3.2.0.txt
62         $(PERL) $(srcdir)/gen-unicode-tables.pl -decomp 3.2 UnicodeData-3.2.0.txt LineBreak-3.2.0.txt SpecialCasing-3.2.0.txt CaseFolding-3.2.0.txt CompositionExclusions-3.2.0.txt
64 stringprep_generic.c: rfc3454.txt gen-stringprep-tables.pl
65         $(PERL) $(srcdir)/gen-stringprep-tables.pl rfc3454.txt
67 # Applications
69 bin_PROGRAMS = idn
71 idn_SOURCES = idn.c idn_cmd.c idn_cmd.h
72 idn_LDADD = @LIBOBJS@ libidn.la
74 idn.c: idn_cmd.c idn_cmd.h
76 idn_cmd.c idn_cmd.h: idn.ggo
77         -$(GENGETOPT) --input $< --file-name idn_cmd
79 dist_man_MANS = idn.1
81 idn.1: idn.c
82         $(HELP2MAN) --name="Internationalized Domain Names command line tool" \
83                 --output=$@ $(top_builddir)/idn
85 # Test suite
87 tests = tst_stringprep tst_nfkc tst_punycode tst_idna
89 check_PROGRAMS = $(tests)
91 TESTS = $(tests)
93 INCLUDES = -I$(top_srcdir)
94 LDADD = libidn.la
96 noinst_PROGRAMS = $(tests) example example2 example3 example4
98 # Lisp interface
100 dist_lisp_LISP = punycode.el idna.el
101 ELCFILES=
102 elc-stamp:
104 # Documentation
106 info_TEXINFOS = libidn.texi
107 pdf_TEXINFOS = libidn.texi
108 ps_TEXINFOS = libidn.texi
110 libidn.html: libidn.texi
111         $(MAKEINFO) --html --no-split --number-sections $<
113 libidn_TEXINFOS = fdl.texi \
114         example.c.texi example2.c.texi example3.c.texi example4.c.texi \
115         libidn-api-version.texi libidn-api-stringprep.texi \
116         libidn-api-punycode.texi libidn-api-idna.texi
118 %.c.texi: %.c
119         sed -e 's/{/@{/g' -e 's/}/@}/g' < $< > $@
121 libidn-api-version.texi: version.c
122         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
124 libidn-api-stringprep.texi: stringprep.c nfkc.c toutf8.c reference/dummy.c
125         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
127 libidn-api-punycode.texi: punycode.c
128         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
130 libidn-api-idna.texi: idna.c
131         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
133 # Maintainer targets
135 .PHONY: ChangeLog
136 ChangeLog:
137         test ! -f .cvsusers || \
138         cvs2cl --fsf --usermap .cvsusers --no-times --no-common-dir --prune \
139         -I "ChangeLog|.cvsignore|.cvsusers|autogen.sh"
141 indent:
142         indent $(SOURCES)
144 htmldir = ../www-$(PACKAGE)
145 tag = $(PACKAGE)-`echo $(VERSION) | sed 's/\./-/g'`
147 release:
148         cvs upd -p -r HEAD NEWS > /dev/null
149         if cvs upd -p -r $(tag) NEWS > /dev/null; then false else true; fi
150         rm -f ChangeLog && cvs upd ChangeLog
151         cvs commit
152         $(MAKE) distcheck
153         cvs commit -m "" ChangeLog
154         rm -f $(distdir).tar.gz.asc
155         gpg -a --sign --detach $(distdir).tar.gz
156         gpg --verify $(distdir).tar.gz.asc
157         scp $(distdir).tar.gz* gnudist.gnu.org:~alpha/gnu/$(PACKAGE)/
158         test -d $(htmldir) && cp -v $(PACKAGE).{ps,pdf,html} $(htmldir)/
159         test -d $(htmldir)/reference && \
160                 cp -v reference/*.html $(htmldir)/reference/
161         test -d $(htmldir) && cd $(htmldir) && cvs commit -m "Update." \
162                 $(PACKAGE).{ps,pdf,html} reference/*.html
163         cvs rtag $(tag) $(PACKAGE)