Ignore:
Timestamp:
May 1, 2008, 11:55:11 PM (17 years ago)
Author:
bird
Message:

Explicitly terminate the argument list for RM, RMDIR, MKDIR and INSTALL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r1547 r1599  
    2525#
    2626# As a special exception you are granted permission to include this file, via
    27 # the kmk include directive, as you wish without this in itself causing the 
    28 # resulting makefile, program or whatever to be covered by the GPL license. 
     27# the kmk include directive, as you wish without this in itself causing the
     28# resulting makefile, program or whatever to be covered by the GPL license.
    2929# This exception does not however invalidate any other reasons why the makefile,
    3030# program, whatever should not be covered the GPL.
     
    14901490        %$$(call MSG_FETCH_DL,$(target),$(source),$(out))
    14911491        @## @todo do fancy stuff like download continuation.
    1492         $$(QUIET)$$(RM) -f $(out)
     1492        $$(QUIET)$$(RM) -f -- $(out)
    14931493        $($(target)_$(srcname)_FETCH_CMDS_)
    14941494        $$(QUIET)$(if $(md5),$$(MD5SUM_EXT) -b -C $(md5) $(out))
     
    14991499$(out).checked_$(md5)_$(size): $($(target)_$(srcname)_FETCH_DEPEND_) | $($(target)_$(srcname)_FETCH_DEPORD_)
    15001500        %$$(call MSG_FETCH_CHK,$(target),$(source),$(out))
    1501         $$(QUIET)$$(RM) -f $$@
     1501        $$(QUIET)$$(RM) -f -- $$@
    15021502        @# (re)fetch the file if it doesn't exist or if it doesn't matches the md5.
    15031503        @## @todo do fancy stuff like download continuation.
     
    15211521                | $($(target)_$(srcname)_UNPACK_DEPORD_) $(archive).checked_$(md5)_$(size)
    15221522        %$$(call MSG_FETCH_UP,$(target),$(archive),$(inst))
    1523         $$(QUIET)$$(RM) -f $(out)
     1523        $$(QUIET)$$(RM) -f -- $(out)
    15241524        @# if the source archive doesn't exist fetch it (can have been deleted to save space).
    15251525        $$(QUIET)test -f $(archive) \
     
    17251725$(out).lst: $(_TARGET_$(target)_UNPACKED) | $(call DIRDEP,$(inst))
    17261726        %$$(call MSG_FETCH_OK,$(target))
    1727         $$(QUIET)$$(RM) -f $$@ $$@.tmp
     1727        $$(QUIET)$$(RM) -f -- $$@ $$@.tmp
    17281728        $$(QUIET2)$$(APPEND) $$@.tmp '$(notdir $(out))'
    17291729        $$(QUIET)$(if $(_TARGET_$(target)_UNPACKED),$$(CAT_EXT) $(_TARGET_$(target)_UNPACKED) >> $$@.tmp)
    1730         $$(QUIET)$$(MV) -f $$@.tmp $$@
     1730        $$(QUIET)$$(MV) -f -- $$@.tmp $$@
    17311731
    17321732$(out)_unfetched:
    17331733        %$$(call MSG_UNFETCH,$(target))
    1734         $$(QUIET)$$(RM) -f $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d'))
    1735         $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@) \
     1734        $$(QUIET)$$(RM) -f -- $$(addprefix $(inst),$$(shell $$(CAT_EXT) $(out).lst 2> /dev/null | $$(SED) -e '/\/$$$$/d'))
     1735        $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $$(dir $$@) \
    17361736                $$(addprefix $(inst),$$(sort $$(dir $$(shell $$(CAT_EXT) $(out).lst 2> /dev/null))))
    1737         $$(QUIET)$$(RM) -f $(out).lst $(out)
    1738         $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@)
     1737        $$(QUIET)$$(RM) -f -- $(out).lst $(out)
     1738        $$(QUIET)$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $$(dir $$@)
    17391739
    17401740$(out): $(comp-vars _TARGET_$(target)_DIGEST_PREV,_TARGET_$(target)_DIGEST,FORCE) | $(call DIRDEP,$(inst))
    1741         $$(QUIET)$$(RM) -f $$@
     1741        $$(QUIET)$$(RM) -f -- $$@
    17421742        %$$(if $$(_TARGET_$(target)_DIGEST),$$(if $$(wildcard $(out).lst)\
    17431743                ,$$(call MSG_REFETCH,$(target)),$$(call MSG_FETCH,$(target))),$$(call MSG_UNFETCH,$(target)))
    17441744        $$(QUIET)$$(if $$(wildcard $(out).lst      ),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out)_unfetched)
    1745         $$(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 $$@))
     1745        $$(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 $$@))
    17461746        $$(QUIET2)$$(if $$(_TARGET_$(target)_DIGEST),$$(APPEND) $$@ "_TARGET_$(target)_DIGEST_PREV := $(_TARGET_$(target)_DIGEST)")
    17471747
     
    18681868        %$$(call MSG_COMPILE,$(target),$(source),$$@,$(type))
    18691869ifdef TOOL_$(tool)_COMPILE_$(type)_DONT_PURGE_OUTPUT
    1870         $$(QUIET)$$(RM) -f $(dep) $(obj) $($(target)_$(source)_OUTPUT_) $($(target)_OUTPUT_MAYBE_)
     1870        $$(QUIET)$$(RM) -f -- $(dep) $(obj) $($(target)_$(source)_OUTPUT_) $($(target)_OUTPUT_MAYBE_)
    18711871endif
    18721872endif
     
    19141914                $($(target)_DEPORD_)
    19151915        %$$(call MSG_LINK,$(target),$$@,$(tool_do))
    1916         $$(QUIET)$$(RM) -f $(dep) $(out) $($(target)_OUTPUT_) $($(target)_OUTPUT_MAYBE_)
     1916        $$(QUIET)$$(RM) -f -- $(dep) $(out) $($(target)_OUTPUT_) $($(target)_OUTPUT_MAYBE_)
    19171917
    19181918$(cmds)
     
    19371937$(INSTARGET_$(target)) : $(out) | $(call DIRDEP,$(dir $(INSTARGET_$(target))))
    19381938        %$$(call MSG_INST_TRG,$(target),$(out),$$@)
    1939         $$(QUIET)$$(INSTALL) $$(if $(mode),-m $(mode)) $(out) $$@
     1939        $$(QUIET)$$(INSTALL) $$(if $(mode),-m $(mode)) -- $(out) $$@
    19401940
    19411941ifdef KBUILD_DO_AUTO_INSTALL
     
    28512851                $(if $(gid),-g $(gid))\
    28522852                $(if $(mode),-m $(mode))\
    2853                 $(flags)\
     2853                $(flags) -- \
    28542854                $(srcsrc) $(insdst)
    28552855endif
     
    28672867$(insdst) : | $(call DIRDEP,$(dir $(insdst)))
    28682868        %$$(call MSG_INST_SYM,$(insdst),$(symdst))
    2869         $$(QUIET)$$(RM) -f $$@
     2869        $$(QUIET)$$(RM) -f -- $$@
    28702870        $$(QUIET)$$(LN_SYMLINK) $(symdst) $(insdst)
    28712871endef
     
    29172917                $(if $(gid),-g $(gid))\
    29182918                $(if $(mode),-m $(mode))\
    2919                 $(flags)\
     2919                $(flags) -- \
    29202920                $(insdst)
    29212921
     
    30543054$(directory):
    30553055        %$$(call MSG_MKDIR,$$@)
    3056         $$(QUIET)$$(MKDIR) -p $$@
     3056        $$(QUIET)$$(MKDIR) -p -- $$@
    30573057endef
    30583058
     
    30833083do-clean:
    30843084        %$(call MSG_CLEAN)
    3085         $(QUIET)$(RM) -f $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN)
    3086         $(QUIET)$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $(rsort $(dir $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN)))
     3085        $(QUIET)$(RM) -f -- $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN)
     3086        $(QUIET)$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $(rsort $(dir $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN)))
    30873087
    30883088
     
    32323232# @todo make this a non-default pass!
    32333233uninstall:
    3234         $(RM) -f $(_INSTALLS_FILES)
     3234        $(RM) -f -- $(_INSTALLS_FILES)
    32353235
    32363236install: pass_installs
Note: See TracChangeset for help on using the changeset viewer.