1 ## Makefile for the gettext-runtime/libasprintf subdirectory of GNU gettext
2 ## Copyright (C) 2002-2007, 2009-2010, 2015 Free Software Foundation,
5 ## This program is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU Lesser General Public License as published by
7 ## the Free Software Foundation; either version 2.1 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU Lesser General Public License for more details.
15 ## You should have received a copy of the GNU Lesser General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ## Process this file with automake to produce Makefile.in.
20 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
21 ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 -I gnulib-m4
28 DEFS = -DIN_LIBASPRINTF @DEFS@
31 # Library include file.
33 include_HEADERS = autosprintf.h
35 all-local $(libasprintf_la_OBJECTS): autosprintf.h
36 autosprintf.h: autosprintf.in.h
37 cp $(srcdir)/autosprintf.in.h autosprintf.h
38 MOSTLYCLEANFILES += autosprintf.h
39 EXTRA_DIST += autosprintf.in.h
42 rm -f $(distdir)/autosprintf.h
47 lib_LTLIBRARIES = libasprintf.la
51 libasprintf_la_SOURCES = \
53 lib-asprintf.h lib-asprintf.c \
54 autosprintf.h autosprintf.cc
56 # Sources used only on platforms lacking vasprintf().
57 lib_asprintf_EXTRASOURCES = \
59 printf-args.h printf-args.c \
60 printf-parse.h printf-parse.c \
61 vasnprintf.h vasnprintf.c asnprintf.c \
62 vasprintf.h vasprintf.c asprintf.c
63 lib-asprintf.lo: $(lib_asprintf_EXTRASOURCES)
64 EXTRA_DIST += $(lib_asprintf_EXTRASOURCES)
67 # How to build libasprintf.
68 # With libtool 1.5.14, on some platforms, like BeOS, "libtool --tag=CXX" fails
69 # to create a shared library, however "libtool --tag=CC" succeeds.
70 libasprintf_la_LDFLAGS = @LTNOUNDEF@
71 libasprintf.la: $(libasprintf_la_OBJECTS) $(libasprintf_la_DEPENDENCIES)
72 $(AM_V_GEN)$(CXXLINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) || \
73 $(LINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS)
76 # A small set of gnulib modules is needed here as well.
77 include Makefile.gnulib
79 # Allow users to use "gnulib-tool --update".
80 EXTRA_DIST += gnulib-m4/gnulib-cache.m4
83 # Clean up after Solaris cc.
90 MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
91 MAKEINFOFLAGS = --no-split
93 info_TEXINFOS = autosprintf.texi
95 # We distribute only the HTML documentation.
96 # The user can generate the others, via
98 # make autosprintf.pdf
100 all-local: html-local
101 install-data-local: install-html
102 installdirs-local: installdirs-html
103 uninstall-local: uninstall-html
105 # CLEANFILES: autosprintf.{dvi,ps,pdf,html} are already known to automake.
108 # Documentation in DVI format.
110 # The install-dvi target is already defined by automake.
113 $(MKDIR_P) $(DESTDIR)$(dvidir)
116 $(RM) $(DESTDIR)$(dvidir)/autosprintf.dvi
118 # Temporary index files. automake removes only the predefined ones by itself.
122 # Documentation in Postscript format.
124 # Override of automake's definition:
126 DVIPS = @DVIPS@ -D600
128 autosprintf.ps: autosprintf.dvi
129 $(DVIPS) -o $@ `if test -f autosprintf.dvi; then echo autosprintf.dvi; else echo $(srcdir)/autosprintf.dvi; fi`
131 # The install-ps target is already defined by automake.
134 $(MKDIR_P) $(DESTDIR)$(psdir)
137 $(RM) $(DESTDIR)$(psdir)/autosprintf.ps
140 # Documentation in Portable Document Format.
142 # The install-pdf target is already defined by automake.
145 $(MKDIR_P) $(DESTDIR)$(pdfdir)
148 $(RM) $(DESTDIR)$(pdfdir)/autosprintf.pdf
151 # Documentation in HTML format.
153 TEXI2HTML = @PERL@ $(srcdir)/texi2html
155 HTMLS = autosprintf_all.html
159 # Override of automake's definition.
160 # We want to use texi2html, not makeinfo --html.
161 autosprintf_all.html: autosprintf.texi
162 $(TEXI2HTML) -number -monolithic `if test -f autosprintf.texi; then echo autosprintf.texi; else echo $(srcdir)/autosprintf.texi; fi`
163 mv autosprintf.html autosprintf_all.html
165 # The install-html target is already defined by automake.
168 $(MKDIR_P) $(DESTDIR)$(htmldir)
171 $(RM) $(DESTDIR)$(htmldir)/autosprintf.html
173 EXTRA_DIST += texi2html autosprintf_all.html
178 EXTRA_DIST += README.woe32