+ elseif(preg_match('/^((?:Opt)?)File\s+"([^"]+)"(?:\s+"([^"]+)")?$/', $line, $matches))
+ {
+ $isOptional = $matches[1];
+ $dstfile = $matches[2];
+ $path = isset($matches[3]) ? $matches[3] : "";
+
+ if( $path == "" ) {
+ $path = $dstfile;
+ $dstfile = basename($dstfile);
+ }
+
+ // Parse path components
+ $path = str_replace("__EXT__", "$ACESSDIR/Externals/Output/$ARCH", $path);
+ $path = str_replace("__BIN__", "$ACESSDIR/Usermode/Output/$ARCH", $path);
+ $path = str_replace("__FS__", "$ACESSDIR/Usermode/Filesystem", $path);
+ $path = str_replace("__SRC__", "$ACESSDIR", $path);
+
+ $gDependencies[] = $path;
+
+ if( !file_exists($path) )
+ {
+ if( $isOptional == "" )
+ {
+ // Oops
+ echo "ERROR: '{$path}' does not exist\n",
+ exit(1);
+ }
+ else
+ {
+ // optional file
+ }
+ }
+ else
+ {
+ $lStack[$lDepth][1][] = array($dstfile, $path, $isOptional);
+ }
+ }
+ else