aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/Makefile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-20 09:22:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-20 11:36:48 -0400
commit6f06ccbc86f8a02aa32271263249657ce484eb25 (patch)
treec04eb04fcd1b7da2ec1a0072089cd95317a2cf54 /Documentation/perf_counter/Makefile
parent0780060124011b94af55830939c86cc0916be0f5 (diff)
perf_counter tools: clean up after introduction of the Git command framework
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/Makefile')
-rw-r--r--Documentation/perf_counter/Makefile207
1 files changed, 6 insertions, 201 deletions
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile
index 11809b943fc3..1b6026555547 100644
--- a/Documentation/perf_counter/Makefile
+++ b/Documentation/perf_counter/Makefile
@@ -138,16 +138,6 @@ all::
138# 138#
139# Define NO_PERL if you do not want Perl scripts or libraries at all. 139# Define NO_PERL if you do not want Perl scripts or libraries at all.
140# 140#
141# Define NO_TCLTK if you do not want Tcl/Tk GUI.
142#
143# The TCL_PATH variable governs the location of the Tcl interpreter
144# used to optimize perf-gui for your system. Only used if NO_TCLTK
145# is not set. Defaults to the bare 'tclsh'.
146#
147# The TCLTK_PATH variable governs the location of the Tcl/Tk interpreter.
148# If not set it defaults to the bare 'wish'. If it is set to the empty
149# string then NO_TCLTK will be forced (this is used by configure script).
150#
151# Define INTERNAL_QSORT to use Git's implementation of qsort(), which 141# Define INTERNAL_QSORT to use Git's implementation of qsort(), which
152# is a simplified version of the merge sort used in glibc. This is 142# is a simplified version of the merge sort used in glibc. This is
153# recommended if Git triggers O(n^2) behavior in your platform's qsort(). 143# recommended if Git triggers O(n^2) behavior in your platform's qsort().
@@ -215,12 +205,8 @@ TAR = tar
215FIND = find 205FIND = find
216INSTALL = install 206INSTALL = install
217RPMBUILD = rpmbuild 207RPMBUILD = rpmbuild
218TCL_PATH = tclsh
219TCLTK_PATH = wish
220PTHREAD_LIBS = -lpthread 208PTHREAD_LIBS = -lpthread
221 209
222export TCL_PATH TCLTK_PATH
223
224# sparse is architecture-neutral, which means that we need to tell it 210# sparse is architecture-neutral, which means that we need to tell it
225# explicitly what architecture to check for. Fix this up for yours.. 211# explicitly what architecture to check for. Fix this up for yours..
226SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ 212SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
@@ -529,10 +515,6 @@ ifdef NO_EXTERNAL_GREP
529 BASIC_CFLAGS += -DNO_EXTERNAL_GREP 515 BASIC_CFLAGS += -DNO_EXTERNAL_GREP
530endif 516endif
531 517
532ifeq ($(TCLTK_PATH),)
533NO_TCLTK=NoThanks
534endif
535
536ifeq ($(PERL_PATH),) 518ifeq ($(PERL_PATH),)
537NO_PERL=NoThanks 519NO_PERL=NoThanks
538endif 520endif
@@ -583,7 +565,6 @@ prefix_SQ = $(subst ','\'',$(prefix))
583 565
584SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 566SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
585PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) 567PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
586TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
587 568
588LIBS = $(PERFLIBS) $(EXTLIBS) 569LIBS = $(PERFLIBS) $(EXTLIBS)
589 570
@@ -607,14 +588,6 @@ ifneq (,$X)
607endif 588endif
608 589
609all:: 590all::
610ifndef NO_TCLTK
611 $(QUIET_SUBDIR0)perf-gui $(QUIET_SUBDIR1) perfexecdir='$(perfexec_instdir_SQ)' all
612 $(QUIET_SUBDIR0)perfk-perf $(QUIET_SUBDIR1) all
613endif
614ifndef NO_PERL
615 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
616endif
617 $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
618 591
619please_set_SHELL_PATH_to_a_more_modern_shell: 592please_set_SHELL_PATH_to_a_more_modern_shell:
620 @$$(:) 593 @$$(:)
@@ -704,21 +677,6 @@ builtin-revert.o wt-status.o: wt-status.h
704$(LIB_FILE): $(LIB_OBJS) 677$(LIB_FILE): $(LIB_OBJS)
705 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) 678 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
706 679
707doc:
708 $(MAKE) -C Documentation all
709
710man:
711 $(MAKE) -C Documentation man
712
713html:
714 $(MAKE) -C Documentation html
715
716info:
717 $(MAKE) -C Documentation info
718
719pdf:
720 $(MAKE) -C Documentation pdf
721
722TAGS: 680TAGS:
723 $(RM) TAGS 681 $(RM) TAGS
724 $(FIND) . -name '*.[hcS]' -print | xargs etags -a 682 $(FIND) . -name '*.[hcS]' -print | xargs etags -a
@@ -751,33 +709,12 @@ PERF-BUILD-OPTIONS: .FORCE-PERF-BUILD-OPTIONS
751 @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ 709 @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
752 @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ 710 @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
753 711
754### Detect Tck/Tk interpreter path changes
755ifndef NO_TCLTK
756TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
757
758PERF-GUI-VARS: .FORCE-PERF-GUI-VARS
759 @VARS='$(TRACK_VARS)'; \
760 if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
761 echo 1>&2 " * new Tcl/Tk interpreter location"; \
762 echo "$$VARS" >$@; \
763 fi
764
765.PHONY: .FORCE-PERF-GUI-VARS
766endif
767
768### Testing rules 712### Testing rules
769 713
770TEST_PROGRAMS += test-chmtime$X 714#
771TEST_PROGRAMS += test-ctype$X 715# None right now:
772TEST_PROGRAMS += test-date$X 716#
773TEST_PROGRAMS += test-delta$X 717# TEST_PROGRAMS += test-something$X
774TEST_PROGRAMS += test-dump-cache-tree$X
775TEST_PROGRAMS += test-genrandom$X
776TEST_PROGRAMS += test-match-trees$X
777TEST_PROGRAMS += test-parse-options$X
778TEST_PROGRAMS += test-path-utils$X
779TEST_PROGRAMS += test-sha1$X
780TEST_PROGRAMS += test-sigchain$X
781 718
782all:: $(TEST_PROGRAMS) 719all:: $(TEST_PROGRAMS)
783 720
@@ -787,25 +724,6 @@ all:: $(TEST_PROGRAMS)
787 724
788export NO_SVN_TESTS 725export NO_SVN_TESTS
789 726
790test: all
791 $(MAKE) -C t/ all
792
793test-ctype$X: ctype.o
794
795test-date$X: date.o ctype.o
796
797test-delta$X: diff-delta.o patch-delta.o
798
799test-parse-options$X: parse-options.o
800
801.PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
802
803test-%$X: test-%.o $(PERFLIBS)
804 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
805
806check-sha1:: test-sha1$X
807 ./test-sha1.sh
808
809check: common-cmds.h 727check: common-cmds.h
810 if sparse; \ 728 if sparse; \
811 then \ 729 then \
@@ -845,10 +763,6 @@ install: all
845 $(INSTALL) perf$X perf-upload-pack$X perf-receive-pack$X perf-upload-archive$X perf-shell$X perf-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)' 763 $(INSTALL) perf$X perf-upload-pack$X perf-receive-pack$X perf-upload-archive$X perf-shell$X perf-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)'
846 $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install 764 $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
847 $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install 765 $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
848ifndef NO_TCLTK
849 $(MAKE) -C perfk-perf install
850 $(MAKE) -C perf-gui perfexecdir='$(perfexec_instdir_SQ)' install
851endif
852ifneq (,$X) 766ifneq (,$X)
853 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) 767 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';)
854endif 768endif
@@ -865,32 +779,6 @@ endif
865 done } && \ 779 done } && \
866 ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/perf-add$X" 780 ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/perf-add$X"
867 781
868install-doc:
869 $(MAKE) -C Documentation install
870
871install-man:
872 $(MAKE) -C Documentation install-man
873
874install-html:
875 $(MAKE) -C Documentation install-html
876
877install-info:
878 $(MAKE) -C Documentation install-info
879
880install-pdf:
881 $(MAKE) -C Documentation install-pdf
882
883quick-install-doc:
884 $(MAKE) -C Documentation quick-install
885
886quick-install-man:
887 $(MAKE) -C Documentation quick-install-man
888
889quick-install-html:
890 $(MAKE) -C Documentation quick-install-html
891
892
893
894### Maintainer's dist rules 782### Maintainer's dist rules
895 783
896perf.spec: perf.spec.in 784perf.spec: perf.spec.in
@@ -904,38 +792,16 @@ dist: perf.spec perf-archive$(X) configure
904 @mkdir -p $(PERF_TARNAME) 792 @mkdir -p $(PERF_TARNAME)
905 @cp perf.spec configure $(PERF_TARNAME) 793 @cp perf.spec configure $(PERF_TARNAME)
906 @echo $(PERF_VERSION) > $(PERF_TARNAME)/version 794 @echo $(PERF_VERSION) > $(PERF_TARNAME)/version
907 @$(MAKE) -C perf-gui TARDIR=../$(PERF_TARNAME)/perf-gui dist-version
908 $(TAR) rf $(PERF_TARNAME).tar \ 795 $(TAR) rf $(PERF_TARNAME).tar \
909 $(PERF_TARNAME)/perf.spec \ 796 $(PERF_TARNAME)/perf.spec \
910 $(PERF_TARNAME)/configure \ 797 $(PERF_TARNAME)/configure \
911 $(PERF_TARNAME)/version \ 798 $(PERF_TARNAME)/version
912 $(PERF_TARNAME)/perf-gui/version
913 @$(RM) -r $(PERF_TARNAME) 799 @$(RM) -r $(PERF_TARNAME)
914 gzip -f -9 $(PERF_TARNAME).tar 800 gzip -f -9 $(PERF_TARNAME).tar
915 801
916rpm: dist 802rpm: dist
917 $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz 803 $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz
918 804
919htmldocs = perf-htmldocs-$(PERF_VERSION)
920manpages = perf-manpages-$(PERF_VERSION)
921dist-doc:
922 $(RM) -r .doc-tmp-dir
923 mkdir .doc-tmp-dir
924 $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
925 cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
926 gzip -n -9 -f $(htmldocs).tar
927 :
928 $(RM) -r .doc-tmp-dir
929 mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7
930 $(MAKE) -C Documentation DESTDIR=./ \
931 man1dir=../.doc-tmp-dir/man1 \
932 man5dir=../.doc-tmp-dir/man5 \
933 man7dir=../.doc-tmp-dir/man7 \
934 install
935 cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
936 gzip -n -9 -f $(manpages).tar
937 $(RM) -r .doc-tmp-dir
938
939### Cleaning rules 805### Cleaning rules
940 806
941distclean: clean 807distclean: clean
@@ -951,74 +817,13 @@ clean:
951 $(RM) -r $(PERF_TARNAME) .doc-tmp-dir 817 $(RM) -r $(PERF_TARNAME) .doc-tmp-dir
952 $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz 818 $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz
953 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz 819 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
954 $(MAKE) -C Documentation/ clean 820 $(RM) PERF-VERSION-FILE PERF-CFLAGS PERF-BUILD-OPTIONS
955 $(MAKE) -C templates/ clean
956 $(MAKE) -C t/ clean
957ifndef NO_TCLTK
958 $(MAKE) -C perfk-perf clean
959 $(MAKE) -C perf-gui clean
960endif
961 $(RM) PERF-VERSION-FILE PERF-CFLAGS PERF-GUI-VARS PERF-BUILD-OPTIONS
962 821
963.PHONY: all install clean strip 822.PHONY: all install clean strip
964.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell 823.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
965.PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS 824.PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS
966.PHONY: .FORCE-PERF-BUILD-OPTIONS 825.PHONY: .FORCE-PERF-BUILD-OPTIONS
967 826
968### Check documentation
969#
970check-docs::
971 @(for v in $(ALL_PROGRAMS) $(BUILT_INS) perf perfk; \
972 do \
973 case "$$v" in \
974 perf-merge-octopus | perf-merge-ours | perf-merge-recursive | \
975 perf-merge-resolve | perf-merge-subtree | \
976 perf-fsck-objects | perf-init-db | \
977 perf-?*--?* ) continue ;; \
978 esac ; \
979 test -f "Documentation/$$v.txt" || \
980 echo "no doc: $$v"; \
981 sed -e '/^#/d' command-list.txt | \
982 grep -q "^$$v[ ]" || \
983 case "$$v" in \
984 perf) ;; \
985 *) echo "no link: $$v";; \
986 esac ; \
987 done; \
988 ( \
989 sed -e '/^#/d' \
990 -e 's/[ ].*//' \
991 -e 's/^/listed /' command-list.txt; \
992 ls -1 Documentation/perf*txt | \
993 sed -e 's|Documentation/|documented |' \
994 -e 's/\.txt//'; \
995 ) | while read how cmd; \
996 do \
997 case "$$how,$$cmd" in \
998 *,perf-citool | \
999 *,perf-gui | \
1000 *,perf-help | \
1001 documented,perfattributes | \
1002 documented,perfignore | \
1003 documented,perfmodules | \
1004 documented,perfcli | \
1005 documented,perf-tools | \
1006 documented,perfcore-tutorial | \
1007 documented,perfcvs-migration | \
1008 documented,perfdiffcore | \
1009 documented,perfglossary | \
1010 documented,perfhooks | \
1011 documented,perfrepository-layout | \
1012 documented,perftutorial | \
1013 documented,perftutorial-2 | \
1014 sentinel,not,matching,is,ok ) continue ;; \
1015 esac; \
1016 case " $(ALL_PROGRAMS) $(BUILT_INS) perf perfk " in \
1017 *" $$cmd "*) ;; \
1018 *) echo "removed but $$how: $$cmd" ;; \
1019 esac; \
1020 done ) | sort
1021
1022### Make sure built-ins do not have dups and listed in perf.c 827### Make sure built-ins do not have dups and listed in perf.c
1023# 828#
1024check-builtins:: 829check-builtins::