Skip to content

Commit

Permalink
Merge branch 'release-alpha5' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
starkos committed Aug 18, 2015
2 parents deb7502 + 7323c8c commit 1b12aef
Show file tree
Hide file tree
Showing 34 changed files with 250 additions and 238 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Patch contributors:
Bastien Brunnenstein <bastien.brunnenstein@ubisoft.com>
* support wildcards in path tokens
Damien Courtois <https://github.com/dcourtois>
* module loading fixes
* bug fixes
Gabi Davar <gabi.davar@discretix.com>
* Added file.directory to token environment
Expand All @@ -32,6 +33,15 @@ Patch contributors:
* Bug fixes
Lusito <core@roughael.net>
* path.join() fixes
João Matos (joao@tritao.eu)
* HTTP download support
* C# / C++/CLI language support improvements and bugfixes
* Visual Studio and Make improvements and bugfixes
* Response files support for Make backend
leeonix <real-like@yeah.net>
* Bug fixes
Lusito <core@roughael.net>
* path.join() fixes
Mark Chandler <https://bitbucket.org/mchandler_blizzard>
* Prevent self-linking
Mihai Sebea <http://twitter.com/mihai_sebea>
Expand Down
18 changes: 8 additions & 10 deletions scripts/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ PREMAKE RELEASE CHECKLIST

PREP

* Make sure CHANGES.txt and CONTRIBUTORS.txt is up to date

* Create working branch for release prep

* Update version in src/host/premake.c and commit
* Update CHANGES.txt and CONTRIBUTORS.txt

* Make sure branch passes all tests on all platforms
* Update version in src/host/premake.c and commit

* Prep release announcement for forums
* Prep release announcement for forums from change log


RELEASE

* Merge working branch with release branch
* Run `premake5 package <release branch name> source` (from Posix ideally)

* Run `premake5 package release source` (from Posix ideally)
* On each platform, run `premake5 package <release branch name> binary`

* On each platform, run `premake5 package release binary`
* Merge working branch to release and tag

* Create new release on GitHub from CHANGES.txt; upload files

Expand All @@ -36,8 +34,8 @@ RELEASE

CYCLE

* Update version in src/host/premake.c and commit
* Update to new dev version in src/host/premake.c and commit

* Merge working branch to development branch
* Merge working branch to master

* Close working branch
4 changes: 2 additions & 2 deletions src/_premake_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@

function m.postBake()
local function shouldLoad(func)
for sln in p.global.eachSolution() do
for prj in p.solution.eachproject(sln) do
for wks in p.global.eachWorkspace() do
for prj in p.workspace.eachproject(wks) do
for cfg in p.project.eachconfig(prj) do
if func(cfg) then
return true
Expand Down
31 changes: 16 additions & 15 deletions src/actions/make/_make.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
--

premake.make = {}
local make = premake.make
local solution = premake.solution
local project = premake.project

local p = premake
local make = p.make
local project = p.project


---
Expand Down Expand Up @@ -54,14 +55,15 @@


--
-- Write out the default configuration rule for a solution or project.
-- Write out the default configuration rule for a workspace or project.
--
-- @param target
-- The solution or project object for which a makefile is being generated.
-- The workspace or project object for which a makefile is being generated.
--

function make.defaultconfig(target)
-- find the right configuration iterator function for this object
local eachconfig = iif(target.project, project.eachconfig, solution.eachconfig)
local eachconfig = iif(target.project, project.eachconfig, p.workspace.eachconfig)
local iter = eachconfig(target)

-- grab the first configuration and write the block
Expand Down Expand Up @@ -92,20 +94,20 @@


--
-- Get the makefile file name for a solution or a project. If this object is the
-- Get the makefile file name for a workspace or a project. If this object is the
-- only one writing to a location then I can use "Makefile". If more than one object
-- writes to the same location I use name + ".make" to keep it unique.
--

function make.getmakefilename(this, searchprjs)
local count = 0
for sln in premake.global.eachSolution() do
if sln.location == this.location then
for wks in p.global.eachWorkspace() do
if wks.location == this.location then
count = count + 1
end

if searchprjs then
for _, prj in ipairs(sln.projects) do
for _, prj in ipairs(wks.projects) do
if prj.location == this.location then
count = count + 1
end
Expand All @@ -125,17 +127,16 @@
-- Output a makefile header.
--
-- @param target
-- The solution or project object for which the makefile is being generated.
-- The workspace or project object for which the makefile is being generated.
--

function make.header(target)
-- find the right configuration iterator function for this object
local kind = iif(target.project, "project", "solution")
local kind = iif(target.project, "project", "workspace")

_p('# %s %s makefile autogenerated by Premake', premake.action.current().shortname, kind)
_p('')

if kind == "solution" then
if kind == "workspace" then
_p('.NOTPARALLEL:')
_p('')
end
Expand All @@ -151,7 +152,7 @@

--
-- Rules for file ops based on the shell type. Can't use defines and $@ because
-- it screws up the escaping of spaces and parethesis (anyone know a solution?)
-- it screws up the escaping of spaces and parethesis (anyone know a fix?)
--

function make.mkdirRules(dirname)
Expand Down
2 changes: 1 addition & 1 deletion src/actions/make/make_cpp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

local toolset = premake.tools[cfg.toolset or "gcc"]
if not toolset then
error("Invalid toolset '" + cfg.toolset + "'")
error("Invalid toolset '" .. cfg.toolset .. "'")
end

_x('ifeq ($(config),%s)', cfg.shortname)
Expand Down
80 changes: 40 additions & 40 deletions src/actions/make/make_solution.lua
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
--
-- make_solution.lua
-- Generate a solution-level makefile.
-- Copyright (c) 2002-2012 Jason Perkins and the Premake project
-- make_workspace.lua
-- Generate a workspace-level makefile.
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
--

local make = premake.make
local solution = premake.solution
local tree = premake.tree
local project = premake.project
local p = premake
local make = p.make
local tree = p.tree
local project = p.project


--
-- Generate a GNU make "solution" makefile, with support for the new platforms API.
-- Generate a GNU make "workspace" makefile, with support for the new platforms API.
--

function make.generate_solution(sln)
function make.generate_solution(wks)
premake.eol("\n")

make.header(sln)
make.header(wks)

make.configmap(sln)
make.projects(sln)
make.configmap(wks)
make.projects(wks)

make.solutionPhonyRule(sln)
make.groupRules(sln)
make.solutionPhonyRule(wks)
make.groupRules(wks)

make.projectrules(sln)
make.cleanrules(sln)
make.helprule(sln)
make.projectrules(wks)
make.cleanrules(wks)
make.helprule(wks)
end


--
-- Write out the solution's configuration map, which maps solution
-- Write out the workspace's configuration map, which maps workspace
-- level configurations to the project level equivalents.
--

function make.configmap(sln)
for cfg in solution.eachconfig(sln) do
function make.configmap(wks)
for cfg in p.workspace.eachconfig(wks) do
_p('ifeq ($(config),%s)', cfg.shortname)
for prj in solution.eachproject(sln) do
for prj in p.workspace.eachproject(wks) do
local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform)
if prjcfg then
_p(' %s_config = %s', make.tovar(prj.name), prjcfg.shortname)
Expand All @@ -55,11 +55,11 @@
-- Write out the rules for the `make clean` action.
--

function make.cleanrules(sln)
function make.cleanrules(wks)
_p('clean:')
for prj in solution.eachproject(sln) do
for prj in p.workspace.eachproject(wks) do
local prjpath = premake.filename(prj, make.getmakefilename(prj, true))
local prjdir = path.getdirectory(path.getrelative(sln.location, prjpath))
local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath))
local prjname = path.getname(prjpath)
_x(1,'@${MAKE} --no-print-directory -C %s -f %s clean', prjdir, prjname)
end
Expand All @@ -71,13 +71,13 @@
-- Write out the make file help rule and configurations list.
--

function make.helprule(sln)
function make.helprule(wks)
_p('help:')
_p(1,'@echo "Usage: make [config=name] [target]"')
_p(1,'@echo ""')
_p(1,'@echo "CONFIGURATIONS:"')

for cfg in solution.eachconfig(sln) do
for cfg in p.workspace.eachconfig(wks) do
_x(1, '@echo " %s"', cfg.shortname)
end

Expand All @@ -87,7 +87,7 @@
_p(1,'@echo " all (default)"')
_p(1,'@echo " clean"')

for prj in solution.eachproject(sln) do
for prj in p.workspace.eachproject(wks) do
_p(1,'@echo " %s"', prj.name)
end

Expand All @@ -97,21 +97,21 @@


--
-- Write out the list of projects that comprise the solution.
-- Write out the list of projects that comprise the workspace.
--

function make.projects(sln)
_p('PROJECTS := %s', table.concat(premake.esc(table.extract(sln.projects, "name")), " "))
function make.projects(wks)
_p('PROJECTS := %s', table.concat(premake.esc(table.extract(wks.projects, "name")), " "))
_p('')
end

--
-- Write out the solution PHONY rule
-- Write out the workspace PHONY rule
--

function make.solutionPhonyRule(sln)
function make.solutionPhonyRule(wks)
local groups = {}
local tr = solution.grouptree(sln)
local tr = p.workspace.grouptree(wks)
tree.traverse(tr, {
onbranch = function(n)
table.insert(groups, n.path)
Expand All @@ -127,9 +127,9 @@
--
-- Write out the phony rules representing project groups
--
function make.groupRules(sln)
-- Transform solution groups into target aggregate
local tr = solution.grouptree(sln)
function make.groupRules(wks)
-- Transform workspace groups into target aggregate
local tr = p.workspace.grouptree(wks)
tree.traverse(tr, {
onbranch = function(n)
local rule = n.path .. ":"
Expand Down Expand Up @@ -160,11 +160,11 @@
end

--
-- Write out the rules to build each of the solution's projects.
-- Write out the rules to build each of the workspace's projects.
--

function make.projectrules(sln)
for prj in solution.eachproject(sln) do
function make.projectrules(wks)
for prj in p.workspace.eachproject(wks) do
local deps = project.getdependencies(prj)
deps = table.extract(deps, "name")
_p('%s:%s', premake.esc(prj.name), make.list(deps))
Expand All @@ -175,7 +175,7 @@
_p(1,'@echo "==== Building %s ($(%s_config)) ===="', prj.name, cfgvar)

local prjpath = premake.filename(prj, make.getmakefilename(prj, true))
local prjdir = path.getdirectory(path.getrelative(sln.location, prjpath))
local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath))
local prjname = path.getname(prjpath)

_x(1,'@${MAKE} --no-print-directory -C %s -f %s config=$(%s_config)', prjdir, prjname, cfgvar)
Expand Down
5 changes: 2 additions & 3 deletions src/actions/vstudio/_vstudio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
local vstudio = premake.vstudio

local p = premake
local solution = p.solution
local project = p.project
local config = p.config

Expand Down Expand Up @@ -515,7 +514,7 @@
local hasnative = false
local hasnet = false
local slnarch
for prj in solution.eachproject(cfg.solution) do
for prj in p.workspace.eachproject(cfg.workspace) do
if project.isnative(prj) then
hasnative = true
elseif project.isdotnet(prj) then
Expand Down Expand Up @@ -569,7 +568,7 @@
-- if the platform identifier matches a known system or architecture,
--

for prj in solution.eachproject(cfg.solution) do
for prj in p.workspace.eachproject(cfg.workspace) do
if project.isnative(prj) then
hasnative = true
elseif project.isdotnet(prj) then
Expand Down
6 changes: 3 additions & 3 deletions src/actions/vstudio/vs2005.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
-- Register a command-line action for Visual Studio 2006.
---

function vs2005.generateSolution(sln)
function vs2005.generateSolution(wks)
p.indent("\t")
p.eol("\r\n")
p.escaper(vs2005.esc)

premake.generate(sln, ".sln", vstudio.sln2005.generate)
premake.generate(wks, ".sln", vstudio.sln2005.generate)
end


Expand Down Expand Up @@ -94,7 +94,7 @@
dotnet = { "msnet" },
},

-- Solution and project generation logic
-- Workspace and project generation logic

onWorkspace = vstudio.vs2005.generateSolution,
onProject = vstudio.vs2005.generateProject,
Expand Down
Loading

0 comments on commit 1b12aef

Please sign in to comment.