Ignore:
Timestamp:
Dec 15, 2006, 6:18:47 AM (19 years ago)
Author:
bird
Message:

Partial implementation of a _PATH target property for resolving relative paths. It's primarily intended for sub-makefile mode where we apply it to all targets automatically. TODOs: INCS, DEPs (source level) and SUBDIRS*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/kbuild.c

    r646 r725  
    788788                           struct variable *pType, struct variable *pBldType,
    789789                           struct variable *pBldTrg, struct variable *pBldTrgArch, struct variable *pBldTrgCpu,
     790                           struct variable *pDefPath,
    790791                           const char *pszProp, const char *pszVarName, int iDirection)
    791792{
     
    10021003            paVars[iVar].cchExp = strlen(paVars[iVar].pszExp);
    10031004        }
     1005        if (pDefPath)
     1006        {
     1007            /** @todo */
     1008        }
    10041009        cchTotal += paVars[iVar].cchExp + 1;
    10051010    }
     
    10301035}
    10311036
    1032 /* get a source property. */
     1037/* get a source property. Doesn't respect the default path. */
    10331038char *
    10341039func_kbuild_source_prop(char *o, char **argv, const char *pszFuncName)
     
    10561061    pVar = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType,
    10571062                                      pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu,
     1063                                      NULL,
    10581064                                      argv[0], argv[1], iDirection);
    10591065    if (pVar)
     
    11901196    struct variable *pTarget    = kbuild_get_variable("target");
    11911197    struct variable *pSource    = kbuild_get_variable("source");
     1198    struct variable *pDefPath   = kbuild_get_variable("defpath");
    11921199    struct variable *pType      = kbuild_get_variable("type");
    11931200    struct variable *pBldType   = kbuild_get_variable("bld_type");
     
    12071214    kbuild_get_sdks(&Sdks, pTarget, pSource, pBldType, pBldTrg, pBldTrgArch);
    12081215
    1209     pDefs  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu,
     1216    if (pDefPath && !pDefPath->value_length)
     1217        pDefPath = NULL;
     1218    pDefs  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL,
    12101219                                        "DEFS", "defs", 1/* left-to-right */);
    1211     pIncs  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu,
     1220    pIncs  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL,
    12121221                                        "INCS", "incs", -1/* right-to-left */);
    1213     pFlags = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu,
     1222    pFlags = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath,
    12141223                                        "FLAGS", "flags", 1/* left-to-right */);
    1215     pDeps  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu,
     1224    pDeps  = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath,
    12161225                                        "DEPS", "deps", 1/* left-to-right */);
    12171226
Note: See TracChangeset for help on using the changeset viewer.