Fixed a (stupid) typo in makefile include dirs list (h/t gogoprog)

This commit is contained in:
Jason Perkins 2012-09-13 16:36:53 -04:00
parent b108893bcb
commit 37cfaf0666
3 changed files with 47 additions and 1 deletions

View File

@ -245,7 +245,10 @@
function cpp.flags(cfg, toolset)
_p(' DEFINES += %s', table.concat(toolset.getdefines(cfg.defines), " "))
_p(' INCLUDES += %s', table.concat(make.esc(toolset.getincludedirs(cfg, cfg.includedirs), " ")))
local includes = make.esc(toolset.getincludedirs(cfg, cfg.includedirs))
_p(' INCLUDES += %s', table.concat(includes, " "))
_p(' CPPFLAGS += %s $(DEFINES) $(INCLUDES)', table.concat(toolset.getcppflags(cfg), " "))
_p(' CFLAGS += $(CPPFLAGS) $(ARCH) %s', table.concat(table.join(toolset.getcflags(cfg), cfg.buildoptions), " "))
_p(' CXXFLAGS += $(CFLAGS) %s', table.concat(toolset.getcxxflags(cfg), " "))

View File

@ -0,0 +1,42 @@
--
-- tests/actions/make/cpp/test_flags.lua
-- Tests compiler and linker flags for Makefiles.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.make_flags = {}
local suite = T.make_flags
local make = premake.make
local cpp = premake.make.cpp
local project = premake5.project
--
-- Setup
--
local sln, prj, cfg
function suite.setup()
sln = test.createsolution()
end
local function prepare()
prj = premake.solution.getproject_ng(sln, 1)
cfg = project.getconfig(prj, "Debug")
cpp.flags(cfg, premake.tools.gcc)
end
--
-- Include directories should be relative and space separated.
--
function suite.includeDirs()
includedirs { "src/include", "../include" }
prepare()
test.capture [[
DEFINES +=
INCLUDES += -Isrc/include -I../include
]]
end

View File

@ -168,6 +168,7 @@
-- Makefile C/C++ projects
dofile("actions/make/cpp/test_file_rules.lua")
dofile("actions/make/cpp/test_flags.lua")
dofile("actions/make/cpp/test_make_pch.lua")
dofile("actions/make/cpp/test_make_linking.lua")
dofile("actions/make/cpp/test_objects.lua")