1 1.1 christos ## Makefile for the gettext-runtime/libasprintf subdirectory of GNU gettext 2 1.1 christos ## Copyright (C) 2002-2006 Free Software Foundation, Inc. 3 1.1 christos ## 4 1.1 christos ## This program is free software; you can redistribute it and/or modify it 5 1.1 christos ## under the terms of the GNU Library General Public License as published 6 1.1 christos ## by the Free Software Foundation; either version 2, or (at your option) 7 1.1 christos ## any later version. 8 1.1 christos ## 9 1.1 christos ## This program is distributed in the hope that it will be useful, 10 1.1 christos ## but WITHOUT ANY WARRANTY; without even the implied warranty of 11 1.1 christos ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 1.1 christos ## Library General Public License for more details. 13 1.1 christos ## 14 1.1 christos ## You should have received a copy of the GNU Library General Public 15 1.1 christos ## License along with this program; if not, write to the Free Software 16 1.1 christos ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 1.1 christos ## USA. 18 1.1 christos 19 1.1 christos ## Process this file with automake to produce Makefile.in. 20 1.1 christos 21 1.1 christos AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies 22 1.1 christos ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 23 1.1 christos EXTRA_DIST = 24 1.1 christos MOSTLYCLEANFILES = 25 1.1 christos 26 1.1 christos RM = rm -f 27 1.1 christos 28 1.1 christos 29 1.1 christos # Library include file. 30 1.1 christos 31 1.1 christos include_HEADERS = autosprintf.h 32 1.1 christos 33 1.1 christos all-local $(libasprintf_la_OBJECTS): autosprintf.h 34 1.1 christos autosprintf.h: autosprintf.h.in 35 1.1 christos cp $(srcdir)/autosprintf.h.in autosprintf.h 36 1.1 christos MOSTLYCLEANFILES += autosprintf.h 37 1.1 christos EXTRA_DIST += autosprintf.h.in 38 1.1 christos 39 1.1 christos dist-hook: 40 1.1 christos rm -f $(distdir)/autosprintf.h 41 1.1 christos 42 1.1 christos 43 1.1 christos # Library code. 44 1.1 christos 45 1.1 christos lib_LTLIBRARIES = libasprintf.la 46 1.1 christos 47 1.1 christos libasprintf_la_SOURCES = \ 48 1.1 christos lib-asprintf.h lib-asprintf.c \ 49 1.1 christos autosprintf.h autosprintf.cc 50 1.1 christos 51 1.1 christos # Sources used only on platforms lacking vasprintf(). 52 1.1 christos lib_asprintf_EXTRASOURCES = \ 53 1.1 christos xsize.h \ 54 1.1 christos printf-args.h printf-args.c \ 55 1.1 christos printf-parse.h printf-parse.c \ 56 1.1 christos vasnprintf.h vasnprintf.c asnprintf.c \ 57 1.1 christos vasprintf.h vasprintf.c asprintf.c 58 1.1 christos lib-asprintf.lo: $(lib_asprintf_EXTRASOURCES) 59 1.1 christos EXTRA_DIST += $(lib_asprintf_EXTRASOURCES) 60 1.1 christos 61 1.1 christos 62 1.1 christos # How to build libasprintf. 63 1.1 christos # With libtool 1.5.14, on some platforms, like BeOS, "libtool --tag=CXX" fails 64 1.1 christos # to create a shared library, however "libtool --tag=CC" succeeds. 65 1.1 christos libasprintf_la_LDFLAGS = @LTNOUNDEF@ 66 1.1 christos libasprintf.la: $(libasprintf_la_OBJECTS) $(libasprintf_la_DEPENDENCIES) 67 1.1 christos $(CXXLINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) || \ 68 1.1 christos $(LINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) 69 1.1 christos 70 1.1 christos 71 1.1 christos # >>> gnulib module alloca. 72 1.1 christos EXTRA_DIST += alloca_.h 73 1.1 christos 74 1.1 christos # The following is needed in order to create an <alloca.h> when the system 75 1.1 christos # doesn't have one that works with the given compiler. 76 1.1 christos all-local $(libasprintf_la_OBJECTS): @ALLOCA_H@ 77 1.1 christos alloca.h: alloca_.h 78 1.1 christos cp $(srcdir)/alloca_.h alloca.h 79 1.1 christos MOSTLYCLEANFILES += alloca.h 80 1.1 christos # <<< gnulib module alloca. 81 1.1 christos 82 1.1 christos 83 1.1 christos # Clean up after Solaris cc. 84 1.1 christos clean-local: 85 1.1 christos rm -rf SunWS_cache 86 1.1 christos 87 1.1 christos 88 1.1 christos # Documentation. 89 1.1 christos 90 1.1 christos MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ 91 1.1 christos MAKEINFOFLAGS = --no-split 92 1.1 christos 93 1.1 christos info_TEXINFOS = autosprintf.texi 94 1.1 christos 95 1.1 christos # We distribute only the HTML documentation. 96 1.1 christos # The user can generate the others, via 97 1.1 christos # make autosprintf.ps 98 1.1 christos # make autosprintf.pdf 99 1.1 christos 100 1.1 christos all-local: html-local 101 1.1 christos install-data-local: install-html 102 1.1 christos installdirs-local: installdirs-html 103 1.1 christos uninstall-local: uninstall-html 104 1.1 christos 105 1.1 christos CLEANFILES = autosprintf.pdf 106 1.1 christos # autosprintf.dvi and autosprintf.ps are already known to automake. 107 1.1 christos 108 1.1 christos 109 1.1 christos # Documentation in DVI format. 110 1.1 christos 111 1.1 christos # The install-dvi target is already defined by automake. 112 1.1 christos 113 1.1 christos installdirs-dvi: 114 1.1 christos $(mkdir_p) $(DESTDIR)$(dvidir) 115 1.1 christos 116 1.1 christos uninstall-dvi: 117 1.1 christos $(RM) $(DESTDIR)$(dvidir)/autosprintf.dvi 118 1.1 christos 119 1.1 christos # Temporary index files. automake removes only the predefined ones by itself. 120 1.1 christos MOSTLYCLEANFILES += 121 1.1 christos 122 1.1 christos 123 1.1 christos # Documentation in Postscript format. 124 1.1 christos 125 1.1 christos # Override of automake's definition: 126 1.1 christos #DVIPS = @DVIPS@ 127 1.1 christos DVIPS = @DVIPS@ -D600 128 1.1 christos 129 1.1 christos autosprintf.ps: autosprintf.dvi 130 1.1 christos $(DVIPS) -o $@ `if test -f autosprintf.dvi; then echo autosprintf.dvi; else echo $(srcdir)/autosprintf.dvi; fi` 131 1.1 christos 132 1.1 christos # The install-ps target is already defined by automake. 133 1.1 christos 134 1.1 christos installdirs-ps: 135 1.1 christos $(mkdir_p) $(DESTDIR)$(psdir) 136 1.1 christos 137 1.1 christos uninstall-ps: 138 1.1 christos $(RM) $(DESTDIR)$(psdir)/autosprintf.ps 139 1.1 christos 140 1.1 christos 141 1.1 christos # Documentation in Portable Document Format. 142 1.1 christos 143 1.1 christos SUFFIXES = .pdf 144 1.1 christos 145 1.1 christos # The install-pdf target is already defined by automake. 146 1.1 christos 147 1.1 christos installdirs-pdf: 148 1.1 christos $(mkdir_p) $(DESTDIR)$(pdfdir) 149 1.1 christos 150 1.1 christos uninstall-pdf: 151 1.1 christos $(RM) $(DESTDIR)$(pdfdir)/autosprintf.pdf 152 1.1 christos 153 1.1 christos 154 1.1 christos # Documentation in HTML format. 155 1.1 christos 156 1.1 christos TEXI2HTML = @PERL@ $(srcdir)/texi2html 157 1.1 christos 158 1.1 christos HTMLS = autosprintf_all.html 159 1.1 christos 160 1.1 christos html-local: $(HTMLS) 161 1.1 christos 162 1.1 christos # Override of automake's definition. 163 1.1 christos # We want to use texi2html, not makeinfo --html. 164 1.1 christos autosprintf_all.html: autosprintf.texi 165 1.1 christos $(TEXI2HTML) -expandinfo -number -monolithic `if test -f autosprintf.texi; then echo autosprintf.texi; else echo $(srcdir)/autosprintf.texi; fi` 166 1.1 christos mv autosprintf.html autosprintf_all.html 167 1.1 christos 168 1.1 christos # The install-html target is already defined by automake. 169 1.1 christos 170 1.1 christos installdirs-html: 171 1.1 christos $(mkdir_p) $(DESTDIR)$(htmldir) 172 1.1 christos 173 1.1 christos uninstall-html: 174 1.1 christos $(RM) $(DESTDIR)$(htmldir)/autosprintf.html 175 1.1 christos 176 1.1 christos EXTRA_DIST += texi2html autosprintf_all.html 177 1.1 christos 178 1.1 christos 179 1.1 christos # Woe32 support. 180 1.1 christos 181 1.1 christos EXTRA_DIST += README.woe32 182