1 /* $NetBSD: compat.c,v 1.103 2016/01/17 17:45:21 christos Exp $ */ 2 3 /* 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. Neither the name of the University nor the names of its contributors 19 * may be used to endorse or promote products derived from this software 20 * without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35 /* 36 * Copyright (c) 1988, 1989 by Adam de Boor 37 * Copyright (c) 1989 by Berkeley Softworks 38 * All rights reserved. 39 * 40 * This code is derived from software contributed to Berkeley by 41 * Adam de Boor. 42 * 43 * Redistribution and use in source and binary forms, with or without 44 * modification, are permitted provided that the following conditions 45 * are met: 46 * 1. Redistributions of source code must retain the above copyright 47 * notice, this list of conditions and the following disclaimer. 48 * 2. Redistributions in binary form must reproduce the above copyright 49 * notice, this list of conditions and the following disclaimer in the 50 * documentation and/or other materials provided with the distribution. 51 * 3. All advertising materials mentioning features or use of this software 52 * must display the following acknowledgement: 53 * This product includes software developed by the University of 54 * California, Berkeley and its contributors. 55 * 4. Neither the name of the University nor the names of its contributors 56 * may be used to endorse or promote products derived from this software 57 * without specific prior written permission. 58 * 59 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 62 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69 * SUCH DAMAGE. 70 */ 71 72 #ifndef MAKE_NATIVE 73 static char rcsid[] = "$NetBSD: compat.c,v 1.103 2016/01/17 17:45:21 christos Exp $"; 74 #else 75 #include <sys/cdefs.h> 76 #ifndef lint 77 #if 0 78 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; 79 #else 80 __RCSID("$NetBSD: compat.c,v 1.103 2016/01/17 17:45:21 christos Exp $"); 81 #endif 82 #endif /* not lint */ 83 #endif 84 85 /*- 86 * compat.c -- 87 * The routines in this file implement the full-compatibility 88 * mode of PMake. Most of the special functionality of PMake 89 * is available in this mode. Things not supported: 90 * - different shells. 91 * - friendly variable substitution. 92 * 93 * Interface: 94 * Compat_Run Initialize things for this module and recreate 95 * thems as need creatin' 96 */ 97 98 #include <sys/types.h> 99 #include <sys/stat.h> 100 #include <sys/wait.h> 101 102 #include <ctype.h> 103 #include <errno.h> 104 #include <signal.h> 105 #include <stdio.h> 106 107 #include "make.h" 108 #include "hash.h" 109 #include "dir.h" 110 #include "job.h" 111 #include "metachar.h" 112 #include "pathnames.h" 113 114 115 static GNode *curTarg = NULL; 116 static GNode *ENDNode; 117 static void CompatInterrupt(int); 118 119 /*- 120 *----------------------------------------------------------------------- 121 * CompatInterrupt -- 122 * Interrupt the creation of the current target and remove it if 123 * it ain't precious. 124 * 125 * Results: 126 * None. 127 * 128 * Side Effects: 129 * The target is removed and the process exits. If .INTERRUPT exists, 130 * its commands are run first WITH INTERRUPTS IGNORED.. 131 * 132 *----------------------------------------------------------------------- 133 */ 134 static void 135 CompatInterrupt(int signo) 136 { 137 GNode *gn; 138 139 if ((curTarg != NULL) && !Targ_Precious (curTarg)) { 140 char *p1; 141 char *file = Var_Value(TARGET, curTarg, &p1); 142 143 if (!noExecute && eunlink(file) != -1) { 144 Error("*** %s removed", file); 145 } 146 147 free(p1); 148 149 /* 150 * Run .INTERRUPT only if hit with interrupt signal 151 */ 152 if (signo == SIGINT) { 153 gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); 154 if (gn != NULL) { 155 Compat_Make(gn, gn); 156 } 157 } 158 159 } 160 if (signo == SIGQUIT) 161 _exit(signo); 162 bmake_signal(signo, SIG_DFL); 163 kill(myPid, signo); 164 } 165 166 /*- 167 *----------------------------------------------------------------------- 168 * CompatRunCommand -- 169 * Execute the next command for a target. If the command returns an 170 * error, the node's made field is set to ERROR and creation stops. 171 * 172 * Input: 173 * cmdp Command to execute 174 * gnp Node from which the command came 175 * 176 * Results: 177 * 0 if the command succeeded, 1 if an error occurred. 178 * 179 * Side Effects: 180 * The node's 'made' field may be set to ERROR. 181 * 182 *----------------------------------------------------------------------- 183 */ 184 int 185 CompatRunCommand(void *cmdp, void *gnp) 186 { 187 char *cmdStart; /* Start of expanded command */ 188 char *cp, *bp; 189 Boolean silent, /* Don't print command */ 190 doIt; /* Execute even if -n */ 191 volatile Boolean errCheck; /* Check errors */ 192 int reason; /* Reason for child's death */ 193 int status; /* Description of child's death */ 194 pid_t cpid; /* Child actually found */ 195 pid_t retstat; /* Result of wait */ 196 LstNode cmdNode; /* Node where current command is located */ 197 const char ** volatile av; /* Argument vector for thing to exec */ 198 char ** volatile mav;/* Copy of the argument vector for freeing */ 199 int argc; /* Number of arguments in av or 0 if not 200 * dynamically allocated */ 201 Boolean local; /* TRUE if command should be executed 202 * locally */ 203 Boolean useShell; /* TRUE if command should be executed 204 * using a shell */ 205 char * volatile cmd = (char *)cmdp; 206 GNode *gn = (GNode *)gnp; 207 208 silent = gn->type & OP_SILENT; 209 errCheck = !(gn->type & OP_IGNORE); 210 doIt = FALSE; 211 212 cmdNode = Lst_Member(gn->commands, cmd); 213 cmdStart = Var_Subst(NULL, cmd, gn, FALSE, TRUE, FALSE); 214 215 /* 216 * brk_string will return an argv with a NULL in av[0], thus causing 217 * execvp to choke and die horribly. Besides, how can we execute a null 218 * command? In any case, we warn the user that the command expanded to 219 * nothing (is this the right thing to do?). 220 */ 221 222 if (*cmdStart == '\0') { 223 free(cmdStart); 224 return(0); 225 } 226 cmd = cmdStart; 227 Lst_Replace(cmdNode, cmdStart); 228 229 if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { 230 (void)Lst_AtEnd(ENDNode->commands, cmdStart); 231 return(0); 232 } 233 if (strcmp(cmdStart, "...") == 0) { 234 gn->type |= OP_SAVE_CMDS; 235 return(0); 236 } 237 238 while ((*cmd == '@') || (*cmd == '-') || (*cmd == '+')) { 239 switch (*cmd) { 240 case '@': 241 silent = DEBUG(LOUD) ? FALSE : TRUE; 242 break; 243 case '-': 244 errCheck = FALSE; 245 break; 246 case '+': 247 doIt = TRUE; 248 if (!shellName) /* we came here from jobs */ 249 Shell_Init(); 250 break; 251 } 252 cmd++; 253 } 254 255 while (isspace((unsigned char)*cmd)) 256 cmd++; 257 258 /* 259 * If we did not end up with a command, just skip it. 260 */ 261 if (!*cmd) 262 return (0); 263 264 #if !defined(MAKE_NATIVE) 265 /* 266 * In a non-native build, the host environment might be weird enough 267 * that it's necessary to go through a shell to get the correct 268 * behaviour. Or perhaps the shell has been replaced with something 269 * that does extra logging, and that should not be bypassed. 270 */ 271 useShell = TRUE; 272 #else 273 /* 274 * Search for meta characters in the command. If there are no meta 275 * characters, there's no need to execute a shell to execute the 276 * command. 277 * 278 * Additionally variable assignments and empty commands 279 * go to the shell. Therefore treat '=' and ':' like shell 280 * meta characters as documented in make(1). 281 */ 282 283 useShell = needshell(cmd, FALSE); 284 #endif 285 286 /* 287 * Print the command before echoing if we're not supposed to be quiet for 288 * this one. We also print the command if -n given. 289 */ 290 if (!silent || NoExecute(gn)) { 291 printf("%s\n", cmd); 292 fflush(stdout); 293 } 294 295 /* 296 * If we're not supposed to execute any commands, this is as far as 297 * we go... 298 */ 299 if (!doIt && NoExecute(gn)) { 300 return (0); 301 } 302 if (DEBUG(JOB)) 303 fprintf(debug_file, "Execute: '%s'\n", cmd); 304 305 again: 306 if (useShell) { 307 /* 308 * We need to pass the command off to the shell, typically 309 * because the command contains a "meta" character. 310 */ 311 static const char *shargv[5]; 312 int shargc; 313 314 shargc = 0; 315 shargv[shargc++] = shellPath; 316 /* 317 * The following work for any of the builtin shell specs. 318 */ 319 if (errCheck && shellErrFlag) { 320 shargv[shargc++] = shellErrFlag; 321 } 322 if (DEBUG(SHELL)) 323 shargv[shargc++] = "-xc"; 324 else 325 shargv[shargc++] = "-c"; 326 shargv[shargc++] = cmd; 327 shargv[shargc++] = NULL; 328 av = shargv; 329 argc = 0; 330 bp = NULL; 331 mav = NULL; 332 } else { 333 /* 334 * No meta-characters, so no need to exec a shell. Break the command 335 * into words to form an argument vector we can execute. 336 */ 337 mav = brk_string(cmd, &argc, TRUE, &bp); 338 if (mav == NULL) { 339 useShell = 1; 340 goto again; 341 } 342 av = (void *)mav; 343 } 344 345 local = TRUE; 346 347 #ifdef USE_META 348 if (useMeta) { 349 meta_compat_start(); 350 } 351 #endif 352 353 /* 354 * Fork and execute the single command. If the fork fails, we abort. 355 */ 356 cpid = vFork(); 357 if (cpid < 0) { 358 Fatal("Could not fork"); 359 } 360 if (cpid == 0) { 361 Var_ExportVars(); 362 #ifdef USE_META 363 if (useMeta) { 364 meta_compat_child(); 365 } 366 #endif 367 if (local) 368 (void)execvp(av[0], (char *const *)UNCONST(av)); 369 else 370 (void)execv(av[0], (char *const *)UNCONST(av)); 371 execError("exec", av[0]); 372 _exit(1); 373 } 374 375 free(mav); 376 free(bp); 377 378 Lst_Replace(cmdNode, NULL); 379 380 #ifdef USE_META 381 if (useMeta) { 382 meta_compat_parent(); 383 } 384 #endif 385 386 /* 387 * The child is off and running. Now all we can do is wait... 388 */ 389 while (1) { 390 391 while ((retstat = wait(&reason)) != cpid) { 392 if (retstat > 0) 393 JobReapChild(retstat, reason, FALSE); /* not ours? */ 394 if (retstat == -1 && errno != EINTR) { 395 break; 396 } 397 } 398 399 if (retstat > -1) { 400 if (WIFSTOPPED(reason)) { 401 status = WSTOPSIG(reason); /* stopped */ 402 } else if (WIFEXITED(reason)) { 403 status = WEXITSTATUS(reason); /* exited */ 404 #if defined(USE_META) && defined(USE_FILEMON_ONCE) 405 if (useMeta) { 406 meta_cmd_finish(NULL); 407 } 408 #endif 409 if (status != 0) { 410 if (DEBUG(ERROR)) { 411 fprintf(debug_file, "\n*** Failed target: %s\n*** Failed command: ", 412 gn->name); 413 for (cp = cmd; *cp; ) { 414 if (isspace((unsigned char)*cp)) { 415 fprintf(debug_file, " "); 416 while (isspace((unsigned char)*cp)) 417 cp++; 418 } else { 419 fprintf(debug_file, "%c", *cp); 420 cp++; 421 } 422 } 423 fprintf(debug_file, "\n"); 424 } 425 printf("*** Error code %d", status); 426 } 427 } else { 428 status = WTERMSIG(reason); /* signaled */ 429 printf("*** Signal %d", status); 430 } 431 432 433 if (!WIFEXITED(reason) || (status != 0)) { 434 if (errCheck) { 435 #ifdef USE_META 436 if (useMeta) { 437 meta_job_error(NULL, gn, 0, status); 438 } 439 #endif 440 gn->made = ERROR; 441 if (keepgoing) { 442 /* 443 * Abort the current target, but let others 444 * continue. 445 */ 446 printf(" (continuing)\n"); 447 } 448 } else { 449 /* 450 * Continue executing commands for this target. 451 * If we return 0, this will happen... 452 */ 453 printf(" (ignored)\n"); 454 status = 0; 455 } 456 } 457 break; 458 } else { 459 Fatal("error in wait: %d: %s", retstat, strerror(errno)); 460 /*NOTREACHED*/ 461 } 462 } 463 free(cmdStart); 464 465 return (status); 466 } 467 468 /*- 469 *----------------------------------------------------------------------- 470 * Compat_Make -- 471 * Make a target. 472 * 473 * Input: 474 * gnp The node to make 475 * pgnp Parent to abort if necessary 476 * 477 * Results: 478 * 0 479 * 480 * Side Effects: 481 * If an error is detected and not being ignored, the process exits. 482 * 483 *----------------------------------------------------------------------- 484 */ 485 int 486 Compat_Make(void *gnp, void *pgnp) 487 { 488 GNode *gn = (GNode *)gnp; 489 GNode *pgn = (GNode *)pgnp; 490 491 if (!shellName) /* we came here from jobs */ 492 Shell_Init(); 493 if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) { 494 /* 495 * First mark ourselves to be made, then apply whatever transformations 496 * the suffix module thinks are necessary. Once that's done, we can 497 * descend and make all our children. If any of them has an error 498 * but the -k flag was given, our 'make' field will be set FALSE again. 499 * This is our signal to not attempt to do anything but abort our 500 * parent as well. 501 */ 502 gn->flags |= REMAKE; 503 gn->made = BEINGMADE; 504 if ((gn->type & OP_MADE) == 0) 505 Suff_FindDeps(gn); 506 Lst_ForEach(gn->children, Compat_Make, gn); 507 if ((gn->flags & REMAKE) == 0) { 508 gn->made = ABORTED; 509 pgn->flags &= ~REMAKE; 510 goto cohorts; 511 } 512 513 if (Lst_Member(gn->iParents, pgn) != NULL) { 514 char *p1; 515 Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); 516 free(p1); 517 } 518 519 /* 520 * All the children were made ok. Now cmgn->mtime contains the 521 * modification time of the newest child, we need to find out if we 522 * exist and when we were modified last. The criteria for datedness 523 * are defined by the Make_OODate function. 524 */ 525 if (DEBUG(MAKE)) { 526 fprintf(debug_file, "Examining %s...", gn->name); 527 } 528 if (! Make_OODate(gn)) { 529 gn->made = UPTODATE; 530 if (DEBUG(MAKE)) { 531 fprintf(debug_file, "up-to-date.\n"); 532 } 533 goto cohorts; 534 } else if (DEBUG(MAKE)) { 535 fprintf(debug_file, "out-of-date.\n"); 536 } 537 538 /* 539 * If the user is just seeing if something is out-of-date, exit now 540 * to tell him/her "yes". 541 */ 542 if (queryFlag) { 543 exit(1); 544 } 545 546 /* 547 * We need to be re-made. We also have to make sure we've got a $? 548 * variable. To be nice, we also define the $> variable using 549 * Make_DoAllVar(). 550 */ 551 Make_DoAllVar(gn); 552 553 /* 554 * Alter our type to tell if errors should be ignored or things 555 * should not be printed so CompatRunCommand knows what to do. 556 */ 557 if (Targ_Ignore(gn)) { 558 gn->type |= OP_IGNORE; 559 } 560 if (Targ_Silent(gn)) { 561 gn->type |= OP_SILENT; 562 } 563 564 if (Job_CheckCommands(gn, Fatal)) { 565 /* 566 * Our commands are ok, but we still have to worry about the -t 567 * flag... 568 */ 569 if (!touchFlag || (gn->type & OP_MAKE)) { 570 curTarg = gn; 571 #ifdef USE_META 572 if (useMeta && !NoExecute(gn)) { 573 meta_job_start(NULL, gn); 574 } 575 #endif 576 Lst_ForEach(gn->commands, CompatRunCommand, gn); 577 curTarg = NULL; 578 } else { 579 Job_Touch(gn, gn->type & OP_SILENT); 580 } 581 } else { 582 gn->made = ERROR; 583 } 584 #ifdef USE_META 585 if (useMeta && !NoExecute(gn)) { 586 meta_job_finish(NULL); 587 } 588 #endif 589 590 if (gn->made != ERROR) { 591 /* 592 * If the node was made successfully, mark it so, update 593 * its modification time and timestamp all its parents. Note 594 * that for .ZEROTIME targets, the timestamping isn't done. 595 * This is to keep its state from affecting that of its parent. 596 */ 597 gn->made = MADE; 598 pgn->flags |= Make_Recheck(gn) == 0 ? FORCE : 0; 599 if (!(gn->type & OP_EXEC)) { 600 pgn->flags |= CHILDMADE; 601 Make_TimeStamp(pgn, gn); 602 } 603 } else if (keepgoing) { 604 pgn->flags &= ~REMAKE; 605 } else { 606 PrintOnError(gn, "\n\nStop."); 607 exit(1); 608 } 609 } else if (gn->made == ERROR) { 610 /* 611 * Already had an error when making this beastie. Tell the parent 612 * to abort. 613 */ 614 pgn->flags &= ~REMAKE; 615 } else { 616 if (Lst_Member(gn->iParents, pgn) != NULL) { 617 char *p1; 618 Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0); 619 free(p1); 620 } 621 switch(gn->made) { 622 case BEINGMADE: 623 Error("Graph cycles through %s", gn->name); 624 gn->made = ERROR; 625 pgn->flags &= ~REMAKE; 626 break; 627 case MADE: 628 if ((gn->type & OP_EXEC) == 0) { 629 pgn->flags |= CHILDMADE; 630 Make_TimeStamp(pgn, gn); 631 } 632 break; 633 case UPTODATE: 634 if ((gn->type & OP_EXEC) == 0) { 635 Make_TimeStamp(pgn, gn); 636 } 637 break; 638 default: 639 break; 640 } 641 } 642 643 cohorts: 644 Lst_ForEach(gn->cohorts, Compat_Make, pgnp); 645 return (0); 646 } 647 648 /*- 649 *----------------------------------------------------------------------- 650 * Compat_Run -- 651 * Initialize this mode and start making. 652 * 653 * Input: 654 * targs List of target nodes to re-create 655 * 656 * Results: 657 * None. 658 * 659 * Side Effects: 660 * Guess what? 661 * 662 *----------------------------------------------------------------------- 663 */ 664 void 665 Compat_Run(Lst targs) 666 { 667 GNode *gn = NULL;/* Current root target */ 668 int errors; /* Number of targets not remade due to errors */ 669 670 if (!shellName) 671 Shell_Init(); 672 673 if (bmake_signal(SIGINT, SIG_IGN) != SIG_IGN) { 674 bmake_signal(SIGINT, CompatInterrupt); 675 } 676 if (bmake_signal(SIGTERM, SIG_IGN) != SIG_IGN) { 677 bmake_signal(SIGTERM, CompatInterrupt); 678 } 679 if (bmake_signal(SIGHUP, SIG_IGN) != SIG_IGN) { 680 bmake_signal(SIGHUP, CompatInterrupt); 681 } 682 if (bmake_signal(SIGQUIT, SIG_IGN) != SIG_IGN) { 683 bmake_signal(SIGQUIT, CompatInterrupt); 684 } 685 686 ENDNode = Targ_FindNode(".END", TARG_CREATE); 687 ENDNode->type = OP_SPECIAL; 688 /* 689 * If the user has defined a .BEGIN target, execute the commands attached 690 * to it. 691 */ 692 if (!queryFlag) { 693 gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); 694 if (gn != NULL) { 695 Compat_Make(gn, gn); 696 if (gn->made == ERROR) { 697 PrintOnError(gn, "\n\nStop."); 698 exit(1); 699 } 700 } 701 } 702 703 /* 704 * Expand .USE nodes right now, because they can modify the structure 705 * of the tree. 706 */ 707 Make_ExpandUse(targs); 708 709 /* 710 * For each entry in the list of targets to create, call Compat_Make on 711 * it to create the thing. Compat_Make will leave the 'made' field of gn 712 * in one of several states: 713 * UPTODATE gn was already up-to-date 714 * MADE gn was recreated successfully 715 * ERROR An error occurred while gn was being created 716 * ABORTED gn was not remade because one of its inferiors 717 * could not be made due to errors. 718 */ 719 errors = 0; 720 while (!Lst_IsEmpty (targs)) { 721 gn = (GNode *)Lst_DeQueue(targs); 722 Compat_Make(gn, gn); 723 724 if (gn->made == UPTODATE) { 725 printf("`%s' is up to date.\n", gn->name); 726 } else if (gn->made == ABORTED) { 727 printf("`%s' not remade because of errors.\n", gn->name); 728 errors += 1; 729 } 730 } 731 732 /* 733 * If the user has defined a .END target, run its commands. 734 */ 735 if (errors == 0) { 736 Compat_Make(ENDNode, ENDNode); 737 if (gn->made == ERROR) { 738 PrintOnError(gn, "\n\nStop."); 739 exit(1); 740 } 741 } 742 } 743