1 ## Makefile for the gettext-runtime/libasprintf subdirectory of GNU gettext
2 ## Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify it
5 ## under the terms of the GNU Library General Public License as published
6 ## by the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ## Library General Public License for more details.
14 ## You should have received a copy of the GNU Library General Public
15 ## License along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 ## Process this file with automake to produce Makefile.in.
21 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
22 ACLOCAL = ../../build-aux/fixaclocal @ACLOCAL@
23 ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 -I gnulib-m4
30 DEFS = -DIN_LIBASPRINTF @DEFS@
33 # Library include file.
35 include_HEADERS = autosprintf.h
37 all-local $(libasprintf_la_OBJECTS): autosprintf.h
38 autosprintf.h: autosprintf.h.in
39 cp $(srcdir)/autosprintf.h.in autosprintf.h
40 MOSTLYCLEANFILES += autosprintf.h
41 EXTRA_DIST += autosprintf.h.in
44 rm -f $(distdir)/autosprintf.h
49 lib_LTLIBRARIES = libasprintf.la
53 libasprintf_la_SOURCES = \
54 lib-asprintf.h lib-asprintf.c \
55 autosprintf.h autosprintf.cc
57 # Sources used only on platforms lacking vasprintf().
58 lib_asprintf_EXTRASOURCES = \
60 printf-args.h printf-args.c \
61 printf-parse.h printf-parse.c \
62 vasnprintf.h vasnprintf.c asnprintf.c \
63 vasprintf.h vasprintf.c asprintf.c
64 lib-asprintf.lo: $(lib_asprintf_EXTRASOURCES)
65 EXTRA_DIST += $(lib_asprintf_EXTRASOURCES)
68 # How to build libasprintf.
69 # With libtool 1.5.14, on some platforms, like BeOS, "libtool --tag=CXX" fails
70 # to create a shared library, however "libtool --tag=CC" succeeds.
71 libasprintf_la_LDFLAGS = @LTNOUNDEF@
72 libasprintf.la: $(libasprintf_la_OBJECTS) $(libasprintf_la_DEPENDENCIES)
73 $(AM_V_GEN)$(CXXLINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) || \
74 $(LINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS)
77 # A small set of gnulib modules is needed here as well.
78 include Makefile.gnulib
80 # Allow users to use "gnulib-tool --update".
81 EXTRA_DIST += gnulib-m4/gnulib-cache.m4
84 # Clean up after Solaris cc.
91 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
92 MAKEINFOFLAGS = --no-split
94 info_TEXINFOS = autosprintf.texi
96 # We distribute only the HTML documentation.
97 # The user can generate the others, via
99 # make autosprintf.pdf
101 all-local: html-local
102 install-data-local: install-html
103 installdirs-local: installdirs-html
104 uninstall-local: uninstall-html
106 # CLEANFILES: autosprintf.{dvi,ps,pdf,html} are already known to automake.
109 # Documentation in DVI format.
111 # The install-dvi target is already defined by automake.
114 $(mkdir_p) $(DESTDIR)$(dvidir)
117 $(RM) $(DESTDIR)$(dvidir)/autosprintf.dvi
119 # Temporary index files. automake removes only the predefined ones by itself.
123 # Documentation in Postscript format.
125 # Override of automake's definition:
127 DVIPS = @DVIPS@ -D600
129 autosprintf.ps: autosprintf.dvi
130 $(DVIPS) -o $@ `if test -f autosprintf.dvi; then echo autosprintf.dvi; else echo $(srcdir)/autosprintf.dvi; fi`
132 # The install-ps target is already defined by automake.
135 $(mkdir_p) $(DESTDIR)$(psdir)
138 $(RM) $(DESTDIR)$(psdir)/autosprintf.ps
141 # Documentation in Portable Document Format.
143 # The install-pdf target is already defined by automake.
146 $(mkdir_p) $(DESTDIR)$(pdfdir)
149 $(RM) $(DESTDIR)$(pdfdir)/autosprintf.pdf
152 # Documentation in HTML format.
154 TEXI2HTML = @PERL@ $(srcdir)/texi2html
156 HTMLS = autosprintf_all.html
160 # Override of automake's definition.
161 # We want to use texi2html, not makeinfo --html.
162 autosprintf_all.html: autosprintf.texi
163 $(TEXI2HTML) -number -monolithic `if test -f autosprintf.texi; then echo autosprintf.texi; else echo $(srcdir)/autosprintf.texi; fi`
164 mv autosprintf.html autosprintf_all.html
166 # The install-html target is already defined by automake.
169 $(mkdir_p) $(DESTDIR)$(htmldir)
172 $(RM) $(DESTDIR)$(htmldir)/autosprintf.html
174 EXTRA_DIST += texi2html autosprintf_all.html
179 EXTRA_DIST += README.woe32