File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,12 @@ void RelativeMakefilePrinter::declareShellVariable(const std::string& variableNa
64
64
65
65
std::string RelativeMakefilePrinter::getProjectStructureRelativeTo (fs::path path) const {
66
66
DefaultMakefilePrinter printer;
67
- printer.declareVariable (" export PROJECT_DIR_RELATIVE_TO_MAKEFILE" ,
68
- fs::relative (projectPath, path));
67
+ printer.declareVariable (" export PROJECT_DIR_RELATIVE_TO_MAKEFILE" , fs::relative (projectPath, path));
69
68
// magic spell from https://stackoverflow.com/questions/18136918/how-to-get-current-relative-directory-of-your-makefile
70
69
printer.declareVariable (" export MAKEFILE_DIR" , " $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))" );
71
- printer.declareVariable (" export PROJECT_DIR" ,
72
- StringUtils::stringFormat (" %s/%s" , " $(MAKEFILE_DIR)" , " $(PROJECT_DIR_RELATIVE_TO_MAKEFILE)" ));
70
+ printer.declareVariable (" export PROJECT_DIR" , " $(MAKEFILE_DIR)/$(PROJECT_DIR_RELATIVE_TO_MAKEFILE)" );
73
71
printer.declareVariable (" export BUILD_RELATIVE" , buildDirectoryRelative);
74
- printer.declareVariable (" export BUILD_DIR" , StringUtils::stringFormat (" %s/%s" ,
75
- getRelativePath (projectPath),
76
- getRelativePath (buildDirectoryRelative)));
72
+ printer.declareVariable (" export BUILD_DIR" , " $(PROJECT_DIR)/$(BUILD_RELATIVE)" );
77
73
return printer.ss .str ();
78
74
}
79
75
You can’t perform that action at this time.
0 commit comments