What seems to be the problem?
When using custom rules, if a buildoutput happens to use the same file extension as the rule itself, premake gets into an infinite recursion loop and later dies with stack smashing(?).
What did you expect to happen?
I had expected premake not to compile already compiled files again. Though, something like that can be by design, i.e. you do .bmp>.png>.jpg, but not .png>.png>... (unless specified so)
What have you tried so far?
A dirty hack: create a file with a different extension and then copy it to the output directory.
How can we reproduce this?
rule "sampleRule"
fileextension ".txt"
-- buildmessage and buildcommands dont seem to matter
buildmessage 'Copying %{file.relpath}'
buildcommands 'cp %{file.relpath} new_%{file.relpath}'
buildoutputs '%{file.basename}.txt'
workspace "sample"
configurations { "Debug", "Release" }
project "sample"
kind "Utility"
rules { "sampleRule" }
files { "**.txt" }
Keep in mind that for order for this to work you need to first have #1939 installed.
My premake script uses a required script and overrides the gmake utility project generator, so the version is still relevant, nothing is touched except that.
What version of Premake are you using?
5.0.0-beta1
What seems to be the problem?
When using custom rules, if a buildoutput happens to use the same file extension as the rule itself, premake gets into an infinite recursion loop and later dies with stack smashing(?).
What did you expect to happen?
I had expected premake not to compile already compiled files again. Though, something like that can be by design, i.e. you do .bmp>.png>.jpg, but not .png>.png>... (unless specified so)
What have you tried so far?
A dirty hack: create a file with a different extension and then copy it to the output directory.
How can we reproduce this?
Keep in mind that for order for this to work you need to first have #1939 installed.
My premake script uses a required script and overrides the gmake utility project generator, so the version is still relevant, nothing is touched except that.
What version of Premake are you using?
5.0.0-beta1