Changeset 696 for trunk/kBuild/footer.kmk
- Timestamp:
- Dec 10, 2006, 8:16:02 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r693 r696 666 666 .PRECIOUS: $(out) 667 667 $(out) $($(target)_$(srcname)_FETCH_OUTPUT_): | $($(target)_$(srcname)_FETCH_DEPORD_) 668 @$$(ECHO) Downloading $(source)...669 ## @todo do fancy stuff like download continuation.670 $$( RM) -f $(out) $(out).md5668 $$(call MSG_L1,Downloading $(source)...) 669 @## @todo do fancy stuff like download continuation. 670 $$(QUIET)$$(RM) -f $(out) $(out).md5 671 671 $($(target)_$(srcname)_FETCH_CMDS_) 672 @$(if $(md5),$$(APPEND) $(out).md5 "$(md5) *$(out)")673 $ (if $(md5),$$(MD5SUM) -c $(out).md5)672 $$(QUIET2)$(if $(md5),$$(APPEND) $(out).md5 "$(md5) *$(out)") 673 $$(QUIET)$(if $(md5),$$(MD5SUM) -c $(out).md5) 674 674 675 675 … … 677 677 # Intermediate goal for making sure the md5 and size matches. it will (re) fetch the archive if necessary. 678 678 $(out).checked_$(md5)_$(size): $($(target)_$(srcname)_FETCH_DEPEND_) | $($(target)_$(srcname)_FETCH_DEPORD_) 679 @$$(ECHO) Checking $(out) ($(source))...680 $$( RM) -f $$@ $(out).md5679 $$(call MSG_L1,Checking $(out),($(source))...) 680 $$(QUIET)$$(RM) -f $$@ $(out).md5 681 681 @# creates the .md5 we pass to md5sum. 682 @$(if $(md5),$$(APPEND) $(out).md5 "$(md5) *$(out)")682 $$(QUIET2)$(if $(md5),$$(APPEND) $(out).md5 "$(md5) *$(out)") 683 683 @# (re)fetch the file if it doesn't exist or if it doesn't matches the md5. 684 ## @todo do fancy stuff like download continuation.685 ( test -f $(out) && $(if $(md5),$$(MD5SUM) -c $(out).md5, true) ) \686 687 && $$(MAKE) $(out) -f $(MAKEFILE))688 @$$(APPEND) $$@684 @## @todo do fancy stuff like download continuation. 685 $$(QUIET)( test -f $(out) && $(if $(md5),$$(MD5SUM) -c $(out).md5, true) ) \ 686 || ( $$(RM_EXT) -f $(out) \ 687 && $$(MAKE) $(out) -f $(MAKEFILE) --no-print-directory ) 688 $$(QUIET2)$$(APPEND) $$@ 689 689 690 690 _TARGET_$(target)_FETCHED += $(out) $(out).checked_$(md5)_$(size) … … 700 700 $(out) $($(target)_$(srcname)_UNPACK_OUTPUT_): $($(target)_$(srcname)_UNPACK_DEPEND_) \ 701 701 | $($(target)_$(srcname)_UNPACK_DEPORD_) $(archive).checked_$(md5)_$(size) 702 @$$(ECHO) Unpacking $(source) into $(inst)...703 $$( RM) -f $(out)702 $$(call MSG_L1,Unpacking $(archive),into $(inst)...) 703 $$(QUIET)$$(RM) -f $(out) 704 704 @# if the source archive doesn't exist fetch it (can have been deleted to save space). 705 test -f $(archive) \706 707 && $$(MAKE) $(archive).checked_$(md5)_$(size) -f $(MAKEFILE))705 $$(QUIET)test -f $(archive) \ 706 || ( $$(RM_EXT) -f $(archive).checked_$(md5)_$(size) \ 707 && $$(MAKE) $(archive).checked_$(md5)_$(size) -f $(MAKEFILE) --no-print-directory ) 708 708 $($(target)_$(srcname)_UNPACK_CMDS_) 709 @$$(APPEND) $(out) $(notdir $(archive).checked_$(md5)_$(size))710 @$$(APPEND) $(out) $(notdir $(out))709 $$(QUIET2)$$(APPEND) $(out) $(notdir $(archive).checked_$(md5)_$(size)) 710 $$(QUIET2)$$(APPEND) $(out) $(notdir $(out)) 711 711 712 712 $(eval _TARGET_$(target)_UNPACKED += $(out)) … … 896 896 897 897 $(out).lst: $(_TARGET_$(target)_UNPACKED) | $(call DIRDEP,$(inst)) 898 @$$(ECHO) kBuild: Successfully fetched $(target)899 $$( RM) -f $$@ $$@.tmp900 @$$(APPEND) $$@.tmp "$(notdir $(out))"901 $ (if $(_TARGET_$(target)_UNPACKED),$$(CAT_EXT) $(_TARGET_$(target)_UNPACKED) >> $$@.tmp)902 $$( MV) -f $$@.tmp $$@898 $$(call MSG_L1,Successfully fetched $(target)) 899 $$(QUIET)$$(RM) -f $$@ $$@.tmp 900 $$(QUIET2)$$(APPEND) $$@.tmp "$(notdir $(out))" 901 $$(QUIET)$(if $(_TARGET_$(target)_UNPACKED),$$(CAT_EXT) $(_TARGET_$(target)_UNPACKED) >> $$@.tmp) 902 $$(QUIET)$$(MV) -f $$@.tmp $$@ 903 903 904 904 $(out)_unfetched: 905 @$$(ECHO) kBuild: Unfetching $(target)...906 $$( RM) -f $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d'))907 $$( RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@) \905 $$(call MSG_L1,Unfetching $(target)...) 906 $$(QUIET)$$(RM) -f $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d')) 907 $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@) \ 908 908 $$(addprefix $(inst),$$(sort $$(dir $$(shell $$(CAT_EXT) $(out).lst 2> /dev/null)))) 909 $$( RM) -f $(out).lst $(out)910 $$( RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@)909 $$(QUIET)$$(RM) -f $(out).lst $(out) 910 $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@) 911 911 912 912 $(out): $(comp-vars _TARGET_$(target)_DIGEST_PREV,_TARGET_$(target)_DIGEST,FORCE) | $(call DIRDEP,$(inst)) 913 @$$(RM) -f $$@914 @$$(ECHO) kBuild: $$(if $$(wildcard $(out).lst),$$(if $$(_TARGET_$(target)_DIGEST),Re-fetching,Removing),Fetching) $(target)...915 @$$(if $$(wildcard $(out).lst),$$(MAKE) -f $(MAKEFILE)$(out)_unfetched)916 @$$(if $$(_TARGET_$(target)_DIGEST),$$(MAKE) -f $(MAKEFILE)$(out).lst)917 @$$(if $$(_TARGET_$(target)_DIGEST),$$(APPEND) $$@ "_TARGET_$(target)_DIGEST_PREV := $(_TARGET_$(target)_DIGEST)")913 $$(QUIET)$$(RM) -f $$@ 914 $$(call MSG_L1,$$(if $$(wildcard $(out).lst),$$(if $$(_TARGET_$(target)_DIGEST),Re-fetching,Removing),Fetching) $(target)...) 915 $$(QUIET)$$(if $$(wildcard $(out).lst ),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out)_unfetched) 916 $$(QUIET)$$(if $$(_TARGET_$(target)_DIGEST),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out).lst) 917 $$(QUIET2)$$(if $$(_TARGET_$(target)_DIGEST),$$(APPEND) $$@ "_TARGET_$(target)_DIGEST_PREV := $(_TARGET_$(target)_DIGEST)") 918 918 919 919 .NOTPARALLEL: $(out).lst $(out)_unfetched $(out) … … 1025 1025 | \ 1026 1026 $($(target)_$(source)_DEPORD_) 1027 $ (call MSG_L1,Creating$$@)1028 $ (RM) -f $(dep) $(obj) $($(target)_$(source)_OUTPUT_)1027 $$(call MSG_L1,Compiling $(source),=> $$@) 1028 $$(QUIET)$$(RM) -f $(dep) $(obj) $($(target)_$(source)_OUTPUT_) 1029 1029 $(custom_pre) 1030 1030 … … 1033 1033 $(custom_post) 1034 1034 ifndef NO_COMPILE_CMDS_DEPS 1035 @$(APPEND) "$(dep)"1036 @$(APPEND) "$(dep)" 'define $(target)_$(source)_CMDS_PREV_'1037 @$(APPEND) "$(dep)" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "$(dep)" ',$($(target)_$(source)_CMDS_))'1038 @$(APPEND) "$(dep)" 'endef'1035 $$(QUIET2)$$(APPEND) "$(dep)" 1036 $$(QUIET2)$$(APPEND) "$(dep)" 'define $(target)_$(source)_CMDS_PREV_' 1037 $$(QUIET2)$$(APPEND) "$(dep)" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "$(dep)" ',$($(target)_$(source)_CMDS_))' 1038 $$(QUIET2)$$(APPEND) "$(dep)" 'endef' 1039 1039 endif 1040 1040 … … 1073 1073 | \ 1074 1074 $($(target)_DEPORD_) 1075 $ (call MSG_L1,Creating $$@)1076 $ (RM) -f $(dep) $(out) $($(target)_OUTPUT_)1075 $$(call MSG_L1,Linking $$@) 1076 $$(QUIET)$$(RM) -f $(dep) $(out) $($(target)_OUTPUT_) 1077 1077 $(custom_pre) 1078 1078 … … 1081 1081 $(custom_post) 1082 1082 ifndef NO_LINK_CMDS_DEPS 1083 @$(APPEND) "$(dep)" 'define $(target)_CMDS_PREV_'1084 @$(APPEND) "$(dep)" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "$(dep)" ',$($(target)_CMDS_))'1085 @$(APPEND) "$(dep)" 'endef'1083 $$(QUIET2)$$(APPEND) "$(dep)" 'define $(target)_CMDS_PREV_' 1084 $$(QUIET2)$$(APPEND) "$(dep)" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "$(dep)" ',$($(target)_CMDS_))' 1085 $$(QUIET2)$$(APPEND) "$(dep)" 'endef' 1086 1086 endif 1087 1087 … … 1098 1098 define def_link_install_rule 1099 1099 $(INSTARGET_$(target)) : $(out) | $(call DIRDEP,$(dir $(INSTARGET_$(target)))) 1100 $(INSTALL) $$(if $(mode),-m $(mode)) $(out) $$@ 1100 $$(call MSG_L1,Installing $(target),=> $$@) 1101 $$(QUIET)$$(INSTALL) $$(if $(mode),-m $(mode)) $(out) $$@ 1101 1102 endef 1102 1103 … … 2019 2020 # the install rule 2020 2021 $(insdst) : $(srcsrc) | $(call DIRDEP,$(dir $(insdst))) 2021 $$(if $$(filter $(INSTALL),$(inscmd)),,$$(RM) -f $$@) 2022 $(inscmd) 2022 $$(call MSG_L1,Installing $(srcsrc),=> $(insdst)) 2023 $$(QUIET)$$(if $$(filter $(INSTALL),$(inscmd)),,$$(RM) -f $$@) 2024 $$(QUIET)$(inscmd) 2023 2025 endef 2024 2026 … … 2134 2136 # the install rule 2135 2137 $(insdst) : | $(call DIRDEP,$(dir $(insdst))) 2136 $$(RM) -f $$@ 2137 $$(LN_SYMLINK) $(symdst) $(insdst) 2138 $$(call MSG_L1,Installing symlink $(insdst),pointing to $(symdst)) 2139 $$(QUIET)$$(RM) -f $$@ 2140 $$(QUIET)$$(LN_SYMLINK) $(symdst) $(insdst) 2138 2141 endef 2139 2142 … … 2183 2186 # the install rule 2184 2187 $(insdst): 2185 $(INSTALL) -d \ 2188 $$(call MSG_L1,Installing directory $(insdst)) 2189 $$(QUIET)$$(INSTALL) -d \ 2186 2190 $(if $(uid),-o $(uid))\ 2187 2191 $(if $(gid),-g $(gid))\ … … 2296 2300 define def_mkdir_rule 2297 2301 $(directory): 2298 $ (call MSG_L1,Creating directory $$@)2299 $ (MKDIR) -p $$@2302 $$(call MSG_L2,Creating directory $$@) 2303 $$(QUIET)$$(MKDIR) -p $$@ 2300 2304 endef 2301 2305 … … 2328 2332 define def_pass_subdir 2329 2333 pass_$(pass)$(tag):: $(dep) 2330 + $ (QUIET)$$(MAKE) -C $(subdir) -f $$(notdir $$(firstword $$(wildcard $$(addprefix $(subdir)/,$$(DEFAULT_MAKEFILE))))) pass_$(pass)2334 + $$(QUIET)$$(MAKE) -C $(subdir) -f $$(notdir $$(firstword $$(wildcard $$(addprefix $(subdir)/,$$(DEFAULT_MAKEFILE))))) pass_$(pass) 2331 2335 endef 2332 2336 … … 2338 2342 define def_pass_makefile 2339 2343 pass_$(pass)$(tag):: $(dep) 2340 + $ (QUIET)$$(MAKE) -C $(patsubst %/,%,$(dir $(makefile))) -f $(notdir $(makefile)) pass_$(pass)2344 + $$(QUIET)$$(MAKE) -C $(patsubst %/,%,$(dir $(makefile))) -f $(notdir $(makefile)) pass_$(pass) 2341 2345 endef 2342 2346 … … 2364 2368 pass_$(pass)_doit: $(PASS_$(PASS)_trgs) $(foreach var,$(PASS_$(PASS)_vars),$(var)) 2365 2369 pass_$(pass)_this: pass_$(pass)_before 2366 + $ (QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass)_doit2370 + $$(QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass)_doit 2367 2371 pass_$(pass)_after:: pass_$(pass)_this 2368 2372 pass_$(pass): pass_$(pass)_after … … 2391 2395 pass_$(pass)_doit: $(PASS_$(PASS)_trgs) $(foreach var,$(PASS_$(PASS)_vars),$(var)) 2392 2396 pass_$(pass)_this: pass_$(pass)_before 2393 + $ (QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass)_doit2397 + $$(QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass)_doit 2394 2398 pass_$(pass)_after:: pass_$(pass)_this 2395 2399 pass_$(pass): pass_$(pass)_after … … 2421 2425 .PHONY: pass_$(pass)_order 2422 2426 pass_$(pass)_order: $(pass_prev) 2423 $ (call MSG_L1,Pass - $(if $(PASS_$(PASS)),$(PASS_$(PASS)),$(pass)))2424 + $ (QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass)2427 $$(call MSG_L1,Pass - $$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass))) 2428 + $$(QUIET)$$(MAKE) -f $$(MAKEFILE) pass_$(pass) 2425 2429 else 2426 2430 .NOTPARALLEL: pass_$(pass)_order pass_$(pass)_banner 2427 2431 .PHONY: pass_$(pass)_order pass_$(pass)_banner 2428 2432 pass_$(pass)_banner: 2429 $ (call MSG_L1,Pass - $(if $(PASS_$(PASS)),$(PASS_$(PASS)),$(pass)))2433 $$(call MSG_L1,Pass - $$(if $$(PASS_$(PASS)),$$(PASS_$(PASS)),$(pass))) 2430 2434 pass_$(pass)_order: \ 2431 2435 $(pass_prev) \
Note:
See TracChangeset
for help on using the changeset viewer.