Distcheck fixes.
[libidn.git] / Makefile.am
blob8ad0b5535d3363338298a33256d2c33d302d371c
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 strdup.c memset.c \
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 \
34         contrib/idn-python/README contrib/idn-python/Makefile \
35         contrib/idn-python/idn.c contrib/idn-python/test.py \
36         getopt.h getopt.c getopt1.c \
37         idn.1 punycode.el idna.el
39 clean-local:
40         rm -f idn_cmd.c idn_cmd.h punycode.elc idna.elc
42 # Library
44 pkgconfigdir = $(libdir)/pkgconfig
45 pkgconfig_DATA = libidn.pc
47 lib_LTLIBRARIES = libidn.la
49 include_HEADERS = stringprep.h stringprep_generic.h stringprep_nameprep.h \
50         stringprep_kerberos5.h stringprep_xmpp.h stringprep_plain.h \
51         stringprep_iscsi.h idna.h punycode.h
53 libidn_la_SOURCES = gunicomp.h gunidecomp.h internal.h \
54         stringprep.c nfkc.c version.c toutf8.c \
55         stringprep_generic.c profiles.c \
56         punycode.h punycode.c \
57         idna.h idna.c
58 libidn_la_LIBADD = @LTLIBOBJS@ @LTLIBICONV@
59 libidn_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
61 nfkc.c: gunicomp.h gunidecomp.h
63 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
64         $(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
66 stringprep_generic.c: rfc3454.txt gen-stringprep-tables.pl
67         $(PERL) $(srcdir)/gen-stringprep-tables.pl rfc3454.txt
69 # Applications
71 bin_PROGRAMS = idn
73 idn_SOURCES = idn.c idn_cmd.c idn_cmd.h
74 idn_LDADD = @LIBOBJS@ libidn.la
76 idn_cmd.c idn_cmd.h: idn.ggo
77         gengetopt --input $< --file-name idn_cmd
79 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 lisp_LISP = punycode.el idna.el
101 ELCFILES =
103 # Documentation
105 info_TEXINFOS = libidn.texi
106 pdf_TEXINFOS = libidn.texi
107 ps_TEXINFOS = libidn.texi
109 libidn.html: libidn.texi
110         $(MAKEINFO) --html --no-split --number-sections $<
112 libidn_TEXINFOS = fdl.texi \
113         example.c.texi example2.c.texi example3.c.texi example4.c.texi \
114         libidn-api-version.texi libidn-api-stringprep.texi \
115         libidn-api-punycode.texi libidn-api-idna.texi
117 %.c.texi: %.c
118         sed -e 's/{/@{/g' -e 's/}/@}/g' < $< > $@
120 libidn-api-version.texi: version.c
121         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
123 libidn-api-stringprep.texi: stringprep.c nfkc.c toutf8.c reference/dummy.c
124         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
126 libidn-api-punycode.texi: punycode.c
127         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
129 libidn-api-idna.texi: idna.c
130         $(PERL) $(srcdir)/gdoc -texinfo $^ > $@
132 # Maintainer targets
134 .PHONY: ChangeLog
135 ChangeLog:
136         test ! -f .cvsusers || \
137         cvs2cl --fsf --usermap .cvsusers --no-times --no-common-dir --prune \
138         -I "ChangeLog|.cvsignore|.cvsusers|autogen.sh"
140 indent:
141         indent $(SOURCES)
143 htmldir = ../www-$(PACKAGE)
144 tag = $(PACKAGE)-`echo $(VERSION) | sed 's/\./-/g'`
146 release:
147         cvs upd -p -r HEAD NEWS > /dev/null
148         if cvs upd -p -r $(tag) NEWS > /dev/null; then false else true; fi
149         rm -f ChangeLog && cvs upd ChangeLog
150         cvs commit
151         $(MAKE) distcheck
152         cvs commit -m "" ChangeLog
153         rm -f $(distdir).tar.gz.asc
154         gpg -a --sign --detach $(distdir).tar.gz
155         gpg --verify $(distdir).tar.gz.asc
156         scp $(distdir).tar.gz* gnudist.gnu.org:~alpha/gnu/$(PACKAGE)/
157         test -d $(htmldir) && cp -v $(PACKAGE).{ps,pdf,html} $(htmldir)/
158         test -d $(htmldir)/reference && \
159                 cp -v reference/*.html $(htmldir)/reference/
160         test -d $(htmldir) && cd $(htmldir) && cvs commit -m "Update." \
161                 $(PACKAGE).{ps,pdf,html} reference/*.html
162         cvs rtag $(tag) $(PACKAGE)