[GH-ISSUE #30] Export Makefile doesn't check if folder exists and doesn't report error #14

Open
opened 2026-05-05 03:34:05 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @mingodad on GitHub (Jan 6, 2021).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/30

While test Ultimatepp I tried to generate/export a Makefile for uppsrc/umk and found that it doesn't check if the output folder exists and or create it, also it fails because of that but doesn't report it (actually it says OK. (0:02.14)).

A partial fix that shows an error message is shown bellow, it would be better to check if the folder doesn't exists and create it.

@@ -397,11 +397,11 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting)
 		<< "clean:\n"
 		<< "\tif [ \"$(UPPOUT)\" != \"\" -a \"$(UPPOUT)\" != \"/\" -a -d \"$(UPPOUT)\" ] ; then rm -fr \"$(UPPOUT)\" ; fi\n"
 	;
 
 	bool sv = ::SaveFile(fn, makefile);
-	if(!exporting) {
+	if(exporting) {
 		if(sv)
 			PutConsole(Format("%s(1): makefile generation complete", fn));
 		else
 			PutConsole(Format("%s: error writing makefile", fn));
 	}
Originally created by @mingodad on GitHub (Jan 6, 2021). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/30 While test Ultimatepp I tried to generate/export a Makefile for uppsrc/umk and found that it doesn't check if the output folder exists and or create it, also it fails because of that but doesn't report it (actually it says `OK. (0:02.14)`). A partial fix that shows an error message is shown bellow, it would be better to check if the folder doesn't exists and create it. ``` @@ -397,11 +397,11 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting) << "clean:\n" << "\tif [ \"$(UPPOUT)\" != \"\" -a \"$(UPPOUT)\" != \"/\" -a -d \"$(UPPOUT)\" ] ; then rm -fr \"$(UPPOUT)\" ; fi\n" ; bool sv = ::SaveFile(fn, makefile); - if(!exporting) { + if(exporting) { if(sv) PutConsole(Format("%s(1): makefile generation complete", fn)); else PutConsole(Format("%s: error writing makefile", fn)); } ```
Author
Owner

@mingodad commented on GitHub (Jan 6, 2021):

Also on ubuntu 18.04 while debugging the ide inside the ide I coudn't use the mouse only keyboard was partially working.

<!-- gh-comment-id:755308476 --> @mingodad commented on GitHub (Jan 6, 2021): Also on ubuntu 18.04 while debugging the ide inside the ide I coudn't use the mouse only keyboard was partially working.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#14
No description provided.