-
-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make clean is not working with generated files #1650
Comments
I built the alpha16 source, and did this against the Premake project. It works fine. In the other issue you opened for this, I requested that you fill in the template as requested, this is one of those cases where you need to help us, help you. The template states:
|
I'm sorry for the poor explanation. I'm super new to this. This error occures
and this error and this seems to only happenes when I have only one cpp file in my project. |
@samsinsane Is asking for you to a) put together a simple Premake script which we can run to recreate the error that you're seeing, and b) share it with us as part of the issue. The link they shared provides some guidance what what a simple example should look like. (Hint: don't just dump a .zip of your entire project on us.) Like @samsinsane I can run |
Ok, here is a simple project that reproduces the error for me
Main.cpp
premake5.lua
then I run
The project files are generated and builds just fine, but after that if I run
it results in an error saying
|
Would you happen to have spaces in the path? |
No, but I think I know what might be the problem.
and upon cleaning the project, this line
expands to
this will not work as rmdir is used to remove a directory not a file Project.make
|
Sounds like #1404 would have introduced that one? |
@starkos should we switch it from "rmdir" to "del"? I think that should resolve the issue. |
Ah yep, this line introduced the error. And you're right, it should be |
What seems to be the problem?
I have a simple premake5 file that creates makefiles for a small project of mine. When I run premake5 gmake2 all makefiles are created successfully and I can call make to compile to an executable and run it.
The problem is when I try to call make clean, I get an error saying:
The directory name is invalid. and make: *** [clean] Error 267
What did you expect to happen?
Build directory should have been cleaned
What have you tried so far?
I've narrowed it down to one line in the makefile which should remove all the object files, but causes an error and stops any more files from being removed.
$(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED))
This is the line that is causing the error. Removing it fixes the problem but causes my bin/obj folder to remain.
How can we reproduce this?
Calling make clean gives this error.
What version of Premake are you using?
premake5 (Premake Build Script Generator) 5.0.0-alpha16.
Anything else we should know?
This issue is based on https://stackoverflow.com/questions/64414270/make-clean-is-not-working-when-using-premake5
though this problem occurs with me too.
The text was updated successfully, but these errors were encountered: