diff options
author | Michael Witten <mfwitten@gmail.com> | 2011-02-02 15:22:08 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-02-18 04:43:06 -0500 |
commit | a3d1ee10d1bf4520af3d44c1aa6cd46956ec4fd7 (patch) | |
tree | 04964233fd77acd45d427fcb16472fe966551807 /tools/perf/Makefile | |
parent | 0a54fb63600b745e060d24879ed5194382a466c5 (diff) |
perf tools: Makefile: Remove various and sundry cruft
This commit squashes several commits that remove:
unnecessary uname calls
`sh -c'
BUILT_INS and QUIET_BUILT_IN
They have no effect, and the `fixup-builtins' and `check-builtins.sh'
scripts don't even exist.
RUNTIME_PREFIX
It's currently never anything but unset, and it's apparently
only meaningful when Microsoft Windows is the operating system
(according to the source for git).
TEST_PROGRAMS
EXTRA_PROGRAMS
unused SHELL_PATH_SQ portions
unused test for V=2
useless exports
Only when `V' is undefined (that is, only when the value of `V'
is empty) is `export V' performed, which just has the effect of
placing the empty-valued variable `V' in the environment.
The only other script to make use of `V' is `Documentation/Makefile',
which only checks whether `V' is undefined (that is, whether the value
of `V' is empty); hence, the `export V' has no effect whatsoever.
Similarly, `export QUIET_GEN' is useless because it will only have
a non-empty value when `V' has an empty-value, and when `V' has
an empty-value, `QUIET_GEN' is always explicitly set in every
script in which it is used.
`DESTDIR' is only ever defined by the user via the environment
or the command line, both of which are automatically exported
to sub-make processes. Furthermore, no non-make sub-scripts
make use of `DESTDIR' as an environment variable.
No other scripts use `perfexec_instdir'.
unused QUIET_SUBDIR{0,1}
TAR and RPMBUILD
PTHREAD_LIBS
Maintainer's dist rules and commands
distclean target
Test suite coverage testing
PRINT_DIR and NO_SUBDIR
`configure' target
NO_CURL
@@PERF_VERSION@@ substitution
Without the sed command, all of the rule's commands can be reduced
to a single line that copies a file and sets the permissions properly
in the process.
`make test' echo line
template_instdir
PERF-BUILD-OPTIONS
double-colon rules
The use of double-colon rules seems misguided or vestigial git.
Essentially hard-coded $(SCRIPTS) expansion
Signed-off-by: Michael Witten <mfwitten@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 213 |
1 files changed, 10 insertions, 203 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index fde196fe9366..9b8421805c5c 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -3,7 +3,7 @@ ifeq ("$(origin O)", "command line") | |||
3 | endif | 3 | endif |
4 | 4 | ||
5 | # The default target of this Makefile is... | 5 | # The default target of this Makefile is... |
6 | all:: | 6 | all: |
7 | 7 | ||
8 | ifneq ($(OUTPUT),) | 8 | ifneq ($(OUTPUT),) |
9 | # check that the output directory actually exists | 9 | # check that the output directory actually exists |
@@ -11,8 +11,7 @@ OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) | |||
11 | $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) | 11 | $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) |
12 | endif | 12 | endif |
13 | 13 | ||
14 | # Define V=1 to have a more verbose compile. | 14 | # Define V to have a more verbose compile. |
15 | # Define V=2 to have an even more verbose compile. | ||
16 | # | 15 | # |
17 | # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 | 16 | # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 |
18 | # | 17 | # |
@@ -28,12 +27,7 @@ $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | |||
28 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) | 27 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
29 | -include $(OUTPUT)PERF-VERSION-FILE | 28 | -include $(OUTPUT)PERF-VERSION-FILE |
30 | 29 | ||
31 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') | 30 | uname_M := $(shell uname -m 2>/dev/null || echo not) |
32 | uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') | ||
33 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') | ||
34 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') | ||
35 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') | ||
36 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') | ||
37 | 31 | ||
38 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | 32 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ |
39 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | 33 | -e s/arm.*/arm/ -e s/sa110/arm/ \ |
@@ -52,8 +46,6 @@ ifeq ($(ARCH),x86_64) | |||
52 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S | 46 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S |
53 | endif | 47 | endif |
54 | 48 | ||
55 | # CFLAGS and LDFLAGS are for the users to override from the command line. | ||
56 | |||
57 | # | 49 | # |
58 | # Include saner warnings here, which can catch bugs: | 50 | # Include saner warnings here, which can catch bugs: |
59 | # | 51 | # |
@@ -131,22 +123,13 @@ CC = $(CROSS_COMPILE)gcc | |||
131 | AR = $(CROSS_COMPILE)ar | 123 | AR = $(CROSS_COMPILE)ar |
132 | RM = rm -f | 124 | RM = rm -f |
133 | MKDIR = mkdir | 125 | MKDIR = mkdir |
134 | TAR = tar | ||
135 | FIND = find | 126 | FIND = find |
136 | INSTALL = install | 127 | INSTALL = install |
137 | RPMBUILD = rpmbuild | ||
138 | PTHREAD_LIBS = -lpthread | ||
139 | 128 | ||
140 | # sparse is architecture-neutral, which means that we need to tell it | 129 | # sparse is architecture-neutral, which means that we need to tell it |
141 | # explicitly what architecture to check for. Fix this up for yours.. | 130 | # explicitly what architecture to check for. Fix this up for yours.. |
142 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ | 131 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ |
143 | 132 | ||
144 | ifeq ($(V), 2) | ||
145 | QUIET_STDERR = ">/dev/null" | ||
146 | else | ||
147 | QUIET_STDERR = ">/dev/null 2>&1" | ||
148 | endif | ||
149 | |||
150 | -include feature-tests.mak | 133 | -include feature-tests.mak |
151 | 134 | ||
152 | ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -fstack-protector-all),y) | 135 | ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -fstack-protector-all),y) |
@@ -171,12 +154,10 @@ BASIC_LDFLAGS = | |||
171 | 154 | ||
172 | # Guard against environment variables | 155 | # Guard against environment variables |
173 | BUILTIN_OBJS = | 156 | BUILTIN_OBJS = |
174 | BUILT_INS = | ||
175 | LIB_H = | 157 | LIB_H = |
176 | LIB_OBJS = | 158 | LIB_OBJS = |
177 | PYRF_OBJS = | 159 | PYRF_OBJS = |
178 | SCRIPT_SH = | 160 | SCRIPT_SH = |
179 | TEST_PROGRAMS = | ||
180 | 161 | ||
181 | SCRIPT_SH += perf-archive.sh | 162 | SCRIPT_SH += perf-archive.sh |
182 | 163 | ||
@@ -192,12 +173,6 @@ $(OUTPUT)python/perf.so: $(PYRF_OBJS) | |||
192 | 173 | ||
193 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) | 174 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) |
194 | 175 | ||
195 | # Empty... | ||
196 | EXTRA_PROGRAMS = | ||
197 | |||
198 | # ... and all the rest that could be moved out of bindir to perfexecdir | ||
199 | PROGRAMS += $(EXTRA_PROGRAMS) | ||
200 | |||
201 | # | 176 | # |
202 | # Single 'perf' binary right now: | 177 | # Single 'perf' binary right now: |
203 | # | 178 | # |
@@ -205,10 +180,6 @@ PROGRAMS += $(OUTPUT)perf | |||
205 | 180 | ||
206 | LANG_BINDINGS = | 181 | LANG_BINDINGS = |
207 | 182 | ||
208 | # List built-in command $C whose implementation cmd_$C() is not in | ||
209 | # builtin-$C.o but is linked in as part of some other command. | ||
210 | # | ||
211 | |||
212 | # what 'all' will build and 'install' will install, in perfexecdir | 183 | # what 'all' will build and 'install' will install, in perfexecdir |
213 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) | 184 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) |
214 | 185 | ||
@@ -565,33 +536,13 @@ else | |||
565 | endif | 536 | endif |
566 | endif | 537 | endif |
567 | 538 | ||
568 | ifdef RUNTIME_PREFIX | ||
569 | COMPAT_CFLAGS += -DRUNTIME_PREFIX | ||
570 | endif | ||
571 | |||
572 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir | ||
573 | QUIET_SUBDIR1 = | ||
574 | |||
575 | ifneq ($(findstring $(MAKEFLAGS),w),w) | ||
576 | PRINT_DIR = --no-print-directory | ||
577 | else # "make -w" | ||
578 | NO_SUBDIR = : | ||
579 | endif | ||
580 | |||
581 | ifneq ($(findstring $(MAKEFLAGS),s),s) | 539 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
582 | ifndef V | 540 | ifndef V |
583 | QUIET_CC = @echo ' ' CC $@; | 541 | QUIET_CC = @echo ' ' CC $@; |
584 | QUIET_AR = @echo ' ' AR $@; | 542 | QUIET_AR = @echo ' ' AR $@; |
585 | QUIET_LINK = @echo ' ' LINK $@; | 543 | QUIET_LINK = @echo ' ' LINK $@; |
586 | QUIET_MKDIR = @echo ' ' MKDIR $@; | 544 | QUIET_MKDIR = @echo ' ' MKDIR $@; |
587 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; | ||
588 | QUIET_GEN = @echo ' ' GEN $@; | 545 | QUIET_GEN = @echo ' ' GEN $@; |
589 | QUIET_SUBDIR0 = +@subdir= | ||
590 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ | ||
591 | $(MAKE) $(PRINT_DIR) -C $$subdir | ||
592 | export V | ||
593 | export QUIET_GEN | ||
594 | export QUIET_BUILT_IN | ||
595 | endif | 546 | endif |
596 | endif | 547 | endif |
597 | 548 | ||
@@ -621,16 +572,14 @@ ALL_CFLAGS += $(BASIC_CFLAGS) | |||
621 | ALL_CFLAGS += $(ARCH_CFLAGS) | 572 | ALL_CFLAGS += $(ARCH_CFLAGS) |
622 | ALL_LDFLAGS += $(BASIC_LDFLAGS) | 573 | ALL_LDFLAGS += $(BASIC_LDFLAGS) |
623 | 574 | ||
624 | export TAR INSTALL DESTDIR SHELL_PATH | 575 | export INSTALL SHELL_PATH |
625 | 576 | ||
626 | 577 | ||
627 | ### Build rules | 578 | ### Build rules |
628 | 579 | ||
629 | SHELL = $(SHELL_PATH) | 580 | SHELL = $(SHELL_PATH) |
630 | 581 | ||
631 | all:: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS | 582 | all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) |
632 | |||
633 | all:: | ||
634 | 583 | ||
635 | please_set_SHELL_PATH_to_a_more_modern_shell: | 584 | please_set_SHELL_PATH_to_a_more_modern_shell: |
636 | @$$(:) | 585 | @$$(:) |
@@ -661,37 +610,17 @@ $(OUTPUT)builtin-timechart.o: builtin-timechart.c $(OUTPUT)common-cmds.h $(OUTPU | |||
661 | '-DPERF_MAN_PATH="$(mandir_SQ)"' \ | 610 | '-DPERF_MAN_PATH="$(mandir_SQ)"' \ |
662 | '-DPERF_INFO_PATH="$(infodir_SQ)"' $< | 611 | '-DPERF_INFO_PATH="$(infodir_SQ)"' $< |
663 | 612 | ||
664 | $(BUILT_INS): $(OUTPUT)perf$X | ||
665 | $(QUIET_BUILT_IN)$(RM) $@ && \ | ||
666 | ln perf$X $@ 2>/dev/null || \ | ||
667 | ln -s perf$X $@ 2>/dev/null || \ | ||
668 | cp perf$X $@ | ||
669 | |||
670 | $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt | 613 | $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt |
671 | 614 | ||
672 | $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt) | 615 | $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt) |
673 | $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@ | 616 | $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@ |
674 | 617 | ||
675 | $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh | 618 | $(SCRIPTS) : % : %.sh |
676 | $(QUIET_GEN)$(RM) $(OUTPUT)$@ $(OUTPUT)$@+ && \ | 619 | $(QUIET_GEN)$(INSTALL) '$@.sh' '$(OUTPUT)$@' |
677 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ | ||
678 | -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ | ||
679 | -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \ | ||
680 | -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ | ||
681 | $@.sh > $(OUTPUT)$@+ && \ | ||
682 | chmod +x $(OUTPUT)$@+ && \ | ||
683 | mv $(OUTPUT)$@+ $(OUTPUT)$@ | ||
684 | |||
685 | configure: configure.ac | ||
686 | $(QUIET_GEN)$(RM) $@ $<+ && \ | ||
687 | sed -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \ | ||
688 | $< > $<+ && \ | ||
689 | autoconf -o $@ $<+ && \ | ||
690 | $(RM) $<+ | ||
691 | 620 | ||
692 | # These can record PERF_VERSION | 621 | # These can record PERF_VERSION |
693 | $(OUTPUT)perf.o perf.spec \ | 622 | $(OUTPUT)perf.o perf.spec \ |
694 | $(patsubst %.sh,%,$(SCRIPT_SH)) \ | 623 | $(SCRIPTS) \ |
695 | : $(OUTPUT)PERF-VERSION-FILE | 624 | : $(OUTPUT)PERF-VERSION-FILE |
696 | 625 | ||
697 | $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS | 626 | $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS |
@@ -826,23 +755,8 @@ $(OUTPUT)PERF-CFLAGS: .FORCE-PERF-CFLAGS | |||
826 | echo "$$FLAGS" >$(OUTPUT)PERF-CFLAGS; \ | 755 | echo "$$FLAGS" >$(OUTPUT)PERF-CFLAGS; \ |
827 | fi | 756 | fi |
828 | 757 | ||
829 | # We need to apply sq twice, once to protect from the shell | ||
830 | # that runs $(OUTPUT)PERF-BUILD-OPTIONS, and then again to protect it | ||
831 | # and the first level quoting from the shell that runs "echo". | ||
832 | $(OUTPUT)PERF-BUILD-OPTIONS: .FORCE-PERF-BUILD-OPTIONS | ||
833 | @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ | ||
834 | @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ | ||
835 | @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ | ||
836 | |||
837 | ### Testing rules | 758 | ### Testing rules |
838 | 759 | ||
839 | # | ||
840 | # None right now: | ||
841 | # | ||
842 | # TEST_PROGRAMS += test-something$X | ||
843 | |||
844 | all:: $(TEST_PROGRAMS) | ||
845 | |||
846 | # GNU make supports exporting all variables by "export" without parameters. | 760 | # GNU make supports exporting all variables by "export" without parameters. |
847 | # However, the environment gets quite big, and some programs have problems | 761 | # However, the environment gets quite big, and some programs have problems |
848 | # with that. | 762 | # with that. |
@@ -855,29 +769,17 @@ check: $(OUTPUT)common-cmds.h | |||
855 | sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \ | 769 | sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \ |
856 | done; \ | 770 | done; \ |
857 | else \ | 771 | else \ |
858 | echo 2>&1 "Did you mean 'make test'?"; \ | ||
859 | exit 1; \ | 772 | exit 1; \ |
860 | fi | 773 | fi |
861 | 774 | ||
862 | remove-dashes: | ||
863 | ./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS) | ||
864 | |||
865 | ### Installation rules | 775 | ### Installation rules |
866 | 776 | ||
867 | ifneq ($(filter /%,$(firstword $(template_dir))),) | ||
868 | template_instdir = $(template_dir) | ||
869 | else | ||
870 | template_instdir = $(prefix)/$(template_dir) | ||
871 | endif | ||
872 | export template_instdir | ||
873 | |||
874 | ifneq ($(filter /%,$(firstword $(perfexecdir))),) | 777 | ifneq ($(filter /%,$(firstword $(perfexecdir))),) |
875 | perfexec_instdir = $(perfexecdir) | 778 | perfexec_instdir = $(perfexecdir) |
876 | else | 779 | else |
877 | perfexec_instdir = $(prefix)/$(perfexecdir) | 780 | perfexec_instdir = $(prefix)/$(perfexecdir) |
878 | endif | 781 | endif |
879 | perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) | 782 | perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) |
880 | export perfexec_instdir | ||
881 | 783 | ||
882 | install: all | 784 | install: all |
883 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' | 785 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
@@ -894,14 +796,6 @@ install: all | |||
894 | $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' | 796 | $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' |
895 | $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' | 797 | $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' |
896 | 798 | ||
897 | ifdef BUILT_INS | ||
898 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
899 | $(INSTALL) $(BUILT_INS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
900 | ifneq (,$X) | ||
901 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) $(OUTPUT)perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) | ||
902 | endif | ||
903 | endif | ||
904 | |||
905 | install-doc: | 799 | install-doc: |
906 | $(MAKE) -C Documentation install | 800 | $(MAKE) -C Documentation install |
907 | 801 | ||
@@ -926,104 +820,17 @@ quick-install-man: | |||
926 | quick-install-html: | 820 | quick-install-html: |
927 | $(MAKE) -C Documentation quick-install-html | 821 | $(MAKE) -C Documentation quick-install-html |
928 | 822 | ||
929 | |||
930 | ### Maintainer's dist rules | ||
931 | # | ||
932 | # None right now | ||
933 | # | ||
934 | # | ||
935 | # perf.spec: perf.spec.in | ||
936 | # sed -e 's/@@VERSION@@/$(PERF_VERSION)/g' < $< > $@+ | ||
937 | # mv $@+ $@ | ||
938 | # | ||
939 | # PERF_TARNAME=perf-$(PERF_VERSION) | ||
940 | # dist: perf.spec perf-archive$(X) configure | ||
941 | # ./perf-archive --format=tar \ | ||
942 | # --prefix=$(PERF_TARNAME)/ HEAD^{tree} > $(PERF_TARNAME).tar | ||
943 | # @mkdir -p $(PERF_TARNAME) | ||
944 | # @cp perf.spec configure $(PERF_TARNAME) | ||
945 | # @echo $(PERF_VERSION) > $(PERF_TARNAME)/version | ||
946 | # $(TAR) rf $(PERF_TARNAME).tar \ | ||
947 | # $(PERF_TARNAME)/perf.spec \ | ||
948 | # $(PERF_TARNAME)/configure \ | ||
949 | # $(PERF_TARNAME)/version | ||
950 | # @$(RM) -r $(PERF_TARNAME) | ||
951 | # gzip -f -9 $(PERF_TARNAME).tar | ||
952 | # | ||
953 | # htmldocs = perf-htmldocs-$(PERF_VERSION) | ||
954 | # manpages = perf-manpages-$(PERF_VERSION) | ||
955 | # dist-doc: | ||
956 | # $(RM) -r .doc-tmp-dir | ||
957 | # mkdir .doc-tmp-dir | ||
958 | # $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc | ||
959 | # cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . | ||
960 | # gzip -n -9 -f $(htmldocs).tar | ||
961 | # : | ||
962 | # $(RM) -r .doc-tmp-dir | ||
963 | # mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 | ||
964 | # $(MAKE) -C Documentation DESTDIR=./ \ | ||
965 | # man1dir=../.doc-tmp-dir/man1 \ | ||
966 | # man5dir=../.doc-tmp-dir/man5 \ | ||
967 | # man7dir=../.doc-tmp-dir/man7 \ | ||
968 | # install | ||
969 | # cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . | ||
970 | # gzip -n -9 -f $(manpages).tar | ||
971 | # $(RM) -r .doc-tmp-dir | ||
972 | # | ||
973 | # rpm: dist | ||
974 | # $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz | ||
975 | |||
976 | ### Cleaning rules | 823 | ### Cleaning rules |
977 | 824 | ||
978 | distclean: clean | ||
979 | # $(RM) configure | ||
980 | |||
981 | clean: | 825 | clean: |
982 | $(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive} | 826 | $(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive} |
983 | $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf | 827 | $(RM) $(ALL_PROGRAMS) perf |
984 | $(RM) $(TEST_PROGRAMS) | ||
985 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* | 828 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* |
986 | $(RM) -r $(PERF_TARNAME) .doc-tmp-dir | ||
987 | $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz | ||
988 | $(RM) $(htmldocs).tar.gz $(manpages).tar.gz | ||
989 | $(MAKE) -C Documentation/ clean | 829 | $(MAKE) -C Documentation/ clean |
990 | $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-BUILD-OPTIONS | 830 | $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS |
991 | @python util/setup.py clean --build-lib='$(OUTPUT)python' \ | 831 | @python util/setup.py clean --build-lib='$(OUTPUT)python' \ |
992 | --build-temp='$(OUTPUT)python/temp' | 832 | --build-temp='$(OUTPUT)python/temp' |
993 | 833 | ||
994 | .PHONY: all install clean strip | 834 | .PHONY: all install clean strip |
995 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell | 835 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
996 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS | 836 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS |
997 | .PHONY: .FORCE-PERF-BUILD-OPTIONS | ||
998 | |||
999 | ### Make sure built-ins do not have dups and listed in perf.c | ||
1000 | # | ||
1001 | check-builtins:: | ||
1002 | ./check-builtins.sh | ||
1003 | |||
1004 | ### Test suite coverage testing | ||
1005 | # | ||
1006 | # None right now | ||
1007 | # | ||
1008 | # .PHONY: coverage coverage-clean coverage-build coverage-report | ||
1009 | # | ||
1010 | # coverage: | ||
1011 | # $(MAKE) coverage-build | ||
1012 | # $(MAKE) coverage-report | ||
1013 | # | ||
1014 | # coverage-clean: | ||
1015 | # rm -f *.gcda *.gcno | ||
1016 | # | ||
1017 | # COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs | ||
1018 | # COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov | ||
1019 | # | ||
1020 | # coverage-build: coverage-clean | ||
1021 | # $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all | ||
1022 | # $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ | ||
1023 | # -j1 test | ||
1024 | # | ||
1025 | # coverage-report: | ||
1026 | # gcov -b *.c */*.c | ||
1027 | # grep '^function.*called 0 ' *.c.gcov */*.c.gcov \ | ||
1028 | # | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ | ||
1029 | # | tee coverage-untested-functions | ||