Changeset 3608


Ignore:
Timestamp:
Sep 9, 2024, 4:53:00 PM (2 months ago)
Author:
bird
Message:

footer-pass2-fetches.kmk,header.kmk: Added a NAME property to the fetch targets to facilitate cleanup (nsis mess); fixed cleanup (unfetch) issues when files or directories contains spaces.

Location:
trunk/kBuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer-pass2-fetches.kmk

    r3121 r3608  
    3636#
    3737# The targets listed in the the FETCHES target list have the following attributes:
     38#       NAME
    3839#       SOURCES
    3940#       INST
     
    270271# The unpacking / installing.
    271272#
    272 local out := $(inst)_kBuild_$(target)_$(srcname)_unpacked.lst
     273local out := $(inst)_kBuild_$(name)_$(srcname)_unpacked.lst
    273274local dirdep := $(call DIRDEP,$(inst))
    274275local tool := $(firstword \
     
    351352$(out)_unfetched:
    352353        %$$(call MSG_UNFETCH,$(target))
    353         $$(QUIET)$$(RM) -f -- $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d'))
     354        $$(QUIET)$$(RM) -f -- $$(qaddprefix sh,$(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d' -e 's/ /\\ /g'))
    354355        $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $$(dir $$@) \
    355                 $$(addprefix $(inst),$$(sort $$(dir $$(shell $$(CAT_EXT) $(out).lst 2> /dev/null))))
     356                $$(qaddprefix sh,$(inst),$$(qsortfiles ,$$(qdir ,$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d' -e 's/ /\\ /g'))))
    356357        $$(QUIET)$$(RM) -f -- $(out).lst $(out)
    357358        $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $$(dir $$@)
     
    380381define def_fetch
    381382# common
     383local name := $(firstword $($(target)_NAME) $(target))
    382384## @todo Install-revamp: FIXME
    383385INSTARGET_$(target) := $($(target)_INST)
     
    392394
    393395# The 'sources'.
    394 #$ (warning dbg fetch: target=$(target) sources=$($(target)_SOURCES) $($(target)_SOURCES.$(KBUILD_TYPE)) $($(target)_SOURCES.$(KBUILD_TARGET)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(KBUILD_TARGET).$(bld_trg_arch)))
     396#$ (warning dbg fetch: target=$(target) name=$(name) sources=$($(target)_SOURCES) $($(target)_SOURCES.$(KBUILD_TYPE)) $($(target)_SOURCES.$(KBUILD_TARGET)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(KBUILD_TARGET).$(bld_trg_arch)))
    395397$(foreach source,$($(target)_SOURCES) $($(target)_SOURCES.$(KBUILD_TYPE)) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)),\
    396398        $(evalval def_fetch_src))
     
    398400# The target.
    399401local inst := $(INSTARGET_$(target))
    400 local out := $(inst)_kBuild_fetch_$(target)
     402local out := $(inst)_kBuild_fetch_$(name)
    401403
    402404$(eval includedep $(out))
  • trunk/kBuild/header.kmk

    r3607 r3608  
    12461246## @{
    12471247PROPS_FETCHES_SINGLE         := TOOL TEMPLATE FETCHTOOL UNPACKTOOL PATCHTOOL INST FETCHDIR
    1248 PROPS_FETCHES_DEFERRED       :=
     1248PROPS_FETCHES_DEFERRED       := NAME
    12491249PROPS_FETCHES_ACCUMULATE_R   := FETCHFLAGS UNPACKFLAGS PATCHFLAGS
    12501250PROPS_FETCHES_ACCUMULATE_L   := SOURCES CLEAN
Note: See TracChangeset for help on using the changeset viewer.