remove rmt.c module, most of remote support, including .EXPORT,
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 13 Mar 1990 02:42:46 +0000 (18:42 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 13 Mar 1990 02:42:46 +0000 (18:42 -0800)
.EXPORTSAME, .NOEXPORT, -X and -x

SCCS-vsn: usr.bin/make/compat.c 5.3
SCCS-vsn: usr.bin/make/job.c 5.7
SCCS-vsn: usr.bin/make/main.c 5.8
SCCS-vsn: usr.bin/make/make.h 5.5
SCCS-vsn: usr.bin/make/nonints.h 5.3
SCCS-vsn: usr.bin/make/parse.c 5.5
SCCS-vsn: usr.bin/make/targ.c 5.4

usr/src/usr.bin/make/compat.c
usr/src/usr.bin/make/job.c
usr/src/usr.bin/make/main.c
usr/src/usr.bin/make/make.h
usr/src/usr.bin/make/nonints.h
usr/src/usr.bin/make/parse.c
usr/src/usr.bin/make/targ.c

index 4074e57..43a248a 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)compat.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)compat.c   5.3 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -226,16 +226,7 @@ CompatRunCommand (cmd, gn)
        av += 1;
     }
     
        av += 1;
     }
     
-    /*
-     * If the job has not been marked unexportable, tell the Rmt module we've
-     * got something for it...local is set TRUE if the job should be run
-     * locally.
-     */
-    if (!(gn->type & OP_NOEXPORT)) {
-       local = !Rmt_Begin(av[0], av, gn);
-    } else {
-       local = TRUE;
-    }
+    local = TRUE;
 
     /*
      * Fork and execute the single command. If the fork fails, we abort.
 
     /*
      * Fork and execute the single command. If the fork fails, we abort.
@@ -250,7 +241,7 @@ CompatRunCommand (cmd, gn)
            numWritten = write (2, av[0], strlen (av[0]));
            numWritten = write (2, ": not found\n", sizeof(": not found"));
        } else {
            numWritten = write (2, av[0], strlen (av[0]));
            numWritten = write (2, ": not found\n", sizeof(": not found"));
        } else {
-           Rmt_Exec(av[0], av, FALSE);
+           (void)execv(av[0], av);
        }
        exit(1);
     } else if (argc != 0) {
        }
        exit(1);
     } else if (argc != 0) {
@@ -270,7 +261,7 @@ CompatRunCommand (cmd, gn)
        int       id;
 
        if (!local) {
        int       id;
 
        if (!local) {
-           id = Rmt_LastID(cpid);
+           id = 0;
        }
 
        while ((stat = wait(&reason)) != cpid) {
        }
 
        while ((stat = wait(&reason)) != cpid) {
@@ -279,11 +270,6 @@ CompatRunCommand (cmd, gn)
            }
        }
        
            }
        }
        
-       if (!local) {
-           Rmt_Done(id);
-       }
-       
-
        if (stat > -1) {
            if (WIFSTOPPED(reason)) {
                status = reason.w_stopval;              /* stopped */
        if (stat > -1) {
            if (WIFSTOPPED(reason)) {
                status = reason.w_stopval;              /* stopped */
index 8ba321b..cf647e5 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)job.c      5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)job.c      5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -221,7 +221,7 @@ Lst             stoppedJobs;        /* Lst of Job structures describing
 static void JobRestart();
 static int  JobStart();
 static void JobInterrupt();
 static void JobRestart();
 static int  JobStart();
 static void JobInterrupt();
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobCondPassSig --
 /*-
  *-----------------------------------------------------------------------
  * JobCondPassSig --
@@ -315,7 +315,7 @@ JobPassSig(signo)
     signal(signo, JobPassSig);
 
 }
     signal(signo, JobPassSig);
 
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobCmpPid  --
 /*-
  *-----------------------------------------------------------------------
  * JobCmpPid  --
@@ -337,7 +337,7 @@ JobCmpPid (job, pid)
 {
     return (pid - job->pid);
 }
 {
     return (pid - job->pid);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobPrintCommand  --
 /*-
  *-----------------------------------------------------------------------
  * JobPrintCommand  --
@@ -500,7 +500,7 @@ JobPrintCommand (cmd, job)
     }
     return (0);
 }
     }
     return (0);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobSaveCommand --
 /*-
  *-----------------------------------------------------------------------
  * JobSaveCommand --
@@ -524,7 +524,7 @@ JobSaveCommand (cmd, gn)
     (void)Lst_AtEnd (postCommands->commands, (ClientData)cmd);
     return (0);
 }
     (void)Lst_AtEnd (postCommands->commands, (ClientData)cmd);
     return (0);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobFinish  --
 /*-
  *-----------------------------------------------------------------------
  * JobFinish  --
@@ -779,7 +779,7 @@ JobFinish (job, status)
        Finish (errors);
     }
 }
        Finish (errors);
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Touch --
 /*-
  *-----------------------------------------------------------------------
  * Job_Touch --
@@ -852,7 +852,7 @@ Job_Touch (gn, silent)
        }
     }
 }
        }
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_CheckCommands --
 /*-
  *-----------------------------------------------------------------------
  * Job_CheckCommands --
@@ -937,7 +937,7 @@ JobLocalInput(stream, job)
     JobDoOutput(job, FALSE);
 }
 #endif /* RMT_WILL_WATCH */
     JobDoOutput(job, FALSE);
 }
 #endif /* RMT_WILL_WATCH */
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobExec --
 /*-
  *-----------------------------------------------------------------------
  * JobExec --
@@ -1037,12 +1037,7 @@ JobExec(job, argv)
        (void) setpgrp(0, getpid());
 #endif USE_PGRP
 
        (void) setpgrp(0, getpid());
 #endif USE_PGRP
 
-       if (job->flags & JOB_REMOTE) {
-           Rmt_Exec (shellPath, argv, FALSE);
-       } else {
-           (void) execv (shellPath, argv);
-       }
-
+       (void) execv (shellPath, argv);
        (void) write (2, "Could not execute shell\n",
                 sizeof ("Could not execute shell"));
        _exit (1);
        (void) write (2, "Could not execute shell\n",
                 sizeof ("Could not execute shell"));
        _exit (1);
@@ -1065,7 +1060,7 @@ JobExec(job, argv)
        }
 
        if (job->flags & JOB_REMOTE) {
        }
 
        if (job->flags & JOB_REMOTE) {
-           job->rmtID = (char *)Rmt_LastID(job->pid);
+           job->rmtID = (char *)0;
        } else {
            nLocal += 1;
            /*
        } else {
            nLocal += 1;
            /*
@@ -1088,7 +1083,7 @@ jobExecFinish:
        jobFull = TRUE;
     }
 }
        jobFull = TRUE;
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobMakeArgv --
 /*-
  *-----------------------------------------------------------------------
  * JobMakeArgv --
@@ -1143,15 +1138,11 @@ JobMakeArgv(job, argv)
     }
     argv[argc] = (char *)NULL;
 }
     }
     argv[argc] = (char *)NULL;
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobRestart --
 /*-
  *-----------------------------------------------------------------------
  * JobRestart --
- *     Restart a job that stopped for some reason. If the job stopped
- *     because it migrated home again, we tell the Rmt module to
- *     find a new home for it and make it runnable if Rmt_ReExport
- *     succeeded (if it didn't and the job may be run locally, we
- *     simply resume it). If the job didn't run and can now, we run it.
+ *     Restart a job that stopped for some reason. 
  *
  * Results:
  *     None.
  *
  * Results:
  *     None.
@@ -1169,11 +1160,7 @@ JobRestart(job)
        if (DEBUG(JOB)) {
            printf("Remigrating %x\n", job->pid);
        }
        if (DEBUG(JOB)) {
            printf("Remigrating %x\n", job->pid);
        }
-       if (!Rmt_ReExport(job->pid)) {
-           if (DEBUG(JOB)) {
-               printf("Couldn't migrate...");
-           }
-           if (nLocal != maxLocal) {
+       if (nLocal != maxLocal) {
                /*
                 * Job cannot be remigrated, but there's room on the local
                 * machine, so resume the job and note that another
                /*
                 * Job cannot be remigrated, but there's room on the local
                 * machine, so resume the job and note that another
@@ -1185,7 +1172,7 @@ JobRestart(job)
                KILL(job->pid, SIGCONT);
                nLocal +=1;
                job->flags &= ~(JOB_REMIGRATE|JOB_RESUME);
                KILL(job->pid, SIGCONT);
                nLocal +=1;
                job->flags &= ~(JOB_REMIGRATE|JOB_RESUME);
-           } else {
+       } else {
                /*
                 * Job cannot be restarted. Mark the table as full and
                 * place the job back on the list of stopped jobs.
                /*
                 * Job cannot be restarted. Mark the table as full and
                 * place the job back on the list of stopped jobs.
@@ -1199,14 +1186,6 @@ JobRestart(job)
                    printf("Job queue is full.\n");
                }
                return;
                    printf("Job queue is full.\n");
                }
                return;
-           }
-       } else {
-           /*
-            * Clear out the remigrate and resume flags. If MIGRATE was set,
-            * leave that around for JobFinish to see so it doesn't print out
-            * that the job was continued.
-            */
-           job->flags &= ~(JOB_REMIGRATE|JOB_RESUME);
        }
        
        (void)Lst_AtEnd(jobs, (ClientData)job);
        }
        
        (void)Lst_AtEnd(jobs, (ClientData)job);
