=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/parse.c,v retrieving revision 1.88 retrieving revision 1.89 diff -c -r1.88 -r1.89 *** src/usr.bin/make/parse.c 2007/09/17 09:45:37 1.88 --- src/usr.bin/make/parse.c 2007/09/17 11:11:30 1.89 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: parse.c,v 1.88 2007/09/17 09:45:37 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: parse.c,v 1.89 2007/09/17 11:11:30 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* *************** *** 97,106 **** #define SOURCES_SIZE 128 #define TARGETS_SIZE 32 ! static LIST theParseIncPath;/* list of directories for "..." includes */ static LIST theSysIncPath; /* list of directories for <...> includes */ ! Lst sysIncPath = &theSysIncPath; ! Lst parseIncPath = &theParseIncPath; #ifdef CLEANUP static LIST targCmds; /* command lines for targets */ --- 97,106 ---- #define SOURCES_SIZE 128 #define TARGETS_SIZE 32 ! static LIST theUserIncPath;/* list of directories for "..." includes */ static LIST theSysIncPath; /* list of directories for <...> includes */ ! Lst systemIncludePath = &theSysIncPath; ! Lst userIncludePath = &theUserIncPath; #ifdef CLEANUP static LIST targCmds; /* command lines for targets */ *************** *** 1129,1135 **** void Parse_AddIncludeDir(const char *dir) { ! Dir_AddDir(parseIncPath, dir); } static char * --- 1129,1135 ---- void Parse_AddIncludeDir(const char *dir) { ! Dir_AddDir(userIncludePath, dir); } static char * *************** *** 1139,1145 **** /* Look up system files on the system path first */ if (isSystem) { ! fullname = Dir_FindFileNoDot(file, sysIncPath); if (fullname) return fullname; } --- 1139,1145 ---- /* Look up system files on the system path first */ if (isSystem) { ! fullname = Dir_FindFileNoDot(file, systemIncludePath); if (fullname) return fullname; } *************** *** 1159,1165 **** newName = Str_concati(fname, slash, file, strchr(file, '\0'), '/'); ! fullname = Dir_FindFile(newName, parseIncPath); if (fullname == NULL) fullname = Dir_FindFile(newName, defaultPath); free(newName); --- 1159,1165 ---- newName = Str_concati(fname, slash, file, strchr(file, '\0'), '/'); ! fullname = Dir_FindFile(newName, userIncludePath); if (fullname == NULL) fullname = Dir_FindFile(newName, defaultPath); free(newName); *************** *** 1171,1177 **** /* Now look first on the -I search path, then on the .PATH * search path, if not found in a -I directory. * XXX: Suffix specific? */ ! fullname = Dir_FindFile(file, parseIncPath); if (fullname) return fullname; fullname = Dir_FindFile(file, defaultPath); --- 1171,1177 ---- /* Now look first on the -I search path, then on the .PATH * search path, if not found in a -I directory. * XXX: Suffix specific? */ ! fullname = Dir_FindFile(file, userIncludePath); if (fullname) return fullname; fullname = Dir_FindFile(file, defaultPath); *************** *** 1183,1189 **** if (isSystem) return NULL; else ! return Dir_FindFile(file, sysIncPath); } static void --- 1183,1189 ---- if (isSystem) return NULL; else ! return Dir_FindFile(file, systemIncludePath); } static void *************** *** 1612,1619 **** Parse_Init(void) { mainNode = NULL; ! Static_Lst_Init(parseIncPath); ! Static_Lst_Init(sysIncPath); Array_Init(&gsources, SOURCES_SIZE); Array_Init(>argets, TARGETS_SIZE); --- 1612,1619 ---- Parse_Init(void) { mainNode = NULL; ! Static_Lst_Init(userIncludePath); ! Static_Lst_Init(systemIncludePath); Array_Init(&gsources, SOURCES_SIZE); Array_Init(>argets, TARGETS_SIZE); *************** *** 1628,1635 **** Parse_End(void) { Lst_Destroy(&targCmds, (SimpleProc)free); ! Lst_Destroy(sysIncPath, Dir_Destroy); ! Lst_Destroy(parseIncPath, Dir_Destroy); LowParse_End(); } #endif --- 1628,1635 ---- Parse_End(void) { Lst_Destroy(&targCmds, (SimpleProc)free); ! Lst_Destroy(systemIncludePath, Dir_Destroy); ! Lst_Destroy(userIncludePath, Dir_Destroy); LowParse_End(); } #endif