Set LC_ALL=C rather than unsetting LC_COLLATE for sort.
[deliverable/binutils-gdb.git] / gprof / Makefile.am
CommitLineData
252b5132
RH
1## Process this file with automake to generate Makefile.in
2
3AUTOMAKE_OPTIONS = cygnus
79887925 4ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
252b5132
RH
5
6SUFFIXES = .m
7
8SUBDIRS = po
9
41b49281
AM
10BASEDIR = $(srcdir)/..
11BFDDIR = $(BASEDIR)/bfd
12INCDIR = $(BASEDIR)/include
13
a2d91340 14WARN_CFLAGS = @WARN_CFLAGS@
9e9b66a9 15NO_WERROR = @NO_WERROR@
a2d91340
AC
16AM_CFLAGS = $(WARN_CFLAGS)
17
41b49281
AM
18MKDEP = gcc -MM
19
0ab6f085 20INCLUDES = -DDEBUG -I../bfd -I$(srcdir)/../include \
92f01d61 21 -I$(srcdir)/../bfd @INCINTL@ -I. \
92f01d61 22 -DLOCALEDIR="\"$(datadir)/locale\""
252b5132
RH
23
24bin_PROGRAMS = gprof
25
26## Convenience var listing pure sources.
27sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
28 cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
29 search_list.c symtab.c sym_ids.c utils.c \
ec0806ec 30 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
252b5132 31gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
20e95c23
DJ
32gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
33gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
252b5132
RH
34
35noinst_HEADERS = \
36 basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
37 corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
38 search_list.h source.h sym_ids.h symtab.h utils.h
39
252b5132 40BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
c45021f2 41EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
252b5132 42
c45021f2 43diststuff: $(BUILT_SOURCES) info $(man_MANS)
252b5132 44
253a2395
NC
45# This empty rule is a hack against gmake patched by Apple.
46%.o:%.m
47
252b5132
RH
48.m.c:
49 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
50 FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
51 FILE=$*.m $(srcdir)/$*.m
52
53POTFILES = $(sources) $(noinst_HEADERS)
54po/POTFILES.in: @MAINT@ Makefile
323ee3f4 55 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
252b5132
RH
56 && mv tmp $(srcdir)/po/POTFILES.in
57
40f90528
AM
58MANCONF = -Dman
59
e49e529d 60TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
40f90528
AM
61
62POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
63
252b5132 64info_TEXINFOS = gprof.texi
37d037c1 65gprof_TEXINFOS = config.texi
252b5132
RH
66man_MANS = gprof.1
67
9975e4c4
DJ
68AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
69TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
e49e529d 70
dff70155
MM
71config.texi:
72 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
73
40f90528
AM
74# Build the man page from the texinfo file
75# The sed command removes the no-adjust Nroff command so that
76# the man output looks standard.
dff70155 77gprof.1: $(srcdir)/gprof.texi config.texi
c45021f2 78 touch $@
40f90528
AM
79 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
80 -($(POD2MAN) gprof.pod | \
c45021f2
NC
81 sed -e '/^.if n .na/d' > $@.T$$$$ && \
82 mv -f $@.T$$$$ $@) || \
83 (rm -f $@.T$$$$ && exit 1)
40f90528
AM
84 rm -f gprof.pod
85
108a6f8e
CD
86.PHONY: install-html install-html-am install-html-recursive
87
88html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
89
90install-html: install-html-recursive install-html-am
91
92install-html-am: $(HTMLS)
93 @$(NORMAL_INSTALL)
94 test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
95 @list='$(HTMLS)'; for p in $$list; do \
96 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
97 f=$(html__strip_dir) \
98 if test -d "$$d$$p"; then \
99 echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
100 $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
101 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
102 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
103 else \
104 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
105 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
106 fi; \
107 done
108
109install-html-recursive:
110 @failcom='exit 1'; \
111 for f in x $$MAKEFLAGS; do \
112 case $$f in \
113 *=* | --[!k]*);; \
114 *k*) failcom='fail=yes';; \
115 esac; \
116 done; \
117 dot_seen=no; \
118 target=`echo $@ | sed s/-recursive//`; \
119 list='$(SUBDIRS)'; for subdir in $$list; do \
120 echo "Making $$target in $$subdir"; \
121 if test "$$subdir" = "."; then \
122 dot_seen=yes; \
123 local_target="$$target-am"; \
124 else \
125 local_target="$$target"; \
126 fi; \
127 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
128 || eval $$failcom; \
129 done; \
130 if test "$$dot_seen" = "no"; then \
131 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
132 fi; test -z "$$fail"
133
cd8e197b
HPN
134# We want install to imply install-info as per GNU standards, despite the
135# cygnus option.
6bf9431b 136install-data-local: install-info
cd8e197b 137
41b49281
AM
138# Targets to rebuild dependencies in this Makefile.
139# Have to get rid of DEP1 here so that "$?" later includes all sources.
140DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
141 rm -f DEP1
142 $(MAKE) MKDEP="$(MKDEP)" DEP1
0bdaf48b
AM
143 sed -f dep.sed < DEP1 > DEPA
144 echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
145 if grep ' /' DEPA > /dev/null 2> /dev/null; then \
1581f8c9
AM
146 echo 'make DEP failed!'; exit 1; \
147 else \
0bdaf48b 148 mv -f DEPA $@; \
1581f8c9 149 fi
41b49281
AM
150
151DEP1: $(gprof_SOURCES)
152 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
153 echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
154 $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
155 mv -f DEP2 $@
156
157dep.sed: dep-in.sed config.status
158 objdir=`pwd`; \
159 sed <$(srcdir)/dep-in.sed >dep.sed \
160 -e 's!@INCDIR@!$(INCDIR)!' \
161 -e 's!@BFDDIR@!$(BFDDIR)!' \
162 -e 's!@SRCDIR@!$(srcdir)!' \
8e42bcb6
AM
163 -e "s!@OBJDIR@!$${objdir}!" \
164 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
41b49281
AM
165
166dep: DEP
167 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
168 cat DEP >> tmp-Makefile
169 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
170
171dep-in: DEP
172 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
173 cat DEP >> tmp-Makefile.in
174 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
175
176dep-am: DEP
177 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
178 cat DEP >> tmp-Makefile.am
179 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
180
181.PHONY: dep dep-in dep-am
182
0bdaf48b 183CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
41b49281 184
d5fbea21
DJ
185MAINTAINERCLEANFILES = gprof.info
186
187# Automake 1.9 will only build info files in the objdir if they are
188# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
189# though, so we use a bogus condition.
190if GENINSRC_NEVER
191DISTCLEANFILES = gprof.info
192endif
193
41b49281
AM
194# DO NOT DELETE THIS LINE -- mkdep uses it.
195# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ba323545 196basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
ae351704
AM
197 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
198 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 199 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 200 gconfig.h basic_blocks.h corefile.h gmon_io.h gmon_out.h \
92f01d61 201 search_list.h source.h symtab.h sym_ids.h
ba323545 202call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
ae351704 203 ../bfd/config.h $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h \
92f01d61 204 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
066c2a57 205 $(INCDIR)/symcat.h gconfig.h search_list.h source.h \
ba323545
AM
206 symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
207 gmon_out.h sym_ids.h
41b49281 208cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 209 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 210 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
211 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
212 source.h symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
213 utils.h sym_ids.h
41b49281 214cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 215 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 216 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
217 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
218 source.h symtab.h cg_arcs.h cg_dfn.h utils.h
41b49281 219cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 220 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 221 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
222 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
223 source.h symtab.h cg_arcs.h cg_print.h hist.h utils.h \
224 corefile.h
41b49281 225corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 226 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 227 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57 228 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
3289fe0c 229 source.h symtab.h hist.h corefile.h $(INCDIR)/safe-ctype.h
ae351704
AM
230gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
231 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 232 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 233 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61
JM
234 basic_blocks.h corefile.h call_graph.h gmon_io.h gmon_out.h \
235 gmon.h hertz.h hist.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
6f53ec68 236gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 237 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 238 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57 239 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h ../bfd/bfdver.h \
92f01d61
JM
240 search_list.h source.h symtab.h basic_blocks.h call_graph.h \
241 cg_arcs.h cg_print.h corefile.h gmon_io.h hertz.h hist.h \
242 sym_ids.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
ae351704
AM
243hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
244 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 245 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 246 gconfig.h hertz.h
41b49281 247hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704 248 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
92f01d61 249 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
250 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
251 source.h symtab.h corefile.h gmon_io.h gmon_out.h hist.h \
252 sym_ids.h utils.h
ae351704
AM
253source.o: source.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
254 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 255 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 256 gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61 257 $(INCDIR)/filenames.h search_list.h source.h
41b49281 258search_list.o: search_list.c $(INCDIR)/libiberty.h \
ae351704
AM
259 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
260 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 261 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 262 gconfig.h search_list.h
ae351704
AM
263symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
264 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 265 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 266 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 267 corefile.h
41b49281 268sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ae351704
AM
269 $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
270 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 271 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 272 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
8db406db 273 sym_ids.h corefile.h
bfa36442 274utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
ae351704
AM
275 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
276 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 277 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 278 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
8db406db 279 utils.h corefile.h
ae351704
AM
280i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
281 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 282 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 283 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 284 corefile.h hist.h
ae351704
AM
285alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
286 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 287 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 288 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 289 corefile.h hist.h
ae351704
AM
290vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
291 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 292 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 293 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 294 corefile.h hist.h
ae351704
AM
295tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
296 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 297 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 298 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 299 corefile.h hist.h
ae351704
AM
300sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
301 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 302 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 303 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 304 corefile.h hist.h
ae351704
AM
305mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
306 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 307 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 308 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 309 corefile.h hist.h
3099538b
AM
310flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
311bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
312fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
41b49281 313# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.353785 seconds and 4 git commands to generate.