Changeset 776 for trunk/kBuild
- Timestamp:
- Jan 20, 2007, 7:36:40 PM (19 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r770 r776 624 624 .PRECIOUS: $(out) 625 625 $(out) $($(target)_$(srcname)_FETCH_OUTPUT_): | $($(target)_$(srcname)_FETCH_DEPORD_) 626 $$(call MSG_ L1,Downloading $(source)...)626 $$(call MSG_FETCH_DL,$(target),$(source),$(out)) 627 627 @## @todo do fancy stuff like download continuation. 628 628 $$(QUIET)$$(RM) -f $(out) $(out).md5 … … 635 635 # Intermediate goal for making sure the md5 and size matches. it will (re) fetch the archive if necessary. 636 636 $(out).checked_$(md5)_$(size): $($(target)_$(srcname)_FETCH_DEPEND_) | $($(target)_$(srcname)_FETCH_DEPORD_) 637 $$(call MSG_ L1,Checking $(out),($(source))...)637 $$(call MSG_FETCH_CHK,$(target),$(source),$(out)) 638 638 $$(QUIET)$$(RM) -f $$@ $(out).md5 639 639 @# creates the .md5 we pass to md5sum. … … 658 658 $(out) $($(target)_$(srcname)_UNPACK_OUTPUT_): $($(target)_$(srcname)_UNPACK_DEPEND_) \ 659 659 | $($(target)_$(srcname)_UNPACK_DEPORD_) $(archive).checked_$(md5)_$(size) 660 $$(call MSG_ L1,Unpacking $(archive),into $(inst)...)660 $$(call MSG_FETCH_UP,$(target),$(archive),$(inst)) 661 661 $$(QUIET)$$(RM) -f $(out) 662 662 @# if the source archive doesn't exist fetch it (can have been deleted to save space). … … 854 854 855 855 $(out).lst: $(_TARGET_$(target)_UNPACKED) | $(call DIRDEP,$(inst)) 856 $$(call MSG_ L1,Successfully fetched$(target))856 $$(call MSG_FETCH_OK,$(target)) 857 857 $$(QUIET)$$(RM) -f $$@ $$@.tmp 858 858 $$(QUIET2)$$(APPEND) $$@.tmp "$(notdir $(out))" … … 861 861 862 862 $(out)_unfetched: 863 $$(call MSG_ L1,Unfetching $(target)...)863 $$(call MSG_UNFETCH,$(target)) 864 864 $$(QUIET)$$(RM) -f $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d')) 865 865 $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@) \ … … 870 870 $(out): $(comp-vars _TARGET_$(target)_DIGEST_PREV,_TARGET_$(target)_DIGEST,FORCE) | $(call DIRDEP,$(inst)) 871 871 $$(QUIET)$$(RM) -f $$@ 872 $$(call MSG_L1,$$(if $$(_TARGET_$(target)_DIGEST),$$(if $$(wildcard $(out).lst),Re-fetching,Fetching),Removing) $(target)...) 872 $$(if $$(_TARGET_$(target)_DIGEST),$$(if $$(wildcard $(out).lst)\ 873 ,$$(call MSG_REFETCH,$(target)),$$(call MSG_FETCH,$(target))),$$(call MSG_UNFETCH,$(target))) 873 874 $$(QUIET)$$(if $$(wildcard $(out).lst ),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out)_unfetched) 874 875 $$(QUIET)$$(if $$(_TARGET_$(target)_DIGEST),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out).lst,$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@)) … … 978 979 | \ 979 980 $($(target)_$(source)_DEPORD_) 980 $$(call MSG_ L1,Compiling $(target) - $(source),=> $$@)981 $$(call MSG_COMPILE,$(target),$(source),$$@,$(type)) 981 982 $$(QUIET)$$(RM) -f $(dep) $(obj) $($(target)_$(source)_OUTPUT_) 982 983 $(custom_pre) … … 1024 1025 | \ 1025 1026 $($(target)_DEPORD_) 1026 $$(call MSG_L 1,Linking $$@)1027 $$(call MSG_LINK,$(target),$$@,$(tool_do)) 1027 1028 $$(QUIET)$$(RM) -f $(dep) $(out) $($(target)_OUTPUT_) 1028 1029 $(custom_pre) … … 1053 1054 define def_link_install_rule 1054 1055 $(INSTARGET_$(target)) : $(out) | $(call DIRDEP,$(dir $(INSTARGET_$(target)))) 1055 $$(call MSG_ L1,Installing $(target) =>$$@)1056 $$(call MSG_INST_TRG,$(target),$(out),$$@) 1056 1057 $$(QUIET)$$(INSTALL) $$(if $(mode),-m $(mode)) $(out) $$@ 1057 1058 … … 1263 1264 1264 1265 # Process libraries 1266 tool_do := LINK_LIBRARY 1265 1267 mode := 0644 1266 1268 $(foreach target, $(LIBRARIES) $(LIBRARIES.$(BUILD_TARGET)) $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_lib))) … … 1630 1632 # the install rule 1631 1633 $(insdst) : $(srcsrc) | $(call DIRDEP,$(dir $(insdst))) 1632 $$(call MSG_ L1,Installing $(insdst),(<= $(srcsrc)))1634 $$(call MSG_INST_FILE,$(srcsrc),$(insdst)) 1633 1635 $$(QUIET)$$(if $$(filter $(INSTALL),$(inscmd)),,$$(RM) -f $$@) 1634 1636 $$(QUIET)$(inscmd) … … 1752 1754 # the install rule 1753 1755 $(insdst) : | $(call DIRDEP,$(dir $(insdst))) 1754 $$(call MSG_ L1,Installing symlink $(insdst),pointing to$(symdst))1756 $$(call MSG_INST_SYM,$(insdst),$(symdst)) 1755 1757 $$(QUIET)$$(RM) -f $$@ 1756 1758 $$(QUIET)$$(LN_SYMLINK) $(symdst) $(insdst) … … 1802 1804 # the install rule 1803 1805 $(insdst): 1804 $$(call MSG_ L1,Installing directory$(insdst))1806 $$(call MSG_INST_DIR,$(insdst)) 1805 1807 $$(QUIET)$$(INSTALL) -d \ 1806 1808 $(if $(uid),-o $(uid))\ … … 1917 1919 define def_mkdir_rule 1918 1920 $(directory): 1919 $$(call MSG_ L2,Creating directory$$@)1921 $$(call MSG_MKDIR,$$@) 1920 1922 $$(QUIET)$$(MKDIR) -p $$@ 1921 1923 endef … … 1928 1930 # 1929 1931 do-nothing: 1930 $(call MSG_ L1,Did nothing in $(CURDIR))1932 $(call MSG_NOTHING) 1931 1933 1932 1934 … … 1935 1937 # 1936 1938 do-clean: 1937 $(call MSG_ L1,Cleaning...)1939 $(call MSG_CLEAN) 1938 1940 $(QUIET)$(RM) -f $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN) 1939 1941 … … 2043 2045 .PHONY: pass_$(pass)_order 2044 2046 pass_$(pass)_order: $(pass_prev) 2045 $$(call MSG_ L1,Pass -$$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass)))2047 $$(call MSG_PASS,$$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass))) 2046 2048 + $$(QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass) 2047 2049 else … … 2049 2051 .PHONY: pass_$(pass)_order pass_$(pass)_banner 2050 2052 pass_$(pass)_banner: 2051 $$(call MSG_ L1,Pass -$$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass)))2053 $$(call MSG_PASS,$$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass))) 2052 2054 pass_$(pass)_order: \ 2053 2055 $(pass_prev) \ -
trunk/kBuild/header.kmk
r762 r776 411 411 endif 412 412 413 PRINTF_EXT := $(PATH_KBUILD_BIN)/kmk_printf$(HOSTSUFF_EXE) 414 ifeq ($(filter printf,$(KMK_BUILTIN)),printf) 415 PRINTF := kmk_builtin_printf 416 else 417 PRINTF := $(PRINTF_EXT) 418 endif 419 413 420 RM_EXT := $(PATH_KBUILD_BIN)/kmk_rm$(HOSTSUFF_EXE) 414 421 ifeq ($(filter rm,$(KMK_BUILTIN)),rm) … … 712 719 endif 713 720 721 # 722 # Check for --pretty-command-printing before including the Config.kmk 723 # so that anyone overriding the message macros can take the implied 724 # verbosity level change into account. 725 # 726 ifndef KBUILD_VERBOSE 727 ifndef KBUILD_QUIET 728 ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),) 729 export KBUILD_VERBOSE := 1 730 endif 731 endif 732 endif 733 734 714 735 # Include the config.kmk we found file (or the default one). 715 736 include $(_CFGFILE) … … 717 738 718 739 # 740 # Currently two message styles are supported: default and dense. 741 # 742 KBUILD_MSG_STYLE ?= default 743 ifeq ($(KBUILD_MSG_STYLE),default) 744 # 745 # The 'default' style. 746 # 747 748 ## Fetch starting. 749 # @param 1 Target name. 750 MSG_FETCH ?= $(call MSG_L1,Fetching $1...) 751 ## Re-fetch starting. 752 # @param 1 Target name. 753 MSG_REFETCH ?= $(call MSG_L1,Re-fetching $1...) 754 ## Downloading a fetch component. 755 # @param 1 Target name. 756 # @param 2 The source URL. 757 # @param 3 The destination file name. 758 MSG_FETCH_DL ?= $(call MSG_L1,Downloading $1 - $2,=> $3) 759 ## Checking a fetch component. 760 # @param 1 Target name. 761 # @param 2 The source URL. 762 # @param 3 The destination file name. 763 MSG_FETCH_CHK?= $(call MSG_L1,Checking $1 - $3, ($2)) 764 ## Unpacking a fetch component. 765 # @param 1 Target name. 766 # @param 2 The archive file name. 767 # @param 3 The target directory. 768 MSG_FETCH_UP ?= $(call MSG_L1,Unpacking $1 - $2 => $3) 769 ## Fetch completed. 770 # @param 1 Target name. 771 MSG_FETCH_OK ?= $(call MSG_L1,Successfully fetched $1) 772 ## Unfetch a fetch target. 773 # @param 1 Target name. 774 MSG_UNFETCH ?= $(call MSG_L1,Unfetching $1...) 775 ## Compiling a source file. 776 # @param 1 Target name. 777 # @param 2 The source filename. 778 # @param 3 The primary link output file name. 779 # @param 4 The source type (CXX,C,AS,RC,++). 780 MSG_COMPILE ?= $(call MSG_L1,Compiling $1 - $2,=> $3) 781 ## Linking a bldprog/dll/program/sysmod target. 782 # @param 1 Target name. 783 # @param 2 The primary link output file name. 784 # @param 3 The link tool operation (LINK_LIBRARY,LINK_PROGRAM,LINK_DLL,LINK_SYSMOD,++). 785 MSG_LINK ?= $(call MSG_L1,Linking $1,=> $2) 786 ## Creating a directory (build). 787 # @param 1 Directory name. 788 MSG_MKDIR ?= $(call MSG_L2,Creating directory $1) 789 ## Cleaning. 790 MSG_CLEAN ?= $(call MSG_L1,Cleaning...) 791 ## Nothing. 792 MSG_NOTHING ?= $(call MSG_L1,Did nothing in $(CURDIR)) 793 ## Pass 794 # @param 1 The pass name. 795 MSG_PASS ?= $(call MSG_L1,Pass - $1) 796 ## Installing a bldprog/lib/dll/program/sysmod target. 797 # @param 1 Target name. 798 # @param 2 The source filename. 799 # @param 3 The destination file name. 800 MSG_INST_TRG ?= $(call MSG_L1,Installing $1 => $3) 801 ## Installing a file (install target). 802 # @param 1 The source filename. 803 # @param 2 The destination filename. 804 MSG_INST_FILE?= $(call MSG_L1,Installing $2,(<= $1)) 805 ## Installing a symlink. 806 # @param 1 Symlink 807 # @param 2 Link target 808 MSG_INST_SYM ?= $(call MSG_L1,Installing symlink $1,=> $2) 809 ## Installing a directory. 810 # @param 1 Directory name. 811 MSG_INST_DIR ?= $(call MSG_L1,Installing directory $1) 812 813 else ifeq ($(KBUILD_MSG_STYLE),dense) 814 # 815 # The 'dense' style 816 # 817 ifndef KBUILD_VERBOSE 818 MSG_L1 ?= @$(ECHO) " $(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1))))" 819 else 820 MSG_L1 ?= @$(ECHO) " $(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1 $2))))" 821 MSG_L2 ?= @$(ECHO) " $(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1))))" 822 endif 823 MAKEFLAGS := --no-print-directory $(MAKEFLAGS) 824 825 ## Fetch starting. 826 # @param 1 Target name. 827 MSG_FETCH ?= $(call MSG_L1,FTCH $1...) 828 ## Re-fetch starting. 829 # @param 1 Target name. 830 MSG_REFETCH ?= $(call MSG_L1,RFTCH $1...) 831 ## Downloading a fetch component. 832 # @param 1 Target name. 833 # @param 2 The source URL. 834 # @param 3 The destination file name. 835 MSG_FETCH_DL ?= $(call MSG_L1,GET $1 - $2,=> $3) 836 ## Checking a fetch component. 837 # @param 1 Target name. 838 # @param 2 The source URL. 839 # @param 3 The destination file name. 840 MSG_FETCH_CHK?= $(call MSG_L1,CHK $1 - $3, ($2)) 841 ## Unpacking a fetch component. 842 # @param 1 Target name. 843 # @param 2 The archive file name. 844 # @param 3 The target directory. 845 MSG_FETCH_UP ?= $(call MSG_L1,UNPK $1 - $2,=> $3) 846 ## Fetch completed. 847 # @param 1 Target name. 848 MSG_FETCH_OK ?= $(call MSG_L1,DONE $1) 849 ## Unfetch a fetch target. 850 # @param 1 Target name. 851 MSG_UNFETCH ?= $(call MSG_L1,RM $1...) 852 ## Compiling a source file. 853 # @param 1 Target name. 854 # @param 2 The source filename. 855 # @param 3 The primary link output file name. 856 # @param 4 The source type (CXX,C,AS,RC,++). 857 MSG_COMPILE ?= $(call MSG_L1,CC $1 - $2,=> $3) 858 ## Linking a bldprog/dll/program/sysmod target. 859 # @param 1 Target name. 860 # @param 2 The primary link output file name. 861 # @param 3 The link tool operation (LINK_LIBRARY,LINK_PROGRAM,LINK_DLL,LINK_SYSMOD,++). 862 MSG_LINK ?= $(call MSG_L1,$(if $(eq $3,LINK_LIBRARY),AR,LD) $1,=> $2) 863 ## Creating a directory (build). 864 # @param 1 Directory name. 865 MSG_MKDIR ?= $(call MSG_L2,DIR $1) 866 ## Cleaning. 867 MSG_CLEAN ?= $(call MSG_L1,CLEAN) 868 ## Nothing. 869 MSG_NOTHING ?= $(call MSG_L1,NOTHING $(CURDIR)) 870 ## Installing a bldprog/lib/dll/program/sysmod target. 871 # @param 1 Target name. 872 # @param 2 The source filename. 873 # @param 3 The destination file name. 874 MSG_INST_TRG ?= $(call MSG_L1,INST $1,=> $2) 875 ## Installing a file (install target). 876 # @param 1 The source filename. 877 # @param 2 The destination filename. 878 MSG_INST_FILE?= $(call MSG_L1,IFIL $2,(<= $1)) 879 ## Installing a symlink. 880 # @param 1 Symlink 881 # @param 2 Link target 882 MSG_INST_SYM ?= $(call MSG_L1,ISYM $1,=> $2) 883 ## Installing a directory. 884 # @param 1 Directory name. 885 MSG_INST_DIR ?= $(call MSG_L1,IDIR $1) 886 887 else 888 $(error kBuild: Unknown message style: KBUILD_MSG_STYLE=$(KBUILD_MSG_STYLE)) 889 endif 890 891 892 # 719 893 # Message macros. 720 894 # … … 723 897 # 724 898 ifdef KBUILD_QUIET 725 # minimal output.899 # No output 726 900 QUIET := @ 727 901 QUIET2:= @ 728 902 MSG_L1 = 729 903 MSG_L2 = 730 MSG_L3 =731 904 else 732 905 ifndef KBUILD_VERBOSE 733 ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),) 734 export KBUILD_VERBOSE := 1 735 endif 736 endif 737 ifndef KBUILD_VERBOSE 738 QUIET := @ 739 QUIET2:= @ 740 MSG_L1 = @$(ECHO) "kBuild: $1" 741 MSG_L2 = 742 MSG_L3 = 906 # Default output level. 907 QUIET := @ 908 QUIET2 := @ 909 MSG_L1 ?= @$(ECHO) "kBuild: $1" 910 MSG_L2 = 911 else ifeq ($(KBUILD_VERBOSE),1) 912 # A bit more output 913 QUIET := @ 914 QUIET2 := @ 915 MSG_L1 ?= @$(ECHO) "kBuild: $1 $2" 916 MSG_L2 = 917 else ifeq ($(KBUILD_VERBOSE),2) 918 # Lot more output 919 QUIET := 920 QUIET2 := @ 921 MSG_L1 ?= @$(ECHO) "kBuild: $1 $2" 922 MSG_L2 ?= @$(ECHO) "kBuild: $1" 743 923 else 744 924 # maximal output. 745 QUIET := 746 MSG_L1 = @$(ECHO) "kBuild: $1 $2" 747 MSG_L2 = @$(ECHO) "kBuild: $1" 748 ifneq ($(KBUILD_VERBOSE),all) 749 QUIET2:= @ 750 else 751 QUIET2:= 752 endif 753 endif 754 endif 925 QUIET := 926 QUIET2 := 927 MSG_L1 ?= @$(ECHO) "kBuild: $1 $2" 928 MSG_L2 ?= @$(ECHO) "kBuild: $1" 929 endif 930 endif 931 932 755 933 756 934 # end-of-file-content … … 758 936 endif # __header_kmk__ 759 937 760
Note:
See TracChangeset
for help on using the changeset viewer.