New option --forget-inc-paths
git-svn-id: svn://svn.cc65.org/cc65/trunk@2243 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -65,6 +65,14 @@ char* FindInclude (const char* Name, unsigned Where)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ForgetAllIncludePaths (void)
|
||||||
|
/* Remove all include search paths. */
|
||||||
|
{
|
||||||
|
ForgetAllSearchPaths (INC_SYS | INC_USER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void InitIncludePaths (void)
|
void InitIncludePaths (void)
|
||||||
/* Initialize the include path search list */
|
/* Initialize the include path search list */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ char* FindInclude (const char* Name, unsigned Where);
|
|||||||
* the complete path, if found, return 0 otherwise.
|
* the complete path, if found, return 0 otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void ForgetAllIncludePaths (void);
|
||||||
|
/* Remove all include search paths. */
|
||||||
|
|
||||||
void InitIncludePaths (void);
|
void InitIncludePaths (void);
|
||||||
/* Initialize the include path search list */
|
/* Initialize the include path search list */
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ static void Usage (void)
|
|||||||
" --debug-opt name\tDebug optimization steps\n"
|
" --debug-opt name\tDebug optimization steps\n"
|
||||||
" --disable-opt name\tDisable an optimization step\n"
|
" --disable-opt name\tDisable an optimization step\n"
|
||||||
" --enable-opt name\tEnable an optimization step\n"
|
" --enable-opt name\tEnable an optimization step\n"
|
||||||
|
" --forget-inc-paths\tForget include search paths\n"
|
||||||
" --help\t\tHelp (this text)\n"
|
" --help\t\tHelp (this text)\n"
|
||||||
" --include-dir dir\tSet an include directory search path\n"
|
" --include-dir dir\tSet an include directory search path\n"
|
||||||
" --list-opt-steps\tList all optimizer steps and exit\n"
|
" --list-opt-steps\tList all optimizer steps and exit\n"
|
||||||
@@ -503,6 +504,15 @@ static void OptEnableOpt (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptForgetIncPaths (const char* Opt attribute ((unused)),
|
||||||
|
const char* Arg attribute ((unused)))
|
||||||
|
/* Forget all currently defined include paths */
|
||||||
|
{
|
||||||
|
ForgetAllIncludePaths ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptHelp (const char* Opt attribute ((unused)),
|
static void OptHelp (const char* Opt attribute ((unused)),
|
||||||
const char* Arg attribute ((unused)))
|
const char* Arg attribute ((unused)))
|
||||||
/* Print usage information and exit */
|
/* Print usage information and exit */
|
||||||
@@ -629,7 +639,8 @@ int main (int argc, char* argv[])
|
|||||||
{ "--debug-info", 0, OptDebugInfo },
|
{ "--debug-info", 0, OptDebugInfo },
|
||||||
{ "--debug-opt", 1, OptDebugOpt },
|
{ "--debug-opt", 1, OptDebugOpt },
|
||||||
{ "--disable-opt", 1, OptDisableOpt },
|
{ "--disable-opt", 1, OptDisableOpt },
|
||||||
{ "--enable-opt", 1, OptEnableOpt, },
|
{ "--enable-opt", 1, OptEnableOpt },
|
||||||
|
{ "--forget-inc-paths", 0, OptForgetIncPaths },
|
||||||
{ "--help", 0, OptHelp },
|
{ "--help", 0, OptHelp },
|
||||||
{ "--include-dir", 1, OptIncludeDir },
|
{ "--include-dir", 1, OptIncludeDir },
|
||||||
{ "--list-opt-steps", 0, OptListOptSteps },
|
{ "--list-opt-steps", 0, OptListOptSteps },
|
||||||
|
|||||||
@@ -636,6 +636,7 @@ static void Usage (void)
|
|||||||
" --debug\t\tDebug mode\n"
|
" --debug\t\tDebug mode\n"
|
||||||
" --debug-info\t\tAdd debug info\n"
|
" --debug-info\t\tAdd debug info\n"
|
||||||
" --feature name\tSet an emulation feature\n"
|
" --feature name\tSet an emulation feature\n"
|
||||||
|
" --forget-inc-paths\tForget include search paths (compiler)\n"
|
||||||
" --help\t\tHelp (this text)\n"
|
" --help\t\tHelp (this text)\n"
|
||||||
" --include-dir dir\tSet a compiler include directory path\n"
|
" --include-dir dir\tSet a compiler include directory path\n"
|
||||||
" --lib file\t\tLink this library\n"
|
" --lib file\t\tLink this library\n"
|
||||||
@@ -822,6 +823,14 @@ static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptForgetIncPaths (const char* Opt attribute ((unused)), const char* Arg)
|
||||||
|
/* Forget all currently defined include paths */
|
||||||
|
{
|
||||||
|
CmdAddArg2 (&CC65, "--forget-inc-paths", Arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptHelp (const char* Opt attribute ((unused)),
|
static void OptHelp (const char* Opt attribute ((unused)),
|
||||||
const char* Arg attribute ((unused)))
|
const char* Arg attribute ((unused)))
|
||||||
/* Print help - cl65 */
|
/* Print help - cl65 */
|
||||||
@@ -1042,6 +1051,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--debug", 0, OptDebug },
|
{ "--debug", 0, OptDebug },
|
||||||
{ "--debug-info", 0, OptDebugInfo },
|
{ "--debug-info", 0, OptDebugInfo },
|
||||||
{ "--feature", 1, OptFeature },
|
{ "--feature", 1, OptFeature },
|
||||||
|
{ "--forget-inc-paths", 0, OptForgetIncPaths },
|
||||||
{ "--help", 0, OptHelp },
|
{ "--help", 0, OptHelp },
|
||||||
{ "--include-dir", 1, OptIncludeDir },
|
{ "--include-dir", 1, OptIncludeDir },
|
||||||
{ "--lib", 1, OptLib },
|
{ "--lib", 1, OptLib },
|
||||||
|
|||||||
Reference in New Issue
Block a user