premake/premake-core

Add copy token that creates non-existing parent directories

开放

#820 创建于 2017年6月17日

 (0 条评论) (0 个反应) (0 位负责人)C (651 个派生)auto 404
enhancementhelp wanted

仓库指标

星标
 (3,621 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Previously, premake allowed to do something like this on Windows:

postbuildcommands {
  "{COPY} %{wks.location}premake5.lua %{wks.location}this/does/not/exist/"
}

...and it created the parent folders like mkdir -p does on Linux.

We relied on that "feature", but since premake automatically omits trailing slashes now, it results in an error. This is probably intended and always behaved like that on Linux, but I think it's actually a pretty handy feature and might make sense to be officially re-introduced on all platforms.

If adding it to {{COPY}} breaks something, I suggest introducing {{COPYP}} or similar instead.

贡献者指南