Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | ## Process this file with automake to generate Makefile.in |
2 | ||
fd9b71a8 | 3 | AUTOMAKE_OPTIONS = 1.11 foreign no-dist no-texinfo.tex |
79887925 | 4 | ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd |
959a202e | 5 | TEXINFO_TEX = ../texinfo/texinfo.tex |
252b5132 RH |
6 | |
7 | SUFFIXES = .m | |
8 | ||
9 | SUBDIRS = po | |
10 | ||
41b49281 AM |
11 | BASEDIR = $(srcdir)/.. |
12 | BFDDIR = $(BASEDIR)/bfd | |
13 | INCDIR = $(BASEDIR)/include | |
14 | ||
a2d91340 | 15 | WARN_CFLAGS = @WARN_CFLAGS@ |
9e9b66a9 | 16 | NO_WERROR = @NO_WERROR@ |
a2d91340 AC |
17 | AM_CFLAGS = $(WARN_CFLAGS) |
18 | ||
14ec8efd | 19 | AM_CPPFLAGS = -DDEBUG -I../bfd -I$(srcdir)/../include \ |
92f01d61 | 20 | -I$(srcdir)/../bfd @INCINTL@ -I. \ |
92f01d61 | 21 | -DLOCALEDIR="\"$(datadir)/locale\"" |
252b5132 RH |
22 | |
23 | bin_PROGRAMS = gprof | |
24 | ||
25 | ## Convenience var listing pure sources. | |
26 | sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \ | |
27 | cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \ | |
28 | search_list.c symtab.c sym_ids.c utils.c \ | |
ec0806ec | 29 | i386.c alpha.c vax.c tahoe.c sparc.c mips.c |
252b5132 | 30 | gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c |
20e95c23 DJ |
31 | gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP) |
32 | gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL) | |
252b5132 RH |
33 | |
34 | noinst_HEADERS = \ | |
35 | basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \ | |
36 | corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \ | |
37 | search_list.h source.h sym_ids.h symtab.h utils.h | |
38 | ||
252b5132 | 39 | BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c |
c45021f2 | 40 | EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS) |
252b5132 | 41 | |
c45021f2 | 42 | diststuff: $(BUILT_SOURCES) info $(man_MANS) |
252b5132 | 43 | |
fe168a19 AS |
44 | # We extract version from bfd/configure.in, make sure to rerun configure |
45 | # when BFD's version changes. | |
46 | CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in | |
47 | ||
253a2395 NC |
48 | # This empty rule is a hack against gmake patched by Apple. |
49 | %.o:%.m | |
50 | ||
252b5132 RH |
51 | .m.c: |
52 | awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ | |
53 | FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ | |
54 | FILE=$*.m $(srcdir)/$*.m | |
55 | ||
56 | POTFILES = $(sources) $(noinst_HEADERS) | |
57 | po/POTFILES.in: @MAINT@ Makefile | |
323ee3f4 | 58 | for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \ |
252b5132 RH |
59 | && mv tmp $(srcdir)/po/POTFILES.in |
60 | ||
40f90528 AM |
61 | MANCONF = -Dman |
62 | ||
e49e529d | 63 | TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) |
40f90528 AM |
64 | |
65 | POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1 | |
66 | ||
252b5132 | 67 | info_TEXINFOS = gprof.texi |
37d037c1 | 68 | gprof_TEXINFOS = config.texi |
252b5132 RH |
69 | man_MANS = gprof.1 |
70 | ||
9975e4c4 DJ |
71 | AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc |
72 | TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc | |
e49e529d | 73 | |
dff70155 MM |
74 | config.texi: |
75 | echo "@set top_srcdir $(top_srcdir)" >> ./config.texi | |
76 | ||
40f90528 AM |
77 | # Build the man page from the texinfo file |
78 | # The sed command removes the no-adjust Nroff command so that | |
79 | # the man output looks standard. | |
dff70155 | 80 | gprof.1: $(srcdir)/gprof.texi config.texi |
c45021f2 | 81 | touch $@ |
40f90528 AM |
82 | -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod |
83 | -($(POD2MAN) gprof.pod | \ | |
c45021f2 NC |
84 | sed -e '/^.if n .na/d' > $@.T$$$$ && \ |
85 | mv -f $@.T$$$$ $@) || \ | |
86 | (rm -f $@.T$$$$ && exit 1) | |
40f90528 AM |
87 | rm -f gprof.pod |
88 | ||
d5fbea21 DJ |
89 | MAINTAINERCLEANFILES = gprof.info |
90 | ||
91 | # Automake 1.9 will only build info files in the objdir if they are | |
92 | # mentioned in DISTCLEANFILES. It doesn't have to be unconditional, | |
93 | # though, so we use a bogus condition. | |
94 | if GENINSRC_NEVER | |
95 | DISTCLEANFILES = gprof.info | |
96 | endif |