]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gprof/Makefile.am
* dep-in.sed: Output one filename per line with all lines having
[thirdparty/binutils-gdb.git] / gprof / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = cygnus
4 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
5
6 SUFFIXES = .m
7
8 SUBDIRS = po
9
10 BASEDIR = $(srcdir)/..
11 BFDDIR = $(BASEDIR)/bfd
12 INCDIR = $(BASEDIR)/include
13
14 WARN_CFLAGS = @WARN_CFLAGS@
15 NO_WERROR = @NO_WERROR@
16 AM_CFLAGS = $(WARN_CFLAGS)
17
18 MKDEP = gcc -MM
19
20 INCLUDES = -DDEBUG -I../bfd -I$(srcdir)/../include \
21 -I$(srcdir)/../bfd @INCINTL@ -I. \
22 -DLOCALEDIR="\"$(datadir)/locale\""
23
24 bin_PROGRAMS = gprof
25
26 ## Convenience var listing pure sources.
27 sources = 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 \
30 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
31 gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
32 gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
33 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
34
35 noinst_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
40 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
41 EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
42
43 diststuff: $(BUILT_SOURCES) info $(man_MANS)
44
45 # This empty rule is a hack against gmake patched by Apple.
46 %.o:%.m
47
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
53 POTFILES = $(sources) $(noinst_HEADERS)
54 po/POTFILES.in: @MAINT@ Makefile
55 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
56 && mv tmp $(srcdir)/po/POTFILES.in
57
58 MANCONF = -Dman
59
60 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
61
62 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
63
64 info_TEXINFOS = gprof.texi
65 gprof_TEXINFOS = config.texi
66 man_MANS = gprof.1
67
68 AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
69 TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
70
71 config.texi:
72 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
73
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.
77 gprof.1: $(srcdir)/gprof.texi config.texi
78 touch $@
79 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
80 -($(POD2MAN) gprof.pod | \
81 sed -e '/^.if n .na/d' > $@.T$$$$ && \
82 mv -f $@.T$$$$ $@) || \
83 (rm -f $@.T$$$$ && exit 1)
84 rm -f gprof.pod
85
86 .PHONY: install-pdf install-pdf-am install-pdf-recursive
87
88 pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
89
90 install-pdf: install-pdf-recursive install-pdf-am
91
92 install-pdf-am: $(PDFS)
93 @$(NORMAL_INSTALL)
94 test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
95 @list='$(PDFS)'; for p in $$list; do \
96 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
97 f=$(pdf__strip_dir) \
98 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
99 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
100 done
101
102 install-pdf-recursive:
103 @failcom='exit 1'; \
104 for f in x $$MAKEFLAGS; do \
105 case $$f in \
106 *=* | --[!k]*);; \
107 *k*) failcom='fail=yes';; \
108 esac; \
109 done; \
110 dot_seen=no; \
111 target=`echo $@ | sed s/-recursive//`; \
112 list='$(SUBDIRS)'; for subdir in $$list; do \
113 echo "Making $$target in $$subdir"; \
114 if test "$$subdir" = "."; then \
115 dot_seen=yes; \
116 local_target="$$target-am"; \
117 else \
118 local_target="$$target"; \
119 fi; \
120 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
121 || eval $$failcom; \
122 done; \
123 if test "$$dot_seen" = "no"; then \
124 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
125 fi; test -z "$$fail"
126
127 .PHONY: install-html install-html-am install-html-recursive
128
129 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
130
131 install-html: install-html-recursive install-html-am
132
133 install-html-am: $(HTMLS)
134 @$(NORMAL_INSTALL)
135 test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
136 @list='$(HTMLS)'; for p in $$list; do \
137 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
138 f=$(html__strip_dir) \
139 if test -d "$$d$$p"; then \
140 echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
141 $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
142 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
143 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
144 else \
145 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
146 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
147 fi; \
148 done
149
150 install-html-recursive:
151 @failcom='exit 1'; \
152 for f in x $$MAKEFLAGS; do \
153 case $$f in \
154 *=* | --[!k]*);; \
155 *k*) failcom='fail=yes';; \
156 esac; \
157 done; \
158 dot_seen=no; \
159 target=`echo $@ | sed s/-recursive//`; \
160 list='$(SUBDIRS)'; for subdir in $$list; do \
161 echo "Making $$target in $$subdir"; \
162 if test "$$subdir" = "."; then \
163 dot_seen=yes; \
164 local_target="$$target-am"; \
165 else \
166 local_target="$$target"; \
167 fi; \
168 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
169 || eval $$failcom; \
170 done; \
171 if test "$$dot_seen" = "no"; then \
172 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
173 fi; test -z "$$fail"
174
175 # We want install to imply install-info as per GNU standards, despite the
176 # cygnus option.
177 install-data-local: install-info
178
179 # Targets to rebuild dependencies in this Makefile.
180 # Have to get rid of DEP1 here so that "$?" later includes all sources.
181 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
182 rm -f DEP1
183 $(MAKE) MKDEP="$(MKDEP)" DEP1
184 echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEP1
185 if grep ' /' DEP1 > /dev/null 2> /dev/null; then \
186 echo 'make DEP failed!'; exit 1; \
187 else \
188 mv -f DEP1 $@; \
189 fi
190
191 DEP1: $(gprof_SOURCES)
192 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
193 echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
194 for f in $?; do \
195 $(MKDEP) $(INCLUDES) $(CFLAGS) $$f > DEPA; \
196 sed -n -e '1s/: .*/: \\/p' -e q < DEPA >> DEP2; \
197 sed -e '1s/.*: //' -f dep.sed < DEPA | LC_ALL=C sort | uniq | \
198 sed -e 's/^[AB]/ /' -e '$$s/ \\$$//' >> DEP2; \
199 done
200 rm -f DEPA
201 mv -f DEP2 $@
202
203 dep.sed: dep-in.sed config.status
204 objdir=`pwd`; \
205 sed <$(srcdir)/dep-in.sed >dep.sed \
206 -e 's!@INCDIR@!$(INCDIR)!' \
207 -e 's!@BFDDIR@!$(BFDDIR)!' \
208 -e 's!@SRCDIR@!$(srcdir)!' \
209 -e "s!@OBJDIR@!$${objdir}!" \
210 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
211
212 dep: DEP
213 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
214 cat DEP >> tmp-Makefile
215 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
216
217 dep-in: DEP
218 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
219 cat DEP >> tmp-Makefile.in
220 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
221
222 dep-am: DEP
223 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
224 cat DEP >> tmp-Makefile.am
225 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
226
227 .PHONY: dep dep-in dep-am
228
229 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
230
231 MAINTAINERCLEANFILES = gprof.info
232
233 # Automake 1.9 will only build info files in the objdir if they are
234 # mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
235 # though, so we use a bogus condition.
236 if GENINSRC_NEVER
237 DISTCLEANFILES = gprof.info
238 endif
239
240 # DO NOT DELETE THIS LINE -- mkdep uses it.
241 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
242 basic_blocks.o: \
243 basic_blocks.c \
244 $(BFDDIR)/sysdep.h \
245 $(INCDIR)/ansidecl.h \
246 $(INCDIR)/filenames.h \
247 $(INCDIR)/fopen-same.h \
248 $(INCDIR)/libiberty.h \
249 $(INCDIR)/symcat.h \
250 ../bfd/bfd.h \
251 ../bfd/config.h \
252 basic_blocks.h \
253 corefile.h \
254 gconfig.h \
255 gmon_io.h \
256 gmon_out.h \
257 gprof.h \
258 search_list.h \
259 source.h \
260 sym_ids.h \
261 symtab.h
262 call_graph.o: \
263 call_graph.c \
264 $(BFDDIR)/sysdep.h \
265 $(INCDIR)/ansidecl.h \
266 $(INCDIR)/filenames.h \
267 $(INCDIR)/fopen-same.h \
268 $(INCDIR)/symcat.h \
269 ../bfd/bfd.h \
270 ../bfd/config.h \
271 call_graph.h \
272 cg_arcs.h \
273 corefile.h \
274 gconfig.h \
275 gmon_io.h \
276 gmon_out.h \
277 gprof.h \
278 search_list.h \
279 source.h \
280 sym_ids.h \
281 symtab.h
282 cg_arcs.o: \
283 cg_arcs.c \
284 $(BFDDIR)/sysdep.h \
285 $(INCDIR)/ansidecl.h \
286 $(INCDIR)/filenames.h \
287 $(INCDIR)/fopen-same.h \
288 $(INCDIR)/libiberty.h \
289 $(INCDIR)/symcat.h \
290 ../bfd/bfd.h \
291 ../bfd/config.h \
292 call_graph.h \
293 cg_arcs.h \
294 cg_dfn.h \
295 cg_print.h \
296 gconfig.h \
297 gprof.h \
298 search_list.h \
299 source.h \
300 sym_ids.h \
301 symtab.h \
302 utils.h
303 cg_dfn.o: \
304 cg_dfn.c \
305 $(BFDDIR)/sysdep.h \
306 $(INCDIR)/ansidecl.h \
307 $(INCDIR)/filenames.h \
308 $(INCDIR)/fopen-same.h \
309 $(INCDIR)/libiberty.h \
310 $(INCDIR)/symcat.h \
311 ../bfd/bfd.h \
312 ../bfd/config.h \
313 cg_arcs.h \
314 cg_dfn.h \
315 gconfig.h \
316 gprof.h \
317 search_list.h \
318 source.h \
319 symtab.h \
320 utils.h
321 cg_print.o: \
322 cg_print.c \
323 $(BFDDIR)/sysdep.h \
324 $(INCDIR)/ansidecl.h \
325 $(INCDIR)/filenames.h \
326 $(INCDIR)/fopen-same.h \
327 $(INCDIR)/libiberty.h \
328 $(INCDIR)/symcat.h \
329 ../bfd/bfd.h \
330 ../bfd/config.h \
331 cg_arcs.h \
332 cg_print.h \
333 corefile.h \
334 gconfig.h \
335 gprof.h \
336 hist.h \
337 search_list.h \
338 source.h \
339 symtab.h \
340 utils.h
341 corefile.o: \
342 corefile.c \
343 $(BFDDIR)/sysdep.h \
344 $(INCDIR)/ansidecl.h \
345 $(INCDIR)/filenames.h \
346 $(INCDIR)/fopen-same.h \
347 $(INCDIR)/libiberty.h \
348 $(INCDIR)/safe-ctype.h \
349 $(INCDIR)/symcat.h \
350 ../bfd/bfd.h \
351 ../bfd/config.h \
352 corefile.h \
353 gconfig.h \
354 gprof.h \
355 hist.h \
356 search_list.h \
357 source.h \
358 symtab.h
359 gmon_io.o: \
360 gmon_io.c \
361 $(BFDDIR)/sysdep.h \
362 $(INCDIR)/ansidecl.h \
363 $(INCDIR)/binary-io.h \
364 $(INCDIR)/filenames.h \
365 $(INCDIR)/fopen-same.h \
366 $(INCDIR)/libiberty.h \
367 $(INCDIR)/symcat.h \
368 ../bfd/bfd.h \
369 ../bfd/config.h \
370 basic_blocks.h \
371 call_graph.h \
372 cg_arcs.h \
373 corefile.h \
374 gconfig.h \
375 gmon.h \
376 gmon_io.h \
377 gmon_out.h \
378 gprof.h \
379 hertz.h \
380 hist.h \
381 search_list.h \
382 source.h \
383 symtab.h
384 gprof.o: \
385 gprof.c \
386 $(BFDDIR)/sysdep.h \
387 $(INCDIR)/ansidecl.h \
388 $(INCDIR)/demangle.h \
389 $(INCDIR)/filenames.h \
390 $(INCDIR)/fopen-same.h \
391 $(INCDIR)/libiberty.h \
392 $(INCDIR)/symcat.h \
393 ../bfd/bfd.h \
394 ../bfd/bfdver.h \
395 ../bfd/config.h \
396 basic_blocks.h \
397 call_graph.h \
398 cg_arcs.h \
399 cg_print.h \
400 corefile.h \
401 gconfig.h \
402 gmon_io.h \
403 gprof.h \
404 hertz.h \
405 hist.h \
406 search_list.h \
407 source.h \
408 sym_ids.h \
409 symtab.h
410 hertz.o: \
411 hertz.c \
412 $(BFDDIR)/sysdep.h \
413 $(INCDIR)/ansidecl.h \
414 $(INCDIR)/filenames.h \
415 $(INCDIR)/fopen-same.h \
416 $(INCDIR)/symcat.h \
417 ../bfd/bfd.h \
418 ../bfd/config.h \
419 gconfig.h \
420 gprof.h \
421 hertz.h
422 hist.o: \
423 hist.c \
424 $(BFDDIR)/sysdep.h \
425 $(INCDIR)/ansidecl.h \
426 $(INCDIR)/filenames.h \
427 $(INCDIR)/fopen-same.h \
428 $(INCDIR)/libiberty.h \
429 $(INCDIR)/symcat.h \
430 ../bfd/bfd.h \
431 ../bfd/config.h \
432 corefile.h \
433 gconfig.h \
434 gmon_io.h \
435 gmon_out.h \
436 gprof.h \
437 hist.h \
438 search_list.h \
439 source.h \
440 sym_ids.h \
441 symtab.h \
442 utils.h
443 source.o: \
444 source.c \
445 $(BFDDIR)/sysdep.h \
446 $(INCDIR)/ansidecl.h \
447 $(INCDIR)/filenames.h \
448 $(INCDIR)/fopen-same.h \
449 $(INCDIR)/libiberty.h \
450 $(INCDIR)/symcat.h \
451 ../bfd/bfd.h \
452 ../bfd/config.h \
453 gconfig.h \
454 gprof.h \
455 search_list.h \
456 source.h
457 search_list.o: \
458 search_list.c \
459 $(BFDDIR)/sysdep.h \
460 $(INCDIR)/ansidecl.h \
461 $(INCDIR)/filenames.h \
462 $(INCDIR)/fopen-same.h \
463 $(INCDIR)/libiberty.h \
464 $(INCDIR)/symcat.h \
465 ../bfd/bfd.h \
466 ../bfd/config.h \
467 gconfig.h \
468 gprof.h \
469 search_list.h
470 symtab.o: \
471 symtab.c \
472 $(BFDDIR)/sysdep.h \
473 $(INCDIR)/ansidecl.h \
474 $(INCDIR)/filenames.h \
475 $(INCDIR)/fopen-same.h \
476 $(INCDIR)/symcat.h \
477 ../bfd/bfd.h \
478 ../bfd/config.h \
479 cg_arcs.h \
480 corefile.h \
481 gconfig.h \
482 gprof.h \
483 search_list.h \
484 source.h \
485 symtab.h
486 sym_ids.o: \
487 sym_ids.c \
488 $(BFDDIR)/sysdep.h \
489 $(INCDIR)/ansidecl.h \
490 $(INCDIR)/filenames.h \
491 $(INCDIR)/fopen-same.h \
492 $(INCDIR)/libiberty.h \
493 $(INCDIR)/safe-ctype.h \
494 $(INCDIR)/symcat.h \
495 ../bfd/bfd.h \
496 ../bfd/config.h \
497 cg_arcs.h \
498 corefile.h \
499 gconfig.h \
500 gprof.h \
501 search_list.h \
502 source.h \
503 sym_ids.h \
504 symtab.h
505 utils.o: \
506 utils.c \
507 $(BFDDIR)/sysdep.h \
508 $(INCDIR)/ansidecl.h \
509 $(INCDIR)/demangle.h \
510 $(INCDIR)/filenames.h \
511 $(INCDIR)/fopen-same.h \
512 $(INCDIR)/libiberty.h \
513 $(INCDIR)/symcat.h \
514 ../bfd/bfd.h \
515 ../bfd/config.h \
516 cg_arcs.h \
517 corefile.h \
518 gconfig.h \
519 gprof.h \
520 search_list.h \
521 source.h \
522 symtab.h \
523 utils.h
524 i386.o: \
525 i386.c \
526 $(BFDDIR)/sysdep.h \
527 $(INCDIR)/ansidecl.h \
528 $(INCDIR)/filenames.h \
529 $(INCDIR)/fopen-same.h \
530 $(INCDIR)/symcat.h \
531 ../bfd/bfd.h \
532 ../bfd/config.h \
533 cg_arcs.h \
534 corefile.h \
535 gconfig.h \
536 gprof.h \
537 hist.h \
538 search_list.h \
539 source.h \
540 symtab.h
541 alpha.o: \
542 alpha.c \
543 $(BFDDIR)/sysdep.h \
544 $(INCDIR)/ansidecl.h \
545 $(INCDIR)/filenames.h \
546 $(INCDIR)/fopen-same.h \
547 $(INCDIR)/symcat.h \
548 ../bfd/bfd.h \
549 ../bfd/config.h \
550 cg_arcs.h \
551 corefile.h \
552 gconfig.h \
553 gprof.h \
554 hist.h \
555 search_list.h \
556 source.h \
557 symtab.h
558 vax.o: \
559 vax.c \
560 $(BFDDIR)/sysdep.h \
561 $(INCDIR)/ansidecl.h \
562 $(INCDIR)/filenames.h \
563 $(INCDIR)/fopen-same.h \
564 $(INCDIR)/symcat.h \
565 ../bfd/bfd.h \
566 ../bfd/config.h \
567 cg_arcs.h \
568 corefile.h \
569 gconfig.h \
570 gprof.h \
571 hist.h \
572 search_list.h \
573 source.h \
574 symtab.h
575 tahoe.o: \
576 tahoe.c \
577 $(BFDDIR)/sysdep.h \
578 $(INCDIR)/ansidecl.h \
579 $(INCDIR)/filenames.h \
580 $(INCDIR)/fopen-same.h \
581 $(INCDIR)/symcat.h \
582 ../bfd/bfd.h \
583 ../bfd/config.h \
584 cg_arcs.h \
585 corefile.h \
586 gconfig.h \
587 gprof.h \
588 hist.h \
589 search_list.h \
590 source.h \
591 symtab.h
592 sparc.o: \
593 sparc.c \
594 $(BFDDIR)/sysdep.h \
595 $(INCDIR)/ansidecl.h \
596 $(INCDIR)/filenames.h \
597 $(INCDIR)/fopen-same.h \
598 $(INCDIR)/symcat.h \
599 ../bfd/bfd.h \
600 ../bfd/config.h \
601 cg_arcs.h \
602 corefile.h \
603 gconfig.h \
604 gprof.h \
605 hist.h \
606 search_list.h \
607 source.h \
608 symtab.h
609 mips.o: \
610 mips.c \
611 $(BFDDIR)/sysdep.h \
612 $(INCDIR)/ansidecl.h \
613 $(INCDIR)/filenames.h \
614 $(INCDIR)/fopen-same.h \
615 $(INCDIR)/symcat.h \
616 ../bfd/bfd.h \
617 ../bfd/config.h \
618 cg_arcs.h \
619 corefile.h \
620 gconfig.h \
621 gprof.h \
622 hist.h \
623 search_list.h \
624 source.h \
625 symtab.h
626 flat_bl.o: \
627 flat_bl.c \
628 $(INCDIR)/ansidecl.h
629 bsd_callg_bl.o: \
630 bsd_callg_bl.c \
631 $(INCDIR)/ansidecl.h
632 fsf_callg_bl.o: \
633 fsf_callg_bl.c \
634 $(INCDIR)/ansidecl.h
635 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY