premake / premake/premake-core

Build commands in makefile utilities do not seem to run

Open
#2,134 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

What seems to be the problem?

workspace "Foo"
	configurations { "Debug" }
	project "Bar"
		kind "Utility"
		postbuildcommands { "echo Hello" }
$ premake5 gmake2
Building configurations...
Running action 'gmake2'...
Done (35ms).

$ make
==== Building Bar (debug) ====

What did you expect to happen?
I expected "Hello" to be printed to the console

What have you tried so far?

$ make
$ make Bar
$ make Bar.make
$ make Bar.make all

Seems to also be an issue with prebuildcommands too. Works as expected with vs2022.

How can we reproduce this?
See above.

  • Visual Studio 2022 (vs2022)
  • Visual Studio 2019 (vs2019)
  • Visual Studio 2017 (vs2017)
  • Visual Studio 2015 (vs2015)
  • Visual Studio 2012 (vs2012)
  • Visual Studio 2010 (vs2010)
  • Visual Studio 2008 (vs2008)
  • Visual Studio 2005 (vs2005)
  • GNU Makefile (gmake)
  • GNU Makefile 2 (gmake2)
  • XCode (xcode)
  • Codelite
  • Other (Please list below)

What version of Premake are you using?
Note that although this says I am using a -dev version, I grabbed it directly from premake-5.0.0-beta2-linux.tar.gz

$ ./premake5 --version
premake5 (Premake Build Script Generator) 5.0.0-dev

Anything else we should know?

$ make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example with the gmake2 action and a Utility project using both prebuildcommands and postbuildcommands. Start by tracing how gmake2 handles those commands for Utility projects, then verify that make executes them and that the behavior remains correct for the reported example.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua, shell
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.