Fix custom build when new files are in new/missing directory
This commit is contained in:
parent
db19fa5acc
commit
660e4e2589
@ -401,7 +401,7 @@
|
|||||||
buildmessage = "\t@{ECHO} " .. p.quote(config.buildmessage) .. "\n"
|
buildmessage = "\t@{ECHO} " .. p.quote(config.buildmessage) .. "\n"
|
||||||
end
|
end
|
||||||
local commands = table.implode(config.buildcommands,"\t","\n","")
|
local commands = table.implode(config.buildcommands,"\t","\n","")
|
||||||
table.insert(makefilerules, os.translateCommandsAndPaths(outputs .. ": " .. filename .. inputs .. "\n" .. buildmessage .. commands, cfg.project.basedir, cfg.project.location))
|
table.insert(makefilerules, os.translateCommandsAndPaths(outputs .. ": " .. filename .. inputs .. "\n" .. buildmessage .. "\t@$(MakeDirCommand) $(@D)\n" .. commands, cfg.project.basedir, cfg.project.location))
|
||||||
table.insertflat(dependencies, outputs)
|
table.insertflat(dependencies, outputs)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -112,10 +112,12 @@
|
|||||||
<CustomPreBuild>test.obj test2.obj
|
<CustomPreBuild>test.obj test2.obj
|
||||||
test.obj: test.rule
|
test.obj: test.rule
|
||||||
@echo "Rule-ing test.rule"
|
@echo "Rule-ing test.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule -p "test.rule"
|
dorule -p "test.rule"
|
||||||
|
|
||||||
test2.obj: test2.rule
|
test2.obj: test2.rule
|
||||||
@echo "Rule-ing test2.rule"
|
@echo "Rule-ing test2.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule -p -p2 "test2.rule"
|
dorule -p -p2 "test2.rule"
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
</AdditionalRules>
|
</AdditionalRules>
|
||||||
@ -157,18 +159,22 @@ test2.obj: test2.rule
|
|||||||
<CustomPreBuild>test.obj test2.obj test3.obj test4.obj
|
<CustomPreBuild>test.obj test2.obj test3.obj test4.obj
|
||||||
test.obj: test.rule
|
test.obj: test.rule
|
||||||
@echo "Rule-ing test.rule"
|
@echo "Rule-ing test.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule testValue1 testValue2 "test.rule"
|
dorule testValue1 testValue2 "test.rule"
|
||||||
|
|
||||||
test2.obj: test2.rule
|
test2.obj: test2.rule
|
||||||
@echo "Rule-ing test2.rule"
|
@echo "Rule-ing test2.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule -StestValue1 -StestValue2 "test2.rule"
|
dorule -StestValue1 -StestValue2 "test2.rule"
|
||||||
|
|
||||||
test3.obj: test3.rule
|
test3.obj: test3.rule
|
||||||
@echo "Rule-ing test3.rule"
|
@echo "Rule-ing test3.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule testValue1,testValue2 "test3.rule"
|
dorule testValue1,testValue2 "test3.rule"
|
||||||
|
|
||||||
test4.obj: test4.rule
|
test4.obj: test4.rule
|
||||||
@echo "Rule-ing test4.rule"
|
@echo "Rule-ing test4.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule -OtestValue1,testValue2 "test4.rule"
|
dorule -OtestValue1,testValue2 "test4.rule"
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
</AdditionalRules>
|
</AdditionalRules>
|
||||||
@ -198,10 +204,12 @@ test4.obj: test4.rule
|
|||||||
<CustomPreBuild>test.obj test2.obj
|
<CustomPreBuild>test.obj test2.obj
|
||||||
test.obj: test.rule
|
test.obj: test.rule
|
||||||
@echo "Rule-ing test.rule"
|
@echo "Rule-ing test.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule S0 "test.rule"
|
dorule S0 "test.rule"
|
||||||
|
|
||||||
test2.obj: test2.rule
|
test2.obj: test2.rule
|
||||||
@echo "Rule-ing test2.rule"
|
@echo "Rule-ing test2.rule"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
dorule S1 "test2.rule"
|
dorule S1 "test2.rule"
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
</AdditionalRules>
|
</AdditionalRules>
|
||||||
@ -222,6 +230,7 @@ test2.obj: test2.rule
|
|||||||
<CustomPreBuild>toto.c
|
<CustomPreBuild>toto.c
|
||||||
toto.c: toto.txt extra_dependency
|
toto.c: toto.txt extra_dependency
|
||||||
@echo "Some message"
|
@echo "Some message"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
test
|
test
|
||||||
test toto.c
|
test toto.c
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
@ -242,6 +251,7 @@ toto.c: toto.txt extra_dependency
|
|||||||
<CustomPreBuild>toto.c
|
<CustomPreBuild>toto.c
|
||||||
toto.c: toto.txt extra_dependency
|
toto.c: toto.txt extra_dependency
|
||||||
@echo "\"Some message\""
|
@echo "\"Some message\""
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
test
|
test
|
||||||
test toto.c
|
test toto.c
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
@ -263,11 +273,13 @@ toto.c: toto.txt extra_dependency
|
|||||||
<CustomPreBuild>bar.c foo.c
|
<CustomPreBuild>bar.c foo.c
|
||||||
bar.c: bar.txt bar.h extra_dependency
|
bar.c: bar.txt bar.h extra_dependency
|
||||||
@echo "Some message"
|
@echo "Some message"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
test
|
test
|
||||||
test bar
|
test bar
|
||||||
|
|
||||||
foo.c: foo.txt foo.h extra_dependency
|
foo.c: foo.txt foo.h extra_dependency
|
||||||
@echo "Some message"
|
@echo "Some message"
|
||||||
|
@$(MakeDirCommand) $(@D)
|
||||||
test
|
test
|
||||||
test foo
|
test foo
|
||||||
</CustomPreBuild>
|
</CustomPreBuild>
|
||||||
|
Loading…
Reference in New Issue
Block a user