Code: Select all
# export PATH=/usr/local/pspdev/bin:$PATH
Code: Select all
# psp-config -p
Error, invalid suffix on the end of the path. Should be /bin/psp-config
# /usr/local/pspdev/bin/psp-config -p
/usr/local/pspdev/psp/sdk
Code: Select all
# psp-config -p
/usr/local/pspdev/psp/sdk
normalize_path is based on __psp_path_normalize [newlib/.../pspcwd.c]
Code: Select all
--- psp-config.c Wed Oct 12 12:05:53 2005
+++ psp-config.new.c Wed Oct 12 12:04:26 2005
@@ -86,6 +86,22 @@
fprintf(stderr, "-P, --psp-prefix : Print the prefix of PSP-hosted software\n");
}
+void normalize_path (char *out)
+{
+ int i;
+ int j;
+
+ /* Convert "//" to "/" */
+ for (i = 0; out[i + 1]; i++) {
+ if (out[i] == '/' && out[i + 1] == '/') {
+ for (j = i + 1; out[j]; j++) {
+ out[j] = out[j + 1];
+ }
+ i--;
+ }
+ }
+}
+
/* Find the path to the pspdev dir (e.g. /usr/local/pspdev) */
char *find_pspdev_path(char *name)
{
@@ -166,6 +182,8 @@
}
}
}
+
+ normalize_path(path);
if(found)
{