@@ -1233,16 +1212,7 @@ JobRestart(job)
        if (DEBUG(JOB)) {
            printf("Restarting %s...", job->node->name);
        }
        if (DEBUG(JOB)) {
            printf("Restarting %s...", job->node->name);
        }
-       if ((job->node->type&OP_NOEXPORT) ||
-#ifdef RMT_NO_EXEC
-           !Rmt_Export(shellPath, argv, job)
-#else
-           !Rmt_Begin(shellPath, argv, job->node)
-#endif
-           )
-       {
-           if (((nLocal >= maxLocal) && ! (job->flags & JOB_SPECIAL)))
-           {
+       if (((nLocal >= maxLocal) && ! (job->flags & JOB_SPECIAL))) {
                /*
                 * Can't be exported and not allowed to run locally -- put it
                 * back on the hold queue and mark the table full
                /*
                 * Can't be exported and not allowed to run locally -- put it
                 * back on the hold queue and mark the table full
@@ -1256,7 +1226,7 @@ JobRestart(job)
                    printf("Job queue is full.\n");
                }
                return;
                    printf("Job queue is full.\n");
                }
                return;
-           } else {
+       } else {
                /*
                 * Job may be run locally.
                 */
                /*
                 * Job may be run locally.
                 */
@@ -1264,15 +1234,6 @@ JobRestart(job)
                    printf("running locally\n");
                }
                job->flags &= ~JOB_REMOTE;
                    printf("running locally\n");
                }
                job->flags &= ~JOB_REMOTE;
-           }
-       } else {
-           /*
-            * Can be exported. Hooray!
-            */
-           if (DEBUG(JOB)) {
-               printf("exporting\n");
-           }
-           job->flags |= JOB_REMOTE;
        }
        JobExec(job, argv);
     } else {
        }
        JobExec(job, argv);
     } else {
@@ -1285,8 +1246,7 @@ JobRestart(job)
        }
        if (((job->flags & JOB_REMOTE) ||
             (nLocal < maxLocal) ||
        }
        if (((job->flags & JOB_REMOTE) ||
             (nLocal < maxLocal) ||
-            (((job->flags & JOB_SPECIAL) ||
-              (job->node->type & OP_NOEXPORT)) &&
+            (((job->flags & JOB_SPECIAL)) &&
              (maxLocal == 0))) &&
            (nJobs != maxJobs))
        {
              (maxLocal == 0))) &&
            (nJobs != maxJobs))
        {
@@ -1345,7 +1305,7 @@ JobRestart(job)
        }
     }
 }
        }
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobStart  --
 /*-
  *-----------------------------------------------------------------------
  * JobStart  --
@@ -1608,22 +1568,11 @@ JobStart (gn, flags, previous)
        }
     }
 
        }
     }
 
-    if (!(gn->type & OP_NOEXPORT)) {
-#ifdef RMT_NO_EXEC
-       local = !Rmt_Export(shellPath, argv, job);
-#else
-       local = !Rmt_Begin (shellPath, argv, gn);
-#endif /* RMT_NO_EXEC */
-       if (!local) {
-           job->flags |= JOB_REMOTE;
-       }
-    } else {
-       local = TRUE;
-    }
+    local = TRUE;
 
     if (local && (((nLocal >= maxLocal) &&
         !(job->flags & JOB_SPECIAL) &&
 
     if (local && (((nLocal >= maxLocal) &&
         !(job->flags & JOB_SPECIAL) &&
-        (!(gn->type & OP_NOEXPORT) || (maxLocal != 0)))))
+        (maxLocal != 0))))
     {
        /*
         * The job can only be run locally, but we've hit the limit of
     {
        /*
         * The job can only be run locally, but we've hit the limit of
@@ -1631,8 +1580,7 @@ JobStart (gn, flags, previous)
         * finishes. Note that the special jobs (.BEGIN, .INTERRUPT and .END)
         * may be run locally even when the local limit has been reached
         * (e.g. when maxLocal == 0), though they will be exported if at
         * finishes. Note that the special jobs (.BEGIN, .INTERRUPT and .END)
         * may be run locally even when the local limit has been reached
         * (e.g. when maxLocal == 0), though they will be exported if at
-        * all possible. In addition, any target marked with .NOEXPORT will
-        * be run locally if maxLocal is 0.
+        * all possible. 
         */
        jobFull = TRUE;
        
         */
        jobFull = TRUE;
        
@@ -1656,7 +1604,7 @@ JobStart (gn, flags, previous)
     }
     return(JOB_RUNNING);
 }
     }
     return(JOB_RUNNING);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobDoOutput  --
 /*-
  *-----------------------------------------------------------------------
  * JobDoOutput  --
@@ -1921,7 +1869,7 @@ end_loop:
     }
     fflush(stdout);
 }
     }
     fflush(stdout);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_CatchChildren --
 /*-
  *-----------------------------------------------------------------------
  * Job_CatchChildren --
@@ -1987,18 +1935,13 @@ Job_CatchChildren (block)
                printf("Job queue is no longer full.\n");
            }
            jobFull = FALSE;
                printf("Job queue is no longer full.\n");
            }
            jobFull = FALSE;
-       
-           if (job->flags & JOB_REMOTE) {
-               Rmt_Done (job->rmtID);
-           } else {
-               nLocal -= 1;
-           }
+           nLocal -= 1;
        }
 
        JobFinish (job, status);
     }
 }
        }
 
        JobFinish (job, status);
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_CatchOutput --
 /*-
  *-----------------------------------------------------------------------
  * Job_CatchOutput --
@@ -2073,7 +2016,7 @@ Job_CatchOutput ()
     }
 #endif /* RMT_WILL_WATCH */
 }
     }
 #endif /* RMT_WILL_WATCH */
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Make --
 /*-
  *-----------------------------------------------------------------------
  * Job_Make --
@@ -2094,7 +2037,7 @@ Job_Make (gn)
 {
     (void)JobStart (gn, 0, (Job *)NULL);
 }
 {
     (void)JobStart (gn, 0, (Job *)NULL);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Init --
 /*-
  *-----------------------------------------------------------------------
  * Job_Init --
@@ -2210,7 +2153,7 @@ Job_Init (maxproc, maxlocal)
     }
     postCommands = Targ_FindNode (".END", TARG_CREATE);
 }
     }
     postCommands = Targ_FindNode (".END", TARG_CREATE);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Full --
 /*-
  *-----------------------------------------------------------------------
  * Job_Full --
@@ -2230,7 +2173,7 @@ Job_Full ()
 {
     return (aborting || jobFull);
 }
 {
     return (aborting || jobFull);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Empty --
 /*-
  *-----------------------------------------------------------------------
  * Job_Empty --
@@ -2268,7 +2211,7 @@ Job_Empty ()
        return(FALSE);
     }
 }
        return(FALSE);
     }
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobMatchShell --
 /*-
  *-----------------------------------------------------------------------
  * JobMatchShell --
@@ -2311,7 +2254,7 @@ JobMatchShell (name)
     }
     return (match == (Shell *) NULL ? sh : match);
 }
     }
     return (match == (Shell *) NULL ? sh : match);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_ParseShell --
 /*-
  *-----------------------------------------------------------------------
  * Job_ParseShell --
@@ -2477,7 +2420,7 @@ Job_ParseShell (line)
     free (words);
     return SUCCESS;
 }
     free (words);
     return SUCCESS;
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * JobInterrupt --
 /*-
  *-----------------------------------------------------------------------
  * JobInterrupt --
@@ -2558,7 +2501,7 @@ JobInterrupt (runINTERRUPT)
     (void) unlink (tfile);
     exit (0);
 }
     (void) unlink (tfile);
     exit (0);
 }
-\f
+
 /*
  *-----------------------------------------------------------------------
  * Job_End --
 /*
  *-----------------------------------------------------------------------
  * Job_End --
@@ -2594,7 +2537,7 @@ Job_End ()
     (void) unlink (tfile);
     return(errors);
 }
     (void) unlink (tfile);
     return(errors);
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_Wait --
 /*-
  *-----------------------------------------------------------------------
  * Job_Wait --
@@ -2621,7 +2564,7 @@ Job_Wait()
     }
     aborting = 0;
 }
     }
     aborting = 0;
 }
-\f
+
 /*-
  *-----------------------------------------------------------------------
  * Job_AbortAll --
 /*-
  *-----------------------------------------------------------------------
  * Job_AbortAll --
index 6c1db9f..416fdb0 100644 (file)
@@ -27,7 +27,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.8 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -99,11 +99,8 @@ Boolean                      backwards;      /* -B flag */
 Boolean                        ignoreErrors;   /* -i flag */
 Boolean                        beSilent;       /* -s flag */
 Boolean                        sysVmake;       /* -v flag */
 Boolean                        ignoreErrors;   /* -i flag */
 Boolean                        beSilent;       /* -s flag */
 Boolean                        sysVmake;       /* -v flag */
