]> git.sur5r.net Git - cc65/commitdiff
Changed the order of directories that are searched for include files.
authorGreg King <gregdk@users.sf.net>
Sat, 4 May 2013 03:25:06 +0000 (23:25 -0400)
committerGreg King <gregdk@users.sf.net>
Sat, 4 May 2013 03:25:06 +0000 (23:25 -0400)
src/ca65/incpath.c
src/ca65/incpath.h
src/ca65/main.c
src/cc65/incpath.c
src/cc65/incpath.h
src/cc65/main.c

index ab0db844301e1b706dc2088fc0e631f8352630e4..a5968cb57d724fd4d8e814e3d45a46e369c7d42a 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2010, Ullrich von Bassewitz                                      */
+/* (C) 2000-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -70,17 +70,23 @@ void InitIncludePaths (void)
     /* Create the search path lists */
     IncSearchPath = NewSearchPath ();
     BinSearchPath = NewSearchPath ();
+}
+
 
-    /* Add some compiled in search paths if defined at compile time */
-#ifdef CA65_INC
-    AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC));
-#endif
 
+void FinishIncludePaths (void)
+/* Finish creating the include path search list. */
+{
     /* Add specific paths from the environment */
     AddSearchPathFromEnv (IncSearchPath, "CA65_INC");
 
-    /* Add paths relative to a main directory defined in an env var */
+    /* Add paths relative to a main directory defined in an env. var. */
     AddSubSearchPathFromEnv (IncSearchPath, "CC65_HOME", "asminc");
+
+    /* Add some compiled-in search paths if defined at compile time. */
+#ifdef CA65_INC
+    AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC));
+#endif
 }
 
 
index b2484cc96fee5b2ed663ded5a761a3ddb7ad4e91..96992a69727c0e27989a05140443680d11001b7d 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2010, Ullrich von Bassewitz                                      */
+/* (C) 2000-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -66,6 +66,9 @@ void ForgetAllIncludePaths (void);
 void InitIncludePaths (void);
 /* Initialize the include path search list */
 
+void FinishIncludePaths (void);
+/* Finish creating the include path search list. */
+
 
 
 /* End of incpath.h */
index f05cd341509b860640429cfe7745c24f57f2cab8..6e9e1e49402d2b77006ded86980cb24eed6a9723 100644 (file)
@@ -5,7 +5,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2012, Ullrich von Bassewitz                                      */
+/* (C) 1998-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -1016,6 +1016,9 @@ int main (int argc, char* argv [])
        exit (EXIT_FAILURE);
     }
 
+    /* Add the default include search paths. */
+    FinishIncludePaths ();
+
     /* If no CPU given, use the default CPU for the target */
     if (GetCPU () == CPU_UNKNOWN) {
         if (Target != TGT_UNKNOWN) {
index 275fc844d1adf18c122924e17ae34ff5ea1cd36c..6e07f8f77f0f16ac08d21b5a6cdce2142f41307f 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2012, Ullrich von Bassewitz                                      */
+/* (C) 2000-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -70,18 +70,24 @@ void InitIncludePaths (void)
     /* Create the search path lists */
     SysIncSearchPath = NewSearchPath ();
     UsrIncSearchPath = NewSearchPath ();
+}
+
 
-    /* Add some compiled in search paths if defined at compile time */
-#ifdef CC65_INC
-    AddSearchPath (SysIncSearchPath, STRINGIZE (CC65_INC));
-#endif
 
+void FinishIncludePaths (void)
+/* Finish creating the include path search lists. */
+{
     /* Add specific paths from the environment */
     AddSearchPathFromEnv (SysIncSearchPath, "CC65_INC");
     AddSearchPathFromEnv (UsrIncSearchPath, "CC65_INC");
 
-    /* Add paths relative to a main directory defined in an env var */
+    /* Add paths relative to a main directory defined in an env. var. */
     AddSubSearchPathFromEnv (SysIncSearchPath, "CC65_HOME", "include");
+
+    /* Add some compiled-in search paths if defined at compile time. */
+#ifdef CC65_INC
+    AddSearchPath (SysIncSearchPath, STRINGIZE (CC65_INC));
+#endif
 }
 
 
index dba920f6d64341129b589eb4704a66541dc955f1..99096b8ae5c22b3fed85ebca8cb1cc3738ed5531 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2010, Ullrich von Bassewitz                                      */
+/* (C) 2000-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -66,6 +66,9 @@ void ForgetAllIncludePaths (void);
 void InitIncludePaths (void);
 /* Initialize the include path search list */
 
+void FinishIncludePaths (void);
+/* Finish creating the include path search lists. */
+
 
 
 /* End of incpath.h */
index 461d8b95a30882252f454177fa45ab6d452e20f2..d2996e1b5f9ffee25e991761b9dab90744add1a4 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2012, Ullrich von Bassewitz                                      */
+/* (C) 2000-2013, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -957,6 +957,9 @@ int main (int argc, char* argv[])
        AbEnd ("No input files");
     }
 
+    /* Add the default include search paths. */
+    FinishIncludePaths ();
+
     /* Create the output file name if it was not explicitly given */
     MakeDefaultOutputName (InputFile);