Changeset 46 for trunk/src/kmk/main.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/main.c

    r45 r46  
    275275                                        break;
    276276                                case 'a':
     277#ifdef USE_ARCHIVES
    277278                                        debug |= DEBUG_ARCH;
     279#endif /* else ignore */
    278280                                        break;
    279281                                case 'c':
     
    606608
    607609            if (uname(&utsname) == -1) {
    608                     perror("make: uname");
     610                    perror(MAKE_NAME ": uname");
    609611                    exit(2);
    610612            }
     
    775777         * parsing the makefile(s)
    776778         */
     779#ifdef USE_ARCHIVES
    777780        Arch_Init();
     781#endif
    778782        Targ_Init();
    779783        Suff_Init();
     
    855859                sysMkPath = Lst_Init (FALSE);
    856860                Dir_Expand (_PATH_DEFSYSMK, sysIncPath, sysMkPath);
    857                 #ifdef NMAKE
     861#ifdef NMAKE
    858862                if (!Lst_IsEmpty(sysMkPath))
    859863                {
    860864                    ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile);
    861865                    if (ln != NILLNODE)
    862                             Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
     866                            Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
    863867                }
    864                 /* Fatal("make: no system rules (%s).", _PATH_DEFSYSMK); */
    865                 #else
     868
     869#elif defined(KMK)
     870                if (!Lst_IsEmpty(sysMkPath))
     871                {
     872                    ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile);
     873                    if (ln != NILLNODE)
     874                            Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
     875
     876                }
     877                Error(MAKE_NAME ": no config rules (%s).", _PATH_DEFSYSMK);
     878#else
    866879                if (Lst_IsEmpty(sysMkPath))
    867                         Fatal("make: no system rules (%s).", _PATH_DEFSYSMK);
     880                        Fatal(MAKE_NAME ": no system rules (%s).", _PATH_DEFSYSMK);
    868881                ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile);
    869882                if (ln != NILLNODE)
    870                         Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
    871                 #endif
     883                        Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
     884#endif
    872885        }
    873886
     
    877890                ln = Lst_Find(makefiles, (ClientData)NULL, ReadMakefile);
    878891                if (ln != NILLNODE)
    879                         Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
     892                        Fatal(MAKE_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
    880893        } else
    881894            #ifdef KMK
     
    10251038        Suff_End();
    10261039        Targ_End();
     1040#ifdef USE_ARCHIVES
    10271041        Arch_End();
     1042#endif
    10281043        str_end();
    10291044        Var_End();
     
    13571372#endif
    13581373
    1359         (void)fprintf(stderr, "make: ");
     1374        (void)fprintf(stderr, MAKE_NAME ": ");
    13601375        (void)vfprintf(stderr, fmt, ap);
    13611376        va_end(ap);
     
    15031518        (void)fprintf(stderr, "%s\n%s\n%s\n"
    15041519#ifdef NMAKE
     1520"%s\n"
     1521#endif
     1522#ifdef KMK
    15051523"%s\n"
    15061524#endif
     
    15111529#ifdef NMAKE
    15121530,"NMAKE compatible mode enabled."
    1513 
     1531#endif
     1532#ifdef KMK
     1533,"kMk extensions enabled."
    15141534#endif
    15151535);
Note: See TracChangeset for help on using the changeset viewer.