-Boolean                        oldVars;        /* -V flag */
+Boolean                        oldVars;        /* variable substitution style */
 Boolean                        checkEnvFirst;  /* -e flag */
 Boolean                        checkEnvFirst;  /* -e flag */
-static Boolean         XFlag=FALSE;    /* -X flag given */
-static Boolean         xFlag=FALSE;    /* -x flag given */
-Boolean                        noExport;       /* Set TRUE if shouldn't export */
 static Boolean         jobsRunning;    /* TRUE if the jobs might be running */
 
 static Boolean         ReadMakefile();
 static Boolean         jobsRunning;    /* TRUE if the jobs might be running */
 
 static Boolean         ReadMakefile();
@@ -114,12 +111,6 @@ static Boolean             ReadMakefile();
  */
 static int     initOptInd;
 
  */
 static int     initOptInd;
 
-#ifdef CAN_EXPORT
-#define OPTSTR "BCD:I:J:L:MPSVWXd:ef:iknp:qrstvxh"
-#else
-#define OPTSTR "BCD:I:J:L:MPSVWd:ef:iknp:qrstvh"
-#endif
-
 static char        *help[] = {
 "-B            Be as backwards-compatible with make as possible without\n\
                being make.",
 static char        *help[] = {
 "-B            Be as backwards-compatible with make as possible without\n\
                being make.",
@@ -132,13 +123,7 @@ static char            *help[] = {
 "-M            Be Make as closely as possible.",
 "-P            Don't use pipes to catch the output of jobs, use files.",
 "-S            Turn off the -k flag (see below).",
 "-M            Be Make as closely as possible.",
 "-P            Don't use pipes to catch the output of jobs, use files.",
 "-S            Turn off the -k flag (see below).",
-#ifndef POSIX
-"-V            Use old-style variable substitution.",
-#endif
 "-W            Don't print warning messages.",
 "-W            Don't print warning messages.",
-#ifdef CAN_EXPORT
-"-X            Turn off exporting of commands.",
-#endif
 "-d<flags>     Turn on debugging output.",
 "-e            Give environment variables precedence over those in the\n\
                makefile(s).",
 "-d<flags>     Turn on debugging output.",
 "-e            Give environment variables precedence over those in the\n\
                makefile(s).",
@@ -153,10 +138,7 @@ static char            *help[] = {
 "-r            Do not read the system makefile for pre-defined rules.",
 "-s            Don't print commands as they are executed.",
 "-t            Update targets by \"touching\" them (see touch(1)).",
 "-r            Do not read the system makefile for pre-defined rules.",
 "-s            Don't print commands as they are executed.",
 "-t            Update targets by \"touching\" them (see touch(1)).",
-"-v            Be compatible with System V make. Implies -B, -V.",
-#ifdef CAN_EXPORT
-"-x            Allow exportation of commands.",
-#endif
+"-v            Be compatible with System V make. Implies -B.",
 };
 
 
 };
 
 
@@ -189,14 +171,14 @@ MainParseArgs (argc, argv)
 
     optind = initOptInd;
 
 
     optind = initOptInd;
 
-    while((c = getopt(argc, argv, OPTSTR)) != -1) {
+    while((c = getopt(argc, argv, "BCD:I:J:L:MPSWd:ef:iknp:qrstvh")) != -1) {
        switch(c) {
            case 'B':
        switch(c) {
            case 'B':
-               backwards = oldVars = TRUE;
+               backwards = TRUE;
                Var_Append(MAKEFLAGS, "-B", VAR_GLOBAL);
                break;
            case 'C':
                Var_Append(MAKEFLAGS, "-B", VAR_GLOBAL);
                break;
            case 'C':
-               oldVars = backwards = sysVmake = amMake = FALSE;
+               backwards = sysVmake = amMake = FALSE;
                Var_Append(MAKEFLAGS, "-C", VAR_GLOBAL);
                break;
            case 'D':
                Var_Append(MAKEFLAGS, "-C", VAR_GLOBAL);
                break;
            case 'D':
@@ -231,18 +213,10 @@ MainParseArgs (argc, argv)
                keepgoing = FALSE;
                Var_Append(MAKEFLAGS, "-S", VAR_GLOBAL);
                break;
                keepgoing = FALSE;
                Var_Append(MAKEFLAGS, "-S", VAR_GLOBAL);
                break;
-           case 'V':
-               oldVars = TRUE;
-               Var_Append(MAKEFLAGS, "-V", VAR_GLOBAL);
-               break;
            case 'W':
                noWarnings = TRUE;
                Var_Append(MAKEFLAGS, "-W", VAR_GLOBAL);
                break;
            case 'W':
                noWarnings = TRUE;
                Var_Append(MAKEFLAGS, "-W", VAR_GLOBAL);
                break;
-           case 'X':
-               XFlag = TRUE;
-               Var_Append(MAKEFLAGS, "-X", VAR_GLOBAL);
-               break;
            case 'd':
            {
                char    *modules = optarg;
            case 'd':
            {
                char    *modules = optarg;
@@ -330,7 +304,7 @@ MainParseArgs (argc, argv)
                Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL);
                break;
            case 'v':
                Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL);
                break;
            case 'v':
-               sysVmake = oldVars = backwards = TRUE;
+               sysVmake = backwards = TRUE;
                Var_Append(MAKEFLAGS, "-v", VAR_GLOBAL);
                break;
            case 'h':
                Var_Append(MAKEFLAGS, "-v", VAR_GLOBAL);
                break;
            case 'h':
@@ -352,9 +326,7 @@ MainParseArgs (argc, argv)
     if (amMake) {
        backwards = TRUE;
     }
     if (amMake) {
        backwards = TRUE;
     }
-    if (backwards) {
-       oldVars = TRUE;
-    }
+    oldVars = TRUE;
 
     /*
      * See if the rest of the arguments are variable assignments and perform
 
     /*
      * See if the rest of the arguments are variable assignments and perform
@@ -481,13 +453,11 @@ main (argc, argv)
     if (strcmp (cp, "make") == 0) {
        amMake = TRUE;          /* Be like make */
        backwards = TRUE;       /* Do things the old-fashioned way */
     if (strcmp (cp, "make") == 0) {
        amMake = TRUE;          /* Be like make */
        backwards = TRUE;       /* Do things the old-fashioned way */
-       oldVars = TRUE;         /* Same with variables */
     } else if (strcmp(cp, "smake") == 0 || strcmp(cp, "vmake") == 0) {
     } else if (strcmp(cp, "smake") == 0 || strcmp(cp, "vmake") == 0) {
-       sysVmake = oldVars = backwards = TRUE;
+       sysVmake = backwards = TRUE;
     } else {
        amMake = FALSE;
        backwards = FALSE;      /* Do things MY way, not MAKE's */
     } else {
        amMake = FALSE;
        backwards = FALSE;      /* Do things MY way, not MAKE's */
-       oldVars = TRUE;
     }
 
     /*
     }
 
     /*
@@ -583,20 +553,6 @@ main (argc, argv)
 #endif
     }
 
 #endif
     }
 
-    /*
-     * Figure "noExport" out based on the current mode. Since exporting each
-     * command in make mode is rather inefficient, we only export if the -x
-     * flag was given. In regular mode though, we only refuse to export if
-     * -X was given. In case the operative flag was given in the environment,
-     * however, the opposite one may be given on the command line and cancel
-     * the action.
-     */
-    if (amMake) {
-       noExport = !xFlag || XFlag;
-    } else {
-       noExport = XFlag && !xFlag;
-    }
-    
     Var_Append ("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL), VAR_GLOBAL);
 
     /*
     Var_Append ("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL), VAR_GLOBAL);
 
     /*
@@ -662,8 +618,6 @@ main (argc, argv)
        Targ_PrintGraph (1);
     }
 
        Targ_PrintGraph (1);
     }
 
-    Rmt_Init();
-
     /*
      * Have now read the entire graph and need to make a list of targets to
      * create. If none was given on the command line, we consult the parsing
     /*
      * Have now read the entire graph and need to make a list of targets to
      * create. If none was given on the command line, we consult the parsing
index 6932cc2..7e30f14 100644 (file)
@@ -19,7 +19,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)make.h      5.4 (Berkeley) %G%
+ *     @(#)make.h      5.5 (Berkeley) %G%
  */
 
 /*-
  */
 
 /*-
@@ -156,20 +156,11 @@ typedef struct GNode {
                                     * state of the -n or -t flags */
 #define OP_JOIN        0x00000400  /* Target is out-of-date only if any of its
                                     * children was out-of-date */
                                     * state of the -n or -t flags */
 #define OP_JOIN        0x00000400  /* Target is out-of-date only if any of its
                                     * children was out-of-date */
-#define OP_EXPORT      0x00000800  /* UNUSED: The creation of the target
-                                    * should be sent somewhere else, if
-                                    * possible. */
-#define OP_NOEXPORT    0x00001000  /* The creation should not be sent
-                                    * elsewhere */
-#define OP_EXPORTSAME  0x00002000  /* Export only to machine with same
-                                    * architecture */
 #define OP_INVISIBLE   0x00004000  /* The node is invisible to its parents.
                                     * I.e. it doesn't show up in the parents's
                                     * local variables. */
 #define OP_NOTMAIN     0x00008000  /* The node is exempt from normal 'main
                                     * target' processing in parse.c */
 #define OP_INVISIBLE   0x00004000  /* The node is invisible to its parents.
                                     * I.e. it doesn't show up in the parents's
                                     * local variables. */
 #define OP_NOTMAIN     0x00008000  /* The node is exempt from normal 'main
                                     * target' processing in parse.c */
-/*XXX*/
-#define OP_M68020      0x00010000  /* Command must be run on a 68020 */
 /* Attributes applied by PMake */
 #define OP_TRANSFORM   0x80000000  /* The node is a transformation rule */
 #define OP_MEMBER      0x40000000  /* Target is a member of an archive */
 /* Attributes applied by PMake */
 #define OP_TRANSFORM   0x80000000  /* The node is a transformation rule */
 #define OP_MEMBER      0x40000000  /* Target is a member of an archive */
@@ -282,7 +273,6 @@ extern Boolean      queryFlag;      /* TRUE if we aren't supposed to really make
                                 * of-date */
 
 extern Boolean noWarnings;     /* TRUE if should not print warning messages */
                                 * of-date */
 
 extern Boolean noWarnings;     /* TRUE if should not print warning messages */
-extern Boolean  noExport;      /* TRUE if should not export any jobs */
 extern Boolean checkEnvFirst;  /* TRUE if environment should be searched for
                                 * variables before the global context */
 
 extern Boolean checkEnvFirst;  /* TRUE if environment should be searched for
                                 * variables before the global context */
 
@@ -344,12 +334,6 @@ extern int         debug;
  */
 #include       "nonints.h"
 
  */
 #include       "nonints.h"
 
-#ifdef Sprite
-#define Str_FindSubstring(s1, s2) strstr(s1, s2)
-#endif /* Sprite */
-
-extern char *index();
-extern char *rindex();
 extern char *malloc();
 
 #endif _MAKE_H_
 extern char *malloc();
 
 #endif _MAKE_H_
index 1ca5b7a..f984cc1 100644 (file)
@@ -24,13 +24,6 @@ int  Make_HandleUse ();
 void   Make_Update ();
 void   Make_DoAllVar ();
 Boolean        Make_Run ();
 void   Make_Update ();
 void   Make_DoAllVar ();
 Boolean        Make_Run ();
-void   Rmt_Init();
-void   Rmt_AddServer ();
-Boolean        Rmt_Begin ();
-void   Rmt_Exec ();
-Boolean        Rmt_ReExport();
-int    Rmt_LastID();
-void   Rmt_Done ();
 void   Job_Touch ();
 Boolean        Job_CheckCommands ();
 void   Job_CatchChildren ();
 void   Job_Touch ();
 Boolean        Job_CheckCommands ();
 void   Job_CatchChildren ();
@@ -50,7 +43,6 @@ void  Punt ();
 void   DieHorribly ();
 void   Finish ();
 void   Parse_Error ();
 void   DieHorribly ();
 void   Finish ();
 void   Parse_Error ();
-Boolean        Parse_AnyExport();
 Boolean        Parse_IsVar ();
 void   Parse_DoVar ();
 void   Parse_AddIncludeDir ();
 Boolean        Parse_IsVar ();
 void   Parse_DoVar ();
 void   Parse_AddIncludeDir ();
@@ -79,13 +71,6 @@ void Targ_SetMain ();
 int    Targ_PrintCmd ();
 char * Targ_FmtTime ();
 void   Targ_PrintType ();
 int    Targ_PrintCmd ();
 char * Targ_FmtTime ();
 void   Targ_PrintType ();
-void   Rmt_Init();
-void   Rmt_AddServer ();
-Boolean        Rmt_Begin ();
-Boolean        Rmt_ReExport();
-void   Rmt_Exec ();
-int    Rmt_LastID();
-void   Rmt_Done ();
 char * Str_Concat ();
 char **        Str_BreakString ();
 void   Str_FreeVec ();
 char * Str_Concat ();
 char **        Str_BreakString ();
 void   Str_FreeVec ();
index 63e37d9..f9248a1 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parse.c    5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)parse.c    5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -105,13 +105,6 @@ static Lst      includes;          /* stack of IFiles generated by
 Lst            parseIncPath;   /* list of directories for "..." includes */
 Lst            sysIncPath;     /* list of directories for <...> includes */
 
 Lst            parseIncPath;   /* list of directories for "..." includes */
 Lst            sysIncPath;     /* list of directories for <...> includes */
 
-/*-
- * anyExport is used to trace if any target will need exportation. If none
- * does, then any .EXPORT target can be ignored and the process needn't
- * be slowed down by trying to connect to some load-balancing system.
- */
-static Boolean anyExport = FALSE;
-
 /*-
  * specType contains the SPECial TYPE of the current target. It is
  * Not if the target is unspecial. If it *is* special, however, the children
 /*-
  * specType contains the SPECial TYPE of the current target. It is
  * Not if the target is unspecial. If it *is* special, however, the children
@@ -122,7 +115,6 @@ typedef enum {
     Begin,         /* .BEGIN */
     Default,       /* .DEFAULT */
     End,           /* .END */
     Begin,         /* .BEGIN */
     Default,       /* .DEFAULT */
     End,           /* .END */
-    Export,        /* .EXPORT */
     Ignore,        /* .IGNORE */
     Includes,      /* .INCLUDES */
     Interrupt,     /* .INTERRUPT */
     Ignore,        /* .IGNORE */
     Includes,      /* .INCLUDES */
     Interrupt,     /* .INTERRUPT */
@@ -130,7 +122,6 @@ typedef enum {
     MFlags,        /* .MFLAGS or .MAKEFLAGS */
     Main,          /* .MAIN and we don't have anything user-specified to
                     * make */
     MFlags,        /* .MFLAGS or .MAKEFLAGS */
     Main,          /* .MAIN and we don't have anything user-specified to
                     * make */
-    NoExport,      /* .NOEXPORT */
     Not,           /* Not special */
     NotParallel,    /* .NOTPARALELL */
     Null,          /* .NULL */
     Not,           /* Not special */
     NotParallel,    /* .NOTPARALELL */
     Null,          /* .NULL */
@@ -169,20 +160,16 @@ static struct {
 { ".DONTCARE",   Attribute,    OP_DONTCARE },
 { ".END",        End,          0 },
 { ".EXEC",       Attribute,    OP_EXEC },
 { ".DONTCARE",   Attribute,    OP_DONTCARE },
 { ".END",        End,          0 },
 { ".EXEC",       Attribute,    OP_EXEC },
-{ ".EXPORT",     Export,       OP_EXPORT },
-{ ".EXPORTSAME",  Attribute,   OP_EXPORTSAME },
 { ".IGNORE",     Ignore,       OP_IGNORE },
 { ".INCLUDES",   Includes,     0 },
 { ".INTERRUPT",          Interrupt,    0 },
 { ".INVISIBLE",          Attribute,    OP_INVISIBLE },
 { ".JOIN",       Attribute,    OP_JOIN },
 { ".LIBS",       Libs,         0 },
 { ".IGNORE",     Ignore,       OP_IGNORE },
 { ".INCLUDES",   Includes,     0 },
 { ".INTERRUPT",          Interrupt,    0 },
 { ".INVISIBLE",          Attribute,    OP_INVISIBLE },
 { ".JOIN",       Attribute,    OP_JOIN },
 { ".LIBS",       Libs,         0 },
-{ ".M68020",     Attribute,    OP_M68020 },
 { ".MAIN",       Main,         0 },
 { ".MAKE",       Attribute,    OP_MAKE },
 { ".MAKEFLAGS",          MFlags,       0 },
 { ".MFLAGS",     MFlags,       0 },
 { ".MAIN",       Main,         0 },
 { ".MAKE",       Attribute,    OP_MAKE },
 { ".MAKEFLAGS",          MFlags,       0 },
 { ".MFLAGS",     MFlags,       0 },
-{ ".NOEXPORT",   NoExport,     OP_NOEXPORT },
 { ".NOTMAIN",    Attribute,    OP_NOTMAIN },
 { ".NOTPARALLEL", NotParallel, 0 },
 { ".NULL",       Null,         0 },
 { ".NOTMAIN",    Attribute,    OP_NOTMAIN },
 { ".NOTPARALLEL", NotParallel, 0 },
 { ".NULL",       Null,         0 },
@@ -273,25 +260,6 @@ Parse_Error (type, fmt, arg1, arg2)
     }
 }
 
     }
 }
 
-/*-
- *-----------------------------------------------------------------------
- * Parse_AnyExport --
- *     Return TRUE if any target was labeled for exportation.
- *
- * Results:
- *     TRUE or FALSE...
- *
- * Side Effects:
- *     None.
- *
- *-----------------------------------------------------------------------
- */
-Boolean
-Parse_AnyExport()
-{
-    return (anyExport);
-}
-
 /*-
  *---------------------------------------------------------------------
  * ParseLinkSrc  --
 /*-
  *---------------------------------------------------------------------
  * ParseLinkSrc  --
@@ -433,9 +401,6 @@ ParseDoSrc (tOp, src)
     }
     if (op != 0) {
        Lst_ForEach (targets, ParseDoOp, (ClientData)op);
     }
     if (op != 0) {
        Lst_ForEach (targets, ParseDoOp, (ClientData)op);
-       if (op == OP_EXPORT) {
-           anyExport = TRUE;
-       }
     } else if (specType == Main) {
        /*
         * If we have noted the existence of a .MAIN, it means we need
     } else if (specType == Main) {
        /*
         * If we have noted the existence of a .MAIN, it means we need
@@ -706,9 +671,6 @@ ParseDoDependency (line)
                 * Certain special targets have special semantics:
                 *      .PATH           Have to set the dirSearchPath
                 *                      variable too
                 * Certain special targets have special semantics:
                 *      .PATH           Have to set the dirSearchPath
                 *                      variable too
-                *      .EXPORT         Doesn't really apply the
-                *                      .EXPORT operator to its
-                *                      sources, so we reset tOp.
                 *      .MAIN           Its sources are only used if
                 *                      nothing has been specified to
                 *                      create.
                 *      .MAIN           Its sources are only used if
                 *                      nothing has been specified to
                 *                      create.
@@ -739,9 +701,6 @@ ParseDoDependency (line)
                        }
                        (void)Lst_AtEnd(paths, (ClientData)dirSearchPath);
                        break;
                        }
                        (void)Lst_AtEnd(paths, (ClientData)dirSearchPath);
                        break;
-                   case Export:
-                       tOp = 0;
-                       break;
                    case Main:
                        if (!Lst_IsEmpty(create)) {
                            specType = Not;
                    case Main:
                        if (!Lst_IsEmpty(create)) {
                            specType = Not;
@@ -927,7 +886,6 @@ ParseDoDependency (line)
      * a .IGNORE line ignores errors for all targets
      * a .SILENT line creates silence when making all targets
      * a .PATH removes all directories from the search path(s).
      * a .IGNORE line ignores errors for all targets
      * a .SILENT line creates silence when making all targets
      * a .PATH removes all directories from the search path(s).
-     * a .NOEXPORT turns off exportation for all jobs.
      */
     if (!*line) {
        switch (specType) {
      */
     if (!*line) {
        switch (specType) {
@@ -946,9 +904,6 @@ ParseDoDependency (line)
            case Path:
                Lst_ForEach(paths, ParseClearPath, (ClientData)NULL);
                break;
            case Path:
                Lst_ForEach(paths, ParseClearPath, (ClientData)NULL);
                break;
-           case NoExport:
-               noExport = TRUE;
-               break;
        }
     } else if (specType == MFlags) {
        /*
        }
     } else if (specType == MFlags) {
        /*
@@ -973,7 +928,7 @@ ParseDoDependency (line)
      */
     if ((specType == Suffixes) || (specType == Path) ||
        (specType == Includes) || (specType == Libs) ||
      */
     if ((specType == Suffixes) || (specType == Path) ||
        (specType == Includes) || (specType == Libs) ||
-       (specType == Export)   || (specType == Null))
+       (specType == Null))
     {
        while (*line) {
            /*
     {
        while (*line) {
            /*
@@ -997,9 +952,6 @@ ParseDoDependency (line)
             * files which are considered libraries and whose search path
             * should be present in the .LIBS variable.
             *
             * files which are considered libraries and whose search path
             * should be present in the .LIBS variable.
             *
-            * If it was .EXPORT, the source is the location of the export
-            * server and is passed to the Rmt module as such.
-            *
             * If it was .NULL, the source is the suffix to use when a file
             * has no valid suffix.
             */
             * If it was .NULL, the source is the suffix to use when a file
             * has no valid suffix.
             */
@@ -1022,9 +974,6 @@ ParseDoDependency (line)
                case Libs:
                    Suff_AddLib (line);
                    break;
                case Libs:
                    Suff_AddLib (line);
                    break;
-               case Export:
-                   Rmt_AddServer (line);
-                   break;
                case Null:
                    Suff_SetNull (line);
                    break;
                case Null:
                    Suff_SetNull (line);
                    break;
index 79fbf9e..ca7611a 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)targ.c     5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)targ.c     5.4 (Berkeley) %G%";
 #endif /* not lint */
 
 /*-
 #endif /* not lint */
 
 /*-
@@ -426,13 +426,9 @@ Targ_PrintType (type)
            PRINTBIT(SILENT);
            PRINTBIT(MAKE);
            PRINTBIT(JOIN);
            PRINTBIT(SILENT);
            PRINTBIT(MAKE);
            PRINTBIT(JOIN);
-           PRINTBIT(EXPORT);
-           PRINTBIT(NOEXPORT);
-           PRINTBIT(EXPORTSAME);
            PRINTBIT(INVISIBLE);
            PRINTBIT(NOTMAIN);
            PRINTDBIT(LIB);
            PRINTBIT(INVISIBLE);
            PRINTBIT(NOTMAIN);
            PRINTDBIT(LIB);
-           PRINTBIT(M68020);
            /*XXX: MEMBER is defined, so CONCAT(OP_,MEMBER) gives OP_"%" */
            case OP_MEMBER: if (DEBUG(TARG)) printf(".MEMBER "); break;
            PRINTDBIT(ARCHV);
            /*XXX: MEMBER is defined, so CONCAT(OP_,MEMBER) gives OP_"%" */
            case OP_MEMBER: if (DEBUG(TARG)) printf(".MEMBER "); break;
            PRINTDBIT(ARCHV);