1 ## Makefile for the gettext-runtime/libasprintf subdirectory of GNU gettext
2 ## Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
4 ## This program is free software: you can redistribute it and/or modify
5 ## it under the terms of the GNU Lesser General Public License as published by
6 ## the Free Software Foundation; either version 2.1 of the License, or
7 ## (at your option) any later version.
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
12 ## GNU Lesser General Public License for more details.
14 ## You should have received a copy of the GNU Lesser General Public License
15 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
17 ## Process this file with automake to produce Makefile.in.
19 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
20 ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 -I gnulib-m4
27 DEFS = -DIN_LIBASPRINTF @DEFS@
30 # Library include file.
32 include_HEADERS = autosprintf.h
34 all-local $(libasprintf_la_OBJECTS): autosprintf.h
35 autosprintf.h: autosprintf.in.h
36 cp $(srcdir)/autosprintf.in.h autosprintf.h
37 MOSTLYCLEANFILES += autosprintf.h
38 EXTRA_DIST += autosprintf.in.h
41 rm -f $(distdir)/autosprintf.h
46 lib_LTLIBRARIES = libasprintf.la
50 libasprintf_la_SOURCES = \
52 lib-asprintf.h lib-asprintf.c \
53 autosprintf.h autosprintf.cc
55 # Sources used only on platforms lacking vasprintf().
56 lib_asprintf_EXTRASOURCES = \
58 printf-args.h printf-args.c \
59 printf-parse.h printf-parse.c \
60 vasnprintf.h vasnprintf.c asnprintf.c \
61 vasprintf.h vasprintf.c asprintf.c
62 lib-asprintf.lo: $(lib_asprintf_EXTRASOURCES)
63 EXTRA_DIST += $(lib_asprintf_EXTRASOURCES)
66 # How to build libasprintf.
67 # With libtool 1.5.14, on some platforms, like BeOS, "libtool --tag=CXX" fails
68 # to create a shared library, however "libtool --tag=CC" succeeds.
69 libasprintf_la_LDFLAGS = @LTNOUNDEF@
70 libasprintf.la: $(libasprintf_la_OBJECTS) $(libasprintf_la_DEPENDENCIES)
71 $(AM_V_GEN)$(CXXLINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) || \
72 $(LINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS)
75 # A small set of gnulib modules is needed here as well.
76 include Makefile.gnulib
78 # Allow users to use "gnulib-tool --update".
79 EXTRA_DIST += gnulib-m4/gnulib-cache.m4
82 # Clean up after Solaris cc.
89 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
90 MAKEINFOFLAGS = --no-split
92 info_TEXINFOS = autosprintf.texi
94 # We distribute only the HTML documentation.
95 # The user can generate the others, via
97 # make autosprintf.pdf
100 install-data-local: install-html
101 installdirs-local: installdirs-html
102 uninstall-local: uninstall-html
104 # CLEANFILES: autosprintf.{dvi,ps,pdf,html} are already known to automake.
107 # Documentation in DVI format.
109 # The install-dvi target is already defined by automake.
112 $(MKDIR_P) $(DESTDIR)$(dvidir)
115 $(RM) $(DESTDIR)$(dvidir)/autosprintf.dvi
117 # Temporary index files. automake removes only the predefined ones by itself.
121 # Documentation in Postscript format.
123 # Override of automake's definition:
125 DVIPS = @DVIPS@ -D600
127 autosprintf.ps: autosprintf.dvi
128 $(DVIPS) -o $@ `if test -f autosprintf.dvi; then echo autosprintf.dvi; else echo $(srcdir)/autosprintf.dvi; fi`
130 # The install-ps target is already defined by automake.
133 $(MKDIR_P) $(DESTDIR)$(psdir)
136 $(RM) $(DESTDIR)$(psdir)/autosprintf.ps
139 # Documentation in Portable Document Format.
141 # The install-pdf target is already defined by automake.
144 $(MKDIR_P) $(DESTDIR)$(pdfdir)
147 $(RM) $(DESTDIR)$(pdfdir)/autosprintf.pdf
150 # Documentation in HTML format.
152 TEXI2HTML = @PERL@ $(srcdir)/texi2html
154 HTMLS = autosprintf_all.html
158 # Override of automake's definition.
159 # We want to use texi2html, not makeinfo --html.
160 autosprintf_all.html: autosprintf.texi
161 $(TEXI2HTML) -number -monolithic `if test -f autosprintf.texi; then echo autosprintf.texi; else echo $(srcdir)/autosprintf.texi; fi`
162 mv autosprintf.html autosprintf_all.html
164 # The install-html target is already defined by automake.
167 $(MKDIR_P) $(DESTDIR)$(htmldir)
170 $(RM) $(DESTDIR)$(htmldir)/autosprintf.html
172 EXTRA_DIST += texi2html autosprintf_all.html
177 EXTRA_DIST += README.woe32