Changeset 46 for trunk/src/kmk/make.c


Ignore:
Timestamp:
Apr 4, 2003, 2:03:50 AM (22 years ago)
Author:
bird
Message:

kMk changes. Made extensions configurable from config.h. fixed parents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/make.c

    r45 r46  
    194194        }
    195195        oodate = FALSE;
     196#ifdef USE_ARCHIVES
    196197    } else if (gn->type & OP_LIB) {
    197198        if (DEBUG(MAKE)) {
     
    205206        oodate = Arch_LibOODate (gn) ||
    206207            ((gn->cmtime == 0) && (gn->type & OP_DOUBLEDEP));
     208#endif
    207209    } else if (gn->type & OP_JOIN) {
    208210        /*
     
    624626
    625627
    626 #ifdef KMK
     628#ifdef USE_PARENTS
    627629/*-
    628630 *-----------------------------------------------------------------------
     
    637639 */
    638640static int
    639 MakeAddParents (cgnp, pgnp)
     641MakeAddParents (pgnp, cgnp)
    640642    ClientData  pgnp;   /* The parent to add to add */
    641643    ClientData  cgnp;   /* The child to whose PARENTS variable it should be */
     
    647649        char *p1 = NULL;
    648650
    649         if (OP_NOP(pgn->type)) {
    650             /*
    651              * this node is only source; use the specific pathname for it
    652              */
     651
     652        if (OP_NOP(pgn->type) || !(parent = Var_Value(TARGET, pgn, &p1))) {
     653            /* this node is only source; use the specific pathname for it */
    653654            parent = pgn->path ? pgn->path : pgn->name;
    654         }
    655         else
    656             parent = Var_Value(TARGET, pgn, &p1);
     655        }
    657656        Var_Append(PARENTS, parent, cgn);
    658657        efree(p1);
     
    690689{
    691690    Lst_ForEach (gn->children, MakeAddAllSrc, (ClientData) gn);
    692     #ifdef KMK
     691#ifdef USE_PARENTS
    693692    Lst_ForEach (gn->parents, MakeAddParents, (ClientData) gn);
    694     #endif
     693#endif
    695694
    696695    if (!Var_Exists (OODATE, gn)) {
Note: See TracChangeset for help on using the changeset viewer.