Print this page
.PARALLEL implies everything else is to be run in serial.


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.


  24  */
  25 
  26 /*
  27  *      read.c
  28  *
  29  *      This file contains the makefile reader.
  30  */
  31 
  32 /*
  33  * Included files
  34  */
  35 #include <mk/defs.h>
  36 #include <mksh/dosys.h>           /* sh_command2string() */
  37 #include <mksh/macro.h>           /* expand_value() */
  38 #include <mksh/misc.h>            /* retmem() */
  39 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  40 #include <libintl.h>
  41 
  42 /*
  43  * Defined macros


1261                                  * .make.state file to be skipped.
1262                                  * This is currently not true - it is read
1263                                  * anyway.
1264                                  */
1265                                 warning(gettext("Version mismatch between current version `%s' and `%s'"),
1266                                         current_make_version->string_mb,
1267                                         depes->names[0]->string_mb);
1268                         }
1269                 }
1270                 break;
1271 
1272         case no_parallel_special:
1273                 if(svr4)
1274                   break;
1275                 /* Set the no_parallel bit for all the targets on */
1276                 /* the dependency list */
1277                 if (depes->used == 0) {
1278                         /* only those explicitly made parallel */
1279                         only_parallel = true;
1280                         all_parallel = false;



1281                 }
1282                 for (; depes != NULL; depes = depes->next) {
1283                         for (n = 0; n < depes->used; n++) {
1284                                 if (trace_reader) {
1285                                         (void) printf("%s:\t%s\n",
1286                                                       no_parallel_name->string_mb,
1287                                                       depes->names[n]->string_mb);
1288                                 }
1289                                 depes->names[n]->no_parallel = true;
1290                                 depes->names[n]->parallel = false;
1291                         }
1292                 }
1293                 break;
1294 
1295         case parallel_special:
1296                 if(svr4)
1297                   break;
1298                 if (depes->used == 0) {
1299                         /* everything runs in parallel */
1300                         all_parallel = true;
1301                         only_parallel = false;



1302                 }
1303                 /* Set the parallel bit for all the targets on */
1304                 /* the dependency list */
1305                 for (; depes != NULL; depes = depes->next) {
1306                         for (n = 0; n < depes->used; n++) {
1307                                 if (trace_reader) {
1308                                         (void) printf("%s:\t%s\n",
1309                                                       parallel_name->string_mb,
1310                                                       depes->names[n]->string_mb);
1311                                 }
1312                                 depes->names[n]->parallel = true;
1313                                 depes->names[n]->no_parallel = false;
1314                         }
1315                 }
1316                 break;
1317 
1318         case localhost_special:
1319                 if(svr4)
1320                   break;
1321                 /* Set the no_parallel bit for all the targets on */




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2017 RackTop Systems.
  26  */
  27 
  28 /*
  29  *      read.c
  30  *
  31  *      This file contains the makefile reader.
  32  */
  33 
  34 /*
  35  * Included files
  36  */
  37 #include <mk/defs.h>
  38 #include <mksh/dosys.h>           /* sh_command2string() */
  39 #include <mksh/macro.h>           /* expand_value() */
  40 #include <mksh/misc.h>            /* retmem() */
  41 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  42 #include <libintl.h>
  43 
  44 /*
  45  * Defined macros


1263                                  * .make.state file to be skipped.
1264                                  * This is currently not true - it is read
1265                                  * anyway.
1266                                  */
1267                                 warning(gettext("Version mismatch between current version `%s' and `%s'"),
1268                                         current_make_version->string_mb,
1269                                         depes->names[0]->string_mb);
1270                         }
1271                 }
1272                 break;
1273 
1274         case no_parallel_special:
1275                 if(svr4)
1276                   break;
1277                 /* Set the no_parallel bit for all the targets on */
1278                 /* the dependency list */
1279                 if (depes->used == 0) {
1280                         /* only those explicitly made parallel */
1281                         only_parallel = true;
1282                         all_parallel = false;
1283                 } else {
1284                         only_parallel = false;
1285                         all_parallel = true;
1286                 }
1287                 for (; depes != NULL; depes = depes->next) {
1288                         for (n = 0; n < depes->used; n++) {
1289                                 if (trace_reader) {
1290                                         (void) printf("%s:\t%s\n",
1291                                                       no_parallel_name->string_mb,
1292                                                       depes->names[n]->string_mb);
1293                                 }
1294                                 depes->names[n]->no_parallel = true;
1295                                 depes->names[n]->parallel = false;
1296                         }
1297                 }
1298                 break;
1299 
1300         case parallel_special:
1301                 if(svr4)
1302                   break;
1303                 if (depes->used == 0) {
1304                         /* everything runs in parallel */
1305                         all_parallel = true;
1306                         only_parallel = false;
1307                 } else {
1308                         all_parallel = false;
1309                         only_parallel = true;
1310                 }
1311                 /* Set the parallel bit for all the targets on */
1312                 /* the dependency list */
1313                 for (; depes != NULL; depes = depes->next) {
1314                         for (n = 0; n < depes->used; n++) {
1315                                 if (trace_reader) {
1316                                         (void) printf("%s:\t%s\n",
1317                                                       parallel_name->string_mb,
1318                                                       depes->names[n]->string_mb);
1319                                 }
1320                                 depes->names[n]->parallel = true;
1321                                 depes->names[n]->no_parallel = false;
1322                         }
1323                 }
1324                 break;
1325 
1326         case localhost_special:
1327                 if(svr4)
1328                   break;
1329                 /* Set the no_parallel bit for all the targets on */