From 0f4d669dbe335e1aa52f4a0f00fe6e214161778c Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Tue, 17 Aug 2021 08:39:15 -0400 Subject: [PATCH] Update environment so make functions --- Framework/PCProjectBuilder.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Framework/PCProjectBuilder.m b/Framework/PCProjectBuilder.m index e6db521..7ed9390 100644 --- a/Framework/PCProjectBuilder.m +++ b/Framework/PCProjectBuilder.m @@ -596,7 +596,19 @@ name:NSTaskDidTerminateNotification object:nil]; + NSMutableDictionary *env = [NSMutableDictionary dictionary]; + + /* + * This change is a kludge. It compensates for the fact that wmaker pollutes our environment + * with GNUSTEP_USER_ROOT. This causes any app which might use the make command to fail since + * in gnustep-make this variable is deprecated. This issue exists with version of WindowMaker + * 0.95.8 and prior. WindowMaker 0.95.9 fixes this by using WMAKER_USER_ROOT instead. + */ + [env addEntriesFromDictionary: [[NSProcessInfo processInfo] environment]]; + [env removeObjectForKey: @"GNUSTEP_USER_ROOT"]; + makeTask = [[NSTask alloc] init]; + [makeTask setEnvironment: env]; [makeTask setArguments:buildArgs]; [makeTask setCurrentDirectoryPath:[project projectPath]]; [makeTask setLaunchPath:buildTool];