diff options
author | Mike Galbraith <efault@gmx.de> | 2009-06-02 04:17:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-02 05:01:43 -0400 |
commit | c1079abd1d5e66edabeb04d75e48e604cd8c167f (patch) | |
tree | b065af53f5a117b500945f702ebc39ebdf9e195e /Documentation | |
parent | c25486c5ea3ea5586f71285a3aa5cfafb1db59f9 (diff) |
perf_counter tools: Cleanup Makefile
We currently build perf-stat/record etc, only to do nothing
with them. We also install the perf binary in two places,
$prefix/bin and $perfexec_instdir, which appears to be for
binaries which perf would exec were a command not linked in.
Correct this, and comment out broken/incomplete targets dist
and coverage.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/perf_counter/Makefile | 141 |
1 files changed, 73 insertions, 68 deletions
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile index 3b8275feb889..eae88561233b 100644 --- a/Documentation/perf_counter/Makefile +++ b/Documentation/perf_counter/Makefile | |||
@@ -260,8 +260,6 @@ PROGRAMS += perf | |||
260 | 260 | ||
261 | # List built-in command $C whose implementation cmd_$C() is not in | 261 | # List built-in command $C whose implementation cmd_$C() is not in |
262 | # builtin-$C.o but is linked in as part of some other command. | 262 | # builtin-$C.o but is linked in as part of some other command. |
263 | BUILT_INS += $(patsubst builtin-%.o,perf-%$X,$(BUILTIN_OBJS)) | ||
264 | |||
265 | # | 263 | # |
266 | # None right now: | 264 | # None right now: |
267 | # | 265 | # |
@@ -791,12 +789,14 @@ export perfexec_instdir | |||
791 | 789 | ||
792 | install: all | 790 | install: all |
793 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' | 791 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
794 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
795 | $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
796 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' | 792 | $(INSTALL) perf$X '$(DESTDIR_SQ)$(bindir_SQ)' |
793 | ifdef BUILT_INS | ||
794 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
795 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
797 | ifneq (,$X) | 796 | ifneq (,$X) |
798 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) | 797 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) |
799 | endif | 798 | endif |
799 | endif | ||
800 | 800 | ||
801 | install-doc: | 801 | install-doc: |
802 | $(MAKE) -C Documentation install | 802 | $(MAKE) -C Documentation install |
@@ -824,52 +824,55 @@ quick-install-html: | |||
824 | 824 | ||
825 | 825 | ||
826 | ### Maintainer's dist rules | 826 | ### Maintainer's dist rules |
827 | 827 | # | |
828 | perf.spec: perf.spec.in | 828 | # None right now |
829 | sed -e 's/@@VERSION@@/$(PERF_VERSION)/g' < $< > $@+ | 829 | # |
830 | mv $@+ $@ | 830 | # |
831 | 831 | # perf.spec: perf.spec.in | |
832 | PERF_TARNAME=perf-$(PERF_VERSION) | 832 | # sed -e 's/@@VERSION@@/$(PERF_VERSION)/g' < $< > $@+ |
833 | dist: perf.spec perf-archive$(X) configure | 833 | # mv $@+ $@ |
834 | ./perf-archive --format=tar \ | 834 | # |
835 | --prefix=$(PERF_TARNAME)/ HEAD^{tree} > $(PERF_TARNAME).tar | 835 | # PERF_TARNAME=perf-$(PERF_VERSION) |
836 | @mkdir -p $(PERF_TARNAME) | 836 | # dist: perf.spec perf-archive$(X) configure |
837 | @cp perf.spec configure $(PERF_TARNAME) | 837 | # ./perf-archive --format=tar \ |
838 | @echo $(PERF_VERSION) > $(PERF_TARNAME)/version | 838 | # --prefix=$(PERF_TARNAME)/ HEAD^{tree} > $(PERF_TARNAME).tar |
839 | $(TAR) rf $(PERF_TARNAME).tar \ | 839 | # @mkdir -p $(PERF_TARNAME) |
840 | $(PERF_TARNAME)/perf.spec \ | 840 | # @cp perf.spec configure $(PERF_TARNAME) |
841 | $(PERF_TARNAME)/configure \ | 841 | # @echo $(PERF_VERSION) > $(PERF_TARNAME)/version |
842 | $(PERF_TARNAME)/version | 842 | # $(TAR) rf $(PERF_TARNAME).tar \ |
843 | @$(RM) -r $(PERF_TARNAME) | 843 | # $(PERF_TARNAME)/perf.spec \ |
844 | gzip -f -9 $(PERF_TARNAME).tar | 844 | # $(PERF_TARNAME)/configure \ |
845 | 845 | # $(PERF_TARNAME)/version | |
846 | htmldocs = perf-htmldocs-$(PERF_VERSION) | 846 | # @$(RM) -r $(PERF_TARNAME) |
847 | manpages = perf-manpages-$(PERF_VERSION) | 847 | # gzip -f -9 $(PERF_TARNAME).tar |
848 | dist-doc: | 848 | # |
849 | $(RM) -r .doc-tmp-dir | 849 | # htmldocs = perf-htmldocs-$(PERF_VERSION) |
850 | mkdir .doc-tmp-dir | 850 | # manpages = perf-manpages-$(PERF_VERSION) |
851 | $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc | 851 | # dist-doc: |
852 | cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . | 852 | # $(RM) -r .doc-tmp-dir |
853 | gzip -n -9 -f $(htmldocs).tar | 853 | # mkdir .doc-tmp-dir |
854 | : | 854 | # $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc |
855 | $(RM) -r .doc-tmp-dir | 855 | # cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . |
856 | mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 | 856 | # gzip -n -9 -f $(htmldocs).tar |
857 | $(MAKE) -C Documentation DESTDIR=./ \ | 857 | # : |
858 | man1dir=../.doc-tmp-dir/man1 \ | 858 | # $(RM) -r .doc-tmp-dir |
859 | man5dir=../.doc-tmp-dir/man5 \ | 859 | # mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 |
860 | man7dir=../.doc-tmp-dir/man7 \ | 860 | # $(MAKE) -C Documentation DESTDIR=./ \ |
861 | install | 861 | # man1dir=../.doc-tmp-dir/man1 \ |
862 | cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . | 862 | # man5dir=../.doc-tmp-dir/man5 \ |
863 | gzip -n -9 -f $(manpages).tar | 863 | # man7dir=../.doc-tmp-dir/man7 \ |
864 | $(RM) -r .doc-tmp-dir | 864 | # install |
865 | 865 | # cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . | |
866 | rpm: dist | 866 | # gzip -n -9 -f $(manpages).tar |
867 | $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz | 867 | # $(RM) -r .doc-tmp-dir |
868 | # | ||
869 | # rpm: dist | ||
870 | # $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz | ||
868 | 871 | ||
869 | ### Cleaning rules | 872 | ### Cleaning rules |
870 | 873 | ||
871 | distclean: clean | 874 | distclean: clean |
872 | $(RM) configure | 875 | # $(RM) configure |
873 | 876 | ||
874 | clean: | 877 | clean: |
875 | $(RM) *.o */*.o $(LIB_FILE) | 878 | $(RM) *.o */*.o $(LIB_FILE) |
@@ -896,25 +899,27 @@ check-builtins:: | |||
896 | 899 | ||
897 | ### Test suite coverage testing | 900 | ### Test suite coverage testing |
898 | # | 901 | # |
899 | .PHONY: coverage coverage-clean coverage-build coverage-report | 902 | # None right now |
900 | 903 | # | |
901 | coverage: | 904 | # .PHONY: coverage coverage-clean coverage-build coverage-report |
902 | $(MAKE) coverage-build | 905 | # |
903 | $(MAKE) coverage-report | 906 | # coverage: |
904 | 907 | # $(MAKE) coverage-build | |
905 | coverage-clean: | 908 | # $(MAKE) coverage-report |
906 | rm -f *.gcda *.gcno | 909 | # |
907 | 910 | # coverage-clean: | |
908 | COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs | 911 | # rm -f *.gcda *.gcno |
909 | COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov | 912 | # |
910 | 913 | # COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs | |
911 | coverage-build: coverage-clean | 914 | # COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov |
912 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all | 915 | # |
913 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ | 916 | # coverage-build: coverage-clean |
914 | -j1 test | 917 | # $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all |
915 | 918 | # $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ | |
916 | coverage-report: | 919 | # -j1 test |
917 | gcov -b *.c */*.c | 920 | # |
918 | grep '^function.*called 0 ' *.c.gcov */*.c.gcov \ | 921 | # coverage-report: |
919 | | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ | 922 | # gcov -b *.c */*.c |
920 | | tee coverage-untested-functions | 923 | # grep '^function.*called 0 ' *.c.gcov */*.c.gcov \ |
924 | # | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ | ||
925 | # | tee coverage-untested-functions | ||