Version 0.1.14.
[libidn.git] / Makefile.am
bloba7399e9ff3c82343c2a6da8a8146549dd3d87482
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 = FAQ 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         contrib/web/idn.php \
36         contrib/java/README contrib/java/autogen.sh \
37         contrib/java/configure.ac contrib/java/Makefile.am \
38         contrib/java/ExampleIDNA.java contrib/java/IDNA.java \
39         contrib/java/IDNA.c \
40         contrib/doxygen/Doxyfile.in contrib/doxygen/Doxyfile.orig \
41         contrib/doxygen/gdoc2doxygen \
42         getopt.h getopt.c getopt1.c strdup.c memset.c
44 clean-local:
45         rm -f idn_cmd.c idn_cmd.h
47 # Library
49 pkgconfigdir = $(libdir)/pkgconfig
50 pkgconfig_DATA = libidn.pc
52 lib_LTLIBRARIES = libidn.la
54 include_HEADERS = stringprep.h stringprep_generic.h stringprep_nameprep.h \
55         stringprep_kerberos5.h stringprep_xmpp.h stringprep_plain.h \
56         stringprep_iscsi.h idna.h punycode.h
58 libidn_la_SOURCES = gunicomp.h gunidecomp.h internal.h \
59         stringprep.c nfkc.c version.c toutf8.c \
60         stringprep_generic.c profiles.c \
61         punycode.h punycode.c \
62         idna.h idna.c
63 libidn_la_LIBADD = @LTLIBOBJS@ @LTLIBICONV@
64 libidn_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
66 nfkc.c: gunicomp.h gunidecomp.h
68 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
69         $(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
71 stringprep_generic.c: rfc3454.txt gen-stringprep-tables.pl
72         $(PERL) $(srcdir)/gen-stringprep-tables.pl rfc3454.txt
74 # Applications
76 bin_PROGRAMS = idn
78 idn_SOURCES = idn.c idn_cmd.c idn_cmd.h
79 idn_LDADD = @LIBOBJS@ libidn.la
81 idn.c: idn_cmd.c idn_cmd.h
83 idn_cmd.c idn_cmd.h: idn.ggo
84         -gengetopt --input $< --file-name idn_cmd
86 dist_man_MANS = idn.1
88 idn.1: idn.c
89         $(HELP2MAN) --name="Internationalized Domain Names command line tool" \
90                 --output=$@ $(top_builddir)/idn
92 # Test suite
94 tests = tst_stringprep tst_nfkc tst_punycode tst_idna
96 check_PROGRAMS = $(tests)
98 TESTS = $(tests)
100 INCLUDES = -I$(top_srcdir)
101 LDADD = libidn.la
103 noinst_PROGRAMS = $(tests) example example2 example3 example4
105 # Lisp interface
107 dist_lisp_LISP = punycode.el idna.el
108 ELCFILES=
109 elc-stamp:
111 # Documentation
113 info_TEXINFOS = libidn.texi
114 pdf_TEXINFOS = libidn.texi
115 ps_TEXINFOS = libidn.texi
117 libidn.html: libidn.texi
118         $(MAKEINFO) --html --no-split --number-sections $<
120 libidn_TEXINFOS = fdl.texi \
121         example.c.texi example2.c.texi example3.c.texi example4.c.texi \
122         libidn-api-version.texi libidn-api-stringprep.texi \
123         libidn-api-punycode.texi libidn-api-idna.texi
125 %.c.texi: %.c
126         sed -e 's/{/@{/g' -e 's/}/@}/g' < $< > $@
128 libidn-api-version.texi: version.c
129         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
131 libidn-api-stringprep.texi: stringprep.c nfkc.c toutf8.c reference/dummy.c
132         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
134 libidn-api-punycode.texi: punycode.c
135         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
137 libidn-api-idna.texi: idna.c
138         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
140 # Maintainer targets
142 .PHONY: ChangeLog
143 ChangeLog:
144         test ! -f .cvsusers || \
145         cvs2cl --FSF --usermap .cvsusers \
146         -I "ChangeLog|.cvsignore|.cvsusers|autogen.sh|contrib|draft.*xml"
148 indent:
149         indent $(SOURCES)
151 htmldir = ../www-$(PACKAGE)
152 tag = $(PACKAGE)-`echo $(VERSION) | sed 's/\./-/g'`
154 release:
155         cvs upd -p -r HEAD NEWS > /dev/null
156         if cvs upd -p -r $(tag) NEWS > /dev/null; then false else true; fi
157         rm -f ChangeLog && cvs upd ChangeLog
158         cvs commit
159         $(MAKE) distcheck
160         cvs commit -m "" ChangeLog
161         rm -f $(distdir).tar.gz.asc
162         gpg -a --sign --detach $(distdir).tar.gz
163         gpg --verify $(distdir).tar.gz.asc
164         scp $(distdir).tar.gz* gnudist.gnu.org:~alpha/gnu/$(PACKAGE)/
165         test -d $(htmldir) && cp -v $(PACKAGE).{ps,pdf,html} $(htmldir)/
166         test -d $(htmldir)/reference && \
167                 cp -v reference/*.html $(htmldir)/reference/
168         test -d $(htmldir)/doxygen && test -d contrib/doxygen/html && \
169                 cp -v contrib/doxygen/html/* $(htmldir)/doxygen/
170         test -d $(htmldir) && cd $(htmldir) && cvs commit -m "Update." \
171                 $(PACKAGE).{ps,pdf,html} reference/*.html
172         cvs rtag $(tag) $(PACKAGE)