Changeset 785 for trunk/src/gmake/kbuild.c
- Timestamp:
- Jan 24, 2007, 11:21:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kbuild.c
r729 r785 4 4 * kBuild specific make functionality. 5 5 * 6 * Copyright (c) 2006 knut st. osmundsen <bird@innotek.de>6 * Copyright (c) 2006-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net> 7 7 * 8 8 * … … 48 48 /** 49 49 * Applies the specified default path to any relative paths in *ppsz. 50 * 50 * 51 51 * @param pDefPath The default path. 52 * @param ppsz Pointer to the string pointer. If we expand anything, *ppsz 52 * @param ppsz Pointer to the string pointer. If we expand anything, *ppsz 53 53 * will be replaced and the caller is responsible for calling free() on it. 54 54 * @param pcch IN: *pcch contains the current string length. … … 57 57 * @param fCanFree Whether *ppsz should be freed when we replace it. 58 58 */ 59 static void 59 static void 60 60 kbuild_apply_defpath(struct variable *pDefPath, char **ppsz, int *pcch, int *pcchAlloc, int fCanFree) 61 61 { … … 63 63 const char *pszInCur; 64 64 unsigned int cchInCur; 65 unsigned int cRelativePaths; 66 67 /* 68 * The first pass, count the relative paths. 65 unsigned int cRelativePaths; 66 67 /* 68 * The first pass, count the relative paths. 69 69 */ 70 70 cRelativePaths = 0; … … 77 77 #else 78 78 if (pszInCur[0] != '/') 79 #endif 79 #endif 80 80 cRelativePaths++; 81 } 82 83 /* 84 * The second pass construct the new string. 81 } 82 83 /* 84 * The second pass construct the new string. 85 85 */ 86 86 if (cRelativePaths) … … 100 100 #else 101 101 if (pszInCur[0] != '/') 102 #endif 102 #endif 103 103 { 104 104 PATH_VAR(szAbsPathIn); … … 133 133 } 134 134 } 135 } 135 } 136 136 /* the final copy (includes the nil). */ 137 137 cchInCur = *ppsz + *pcch - pszInNextCopy; … … 698 698 pSdks->cGlobal = 0; 699 699 sprintf(pszTmp, "$(SDKS) $(SDKS.%s) $(SDKS.%s) $(SDKS.%s) $(SDKS.%s.%s)", 700 pBldType->value, 701 pBldTrg->value, 700 pBldType->value, 701 pBldTrg->value, 702 702 pBldTrgArch->value, 703 703 pBldTrg->value, pBldTrgArch->value); … … 744 744 pTarget->value, pSource->value, pBldTrgArch->value, 745 745 pTarget->value, pSource->value, pBldTrg->value, pBldTrgArch->value); 746 assert(cch < cchTmp); (void)cch; 746 assert(cch < cchTmp); (void)cch; 747 747 pszIterator = pSdks->apsz[3] = allocated_variable_expand(pszTmp); 748 748 while ((pszCur = find_next_token(&pszIterator, &cchCur)) != 0) … … 962 962 iSdkEnd = iDirection == 1 ? pSdks->iGlobal + pSdks->cGlobal : pSdks->iGlobal - 1; 963 963 for (iSdk = iDirection == 1 ? pSdks->iGlobal : pSdks->iGlobal + pSdks->cGlobal - 1; 964 iSdk != iSdkEnd; 964 iSdk != iSdkEnd; 965 965 iSdk += iDirection) 966 966 { … … 999 999 iSdkEnd = iDirection == 1 ? pSdks->iTarget + pSdks->cTarget : pSdks->iTarget - 1; 1000 1000 for (iSdk = iDirection == 1 ? pSdks->iTarget : pSdks->iTarget + pSdks->cTarget - 1; 1001 iSdk != iSdkEnd; 1001 iSdk != iSdkEnd; 1002 1002 iSdk += iDirection) 1003 1003 { … … 1035 1035 /* the source sdks */ 1036 1036 iSdkEnd = iDirection == 1 ? pSdks->iSource + pSdks->cSource : pSdks->iSource - 1; 1037 for (iSdk = iDirection == 1 ? pSdks->iSource : pSdks->iSource + pSdks->cSource - 1; 1038 iSdk != iSdkEnd; 1037 for (iSdk = iDirection == 1 ? pSdks->iSource : pSdks->iSource + pSdks->cSource - 1; 1038 iSdk != iSdkEnd; 1039 1039 iSdk += iDirection) 1040 1040 { … … 1361 1361 /* 1362 1362 * If we've got a default path, we must expand the source now. 1363 * If we do this too early, "<source>_property = stuff" won't work becuase 1363 * If we do this too early, "<source>_property = stuff" won't work becuase 1364 1364 * our 'source' value isn't what the user expects. 1365 1365 */
Note:
See TracChangeset
for help on using the changeset viewer.