        
    }
    _ = fm.changeCurrentDirectoryPath(prevWorkingDir)
-
+   
+   //finally, we alter libagentcore's headers to become relative.
+   let targetWorkingDir = srcDirPath + FILE_SEPARATOR + AGENT_CORE_DIR
+   _ = fm.changeCurrentDirectoryPath(targetWorkingDir)
+   print("Attempting to enumerate " + targetWorkingDir)
+   fileEnum = fm.enumerator(atPath: targetWorkingDir)
+   while let fn = fileEnum?.nextObject() {
+      print(fn)
+      let fileName = String(fn)
+      //ignore the include directory and anything that isn't a header or source file
+      if fileName.hasPrefix(IBMRAS_DIR) && (fileName.hasSuffix(".cpp") || fileName.hasSuffix(".h") {
+         var fileContents = try String(contentsOfFile: fileName, encoding: encoding)
+         fileContents = fileContents.replacingOccurrences(of: "#include \"(" + IBMRAS_DIR + ".*?)\"", 
+                                                          with:"#include \"\(relativePath(fileName, $1))\"",
+                                                          options: .regularExpressionSearch)
+         try fileContents.write(toFile: fileName, atomically: true, encoding: encoding)
+      }
+   }
+   
 }
 
 #if os(Linux)

         print("Attempting to move " + file + " to " + targetDir + FILE_SEPARATOR + file)
         _ = try fm.moveItem(atPath:file, toPath: targetDir + FILE_SEPARATOR + file)
      }
   }

   let rootDirPath = fm.currentDirectoryPath

   ///Public header file names
   let AGENT_EXTENSIONS = "AgentExtensions.h"

   ///moveSource function - moves the original source from it's ibmras structure into its new swift module
   func moveSource(rootDir: String, pluginSrcDir: String, pluginTargetDir: String) throws {

      ///move plugin source to plugin directories - need to call this from rootDir
