1 | ## Process this file with automake to generate Makefile.in |
---|
2 | |
---|
3 | AUTOMAKE_OPTIONS = cygnus |
---|
4 | |
---|
5 | if NEWLIB_HW_FP |
---|
6 | MATHDIR = mathfp |
---|
7 | else |
---|
8 | MATHDIR = math |
---|
9 | endif |
---|
10 | |
---|
11 | SUBDIRS = $(MATHDIR) common complex machine |
---|
12 | |
---|
13 | libm_la_LDFLAGS = -Xcompiler -nostdlib |
---|
14 | |
---|
15 | if USE_LIBTOOL |
---|
16 | SUBLIBS = $(MATHDIR)/lib$(MATHDIR).$(aext) common/libcommon.$(aext) complex/libcomplex.$(aext) $(LIBM_MACHINE_LIB) |
---|
17 | noinst_LTLIBRARIES = libm.la |
---|
18 | libm_la_SOURCES = |
---|
19 | libm_la_LIBADD = $(SUBLIBS) |
---|
20 | else |
---|
21 | SUBLIBS = $(MATHDIR)/lib.$(aext) common/lib.$(aext) complex/lib.$(aext) $(LIBM_MACHINE_LIB) |
---|
22 | noinst_LIBRARIES = libm.a |
---|
23 | libm.a: $(SUBLIBS) |
---|
24 | rm -f $@ |
---|
25 | rm -rf tmp |
---|
26 | mkdir tmp |
---|
27 | cd tmp; \ |
---|
28 | for i in $(SUBLIBS); do \ |
---|
29 | $(AR) x ../$$i; \ |
---|
30 | done; \ |
---|
31 | $(AR) $(AR_FLAGS) ../$@ *.o |
---|
32 | $(RANLIB) $@ |
---|
33 | rm -rf tmp |
---|
34 | endif |
---|
35 | |
---|
36 | $(SUBLIBS): |
---|
37 | |
---|
38 | info_TEXINFOS = libm.texinfo |
---|
39 | |
---|
40 | libm_TEXINFOS = targetdep.tex |
---|
41 | |
---|
42 | libm.dvi: targetdep.tex math/stmp-def complex/stmp-def |
---|
43 | |
---|
44 | stmp-targetdep: force |
---|
45 | rm -f tmp.texi |
---|
46 | targetdoc=`pwd`/tmp.texi; \ |
---|
47 | for d in $(SUBDIRS); do \ |
---|
48 | if test "$$d" != "."; then \ |
---|
49 | (cd $$d && $(MAKE) doc) || exit 1; \ |
---|
50 | fi; \ |
---|
51 | done |
---|
52 | $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi targetdep.tex |
---|
53 | touch $@ |
---|
54 | |
---|
55 | targetdep.tex: stmp-targetdep ; @true |
---|
56 | |
---|
57 | math/stmp-def: stmp-targetdep ; @true |
---|
58 | |
---|
59 | complex/stmp-def: stmp-targetdep ; @true |
---|
60 | |
---|
61 | docbook-recursive: force |
---|
62 | for d in $(SUBDIRS); do \ |
---|
63 | if test "$$d" != "."; then \ |
---|
64 | (cd $$d && $(MAKE) docbook) || exit 1; \ |
---|
65 | fi; \ |
---|
66 | done |
---|
67 | |
---|
68 | math/stmp-xml complex/stmp-xml: docbook-recursive |
---|
69 | |
---|
70 | man: math/stmp-xml complex/stmp-xml libm.in.xml |
---|
71 | xsltproc --xinclude --path ${builddir} --nonet ${srcdir}/../refcontainers.xslt ${srcdir}/libm.in.xml >libm.xml |
---|
72 | xmlto --skip-validation --searchpath ${builddir} man -m ${srcdir}/../man.xsl libm.xml |
---|
73 | |
---|
74 | install-man: man |
---|
75 | mkdir -p $(DESTDIR)$(mandir)/man3 |
---|
76 | $(INSTALL_DATA) *.3 $(DESTDIR)$(mandir)/man3/ |
---|
77 | |
---|
78 | .PHONY: force |
---|
79 | force: |
---|
80 | |
---|
81 | CLEANFILES = tmp.texi targetdep.tex stmp-targetdep *.xml *.3 |
---|
82 | |
---|
83 | ACLOCAL_AMFLAGS = -I .. -I ../.. |
---|
84 | CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host |
---|