为什么不在premake4中添加操作?
我正在尝试使用premake4添加一个名为dummy的操作 以下是我的premake4 lua脚本:为什么不在premake4中添加操作?,premake,Premake,我正在尝试使用premake4添加一个名为dummy的操作 以下是我的premake4 lua脚本: -- For reference, please refer to the premake wiki: -- https://github.com/premake/premake-core/wiki -- Demonstrates creating new actions: -- dummy --#!lua -- A solution contains projects, -- and d
-- For reference, please refer to the premake wiki:
-- https://github.com/premake/premake-core/wiki
-- Demonstrates creating new actions:
-- dummy
--#!lua
-- A solution contains projects,
-- and defines the available configurations
solution "hello-world"
configurations { "Debug", "Release" }
-- A project defines one build target
project "hello-world"
kind "ConsoleApp"
language "C++"
files { "**.h", "**.cpp" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
premake.dummy = {}
-- Register the "runmakefile" action.
newaction
{
trigger = "dummy",
description = "dummy",
execute = function()
print("** dummy")
end
}
我已经生成了makefile,但它不包含任何名为dummy的操作
我做错了什么?我真正应该做什么?newaction向Premake添加操作,而不是生成的项目文件。您可以通过在命令提示符下运行以下命令来执行操作:
premake4 dummy
Premake4不提供向生成的Makefiles添加自定义目标的方法。提供将任意规则添加到makefile