diff --git a/modules/codelite/codelite_project.lua b/modules/codelite/codelite_project.lua index 47a678fd..11bb787a 100755 --- a/modules/codelite/codelite_project.lua +++ b/modules/codelite/codelite_project.lua @@ -401,7 +401,7 @@ buildmessage = "\t@{ECHO} " .. p.quote(config.buildmessage) .. "\n" end 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) return true end diff --git a/modules/codelite/tests/test_codelite_additional_rules.lua b/modules/codelite/tests/test_codelite_additional_rules.lua index c4d738fa..4e185f18 100644 --- a/modules/codelite/tests/test_codelite_additional_rules.lua +++ b/modules/codelite/tests/test_codelite_additional_rules.lua @@ -112,10 +112,12 @@ test.obj test2.obj test.obj: test.rule @echo "Rule-ing test.rule" + @$(MakeDirCommand) $(@D) dorule -p "test.rule" test2.obj: test2.rule @echo "Rule-ing test2.rule" + @$(MakeDirCommand) $(@D) dorule -p -p2 "test2.rule" @@ -157,18 +159,22 @@ test2.obj: test2.rule test.obj test2.obj test3.obj test4.obj test.obj: test.rule @echo "Rule-ing test.rule" + @$(MakeDirCommand) $(@D) dorule testValue1 testValue2 "test.rule" test2.obj: test2.rule @echo "Rule-ing test2.rule" + @$(MakeDirCommand) $(@D) dorule -StestValue1 -StestValue2 "test2.rule" test3.obj: test3.rule @echo "Rule-ing test3.rule" + @$(MakeDirCommand) $(@D) dorule testValue1,testValue2 "test3.rule" test4.obj: test4.rule @echo "Rule-ing test4.rule" + @$(MakeDirCommand) $(@D) dorule -OtestValue1,testValue2 "test4.rule" @@ -198,10 +204,12 @@ test4.obj: test4.rule test.obj test2.obj test.obj: test.rule @echo "Rule-ing test.rule" + @$(MakeDirCommand) $(@D) dorule S0 "test.rule" test2.obj: test2.rule @echo "Rule-ing test2.rule" + @$(MakeDirCommand) $(@D) dorule S1 "test2.rule" @@ -222,6 +230,7 @@ test2.obj: test2.rule toto.c toto.c: toto.txt extra_dependency @echo "Some message" + @$(MakeDirCommand) $(@D) test test toto.c @@ -242,6 +251,7 @@ toto.c: toto.txt extra_dependency toto.c toto.c: toto.txt extra_dependency @echo "\"Some message\"" + @$(MakeDirCommand) $(@D) test test toto.c @@ -263,11 +273,13 @@ toto.c: toto.txt extra_dependency bar.c foo.c bar.c: bar.txt bar.h extra_dependency @echo "Some message" + @$(MakeDirCommand) $(@D) test test bar foo.c: foo.txt foo.h extra_dependency @echo "Some message" + @$(MakeDirCommand) $(@D) test test foo