Print this page
make: unifdef for other OSes (undefined)


  29  *      This file contains various unclassified routines. Some main groups:
  30  *              getname
  31  *              Memory allocation
  32  *              String handling
  33  *              Property handling
  34  *              Error message handling
  35  *              Make internal state dumping
  36  *              main routine support
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <errno.h>
  43 #include <mk/defs.h>
  44 #include <mksh/macro.h>           /* SETVAR() */
  45 #include <mksh/misc.h>            /* enable_interrupt() */
  46 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  47 #include <vroot/report.h> /* SUNPRO_DEPENDENCIES */
  48 
  49 #if defined(HP_UX) || defined(linux)
  50 #include <unistd.h>
  51 #endif
  52 
  53 #ifdef TEAMWARE_MAKE_CMN
  54 #define MAXJOBS_ADJUST_RFE4694000
  55 
  56 #ifdef MAXJOBS_ADJUST_RFE4694000
  57 extern void job_adjust_fini();
  58 #endif /* MAXJOBS_ADJUST_RFE4694000 */
  59 #endif /* TEAMWARE_MAKE_CMN */
  60 
  61 #if defined(linux)
  62 #include <time.h>         /* localtime() */
  63 #endif
  64 
  65 /*
  66  * Defined macros
  67  */
  68 
  69 /*
  70  * typedefs & structs
  71  */
  72 
  73 /*
  74  * Static variables
  75  */
  76 
  77 /*
  78  * File table of contents
  79  */
  80 static  void            print_rule(register Name target);
  81 static  void            print_target_n_deps(register Name target);
  82 
  83 /*****************************************


 706         dot_keep_state->special_reader = keep_state_special;
 707         dot_keep_state_file->special_reader = keep_state_file_special;
 708         ignore_name->special_reader = ignore_special;
 709         make_version->special_reader = make_version_special;
 710         no_parallel_name->special_reader = no_parallel_special;
 711         parallel_name->special_reader = parallel_special;
 712         localhost_name->special_reader = localhost_special;
 713         precious->special_reader = precious_special;
 714         sccs_get_name->special_reader = sccs_get_special;
 715         sccs_get_posix_name->special_reader = sccs_get_posix_special;
 716         get_name->special_reader = get_special;
 717         get_posix_name->special_reader = get_posix_special;
 718         silent_name->special_reader = silent_special;
 719         suffixes_name->special_reader = suffixes_special;
 720 
 721         /* The value of $$ is $ */
 722         (void) SETVAR(dollar, dollar, false);
 723         dollar->dollar = false;
 724 
 725         /* Set the value of $(SHELL) */
 726         #ifdef HP_UX
 727         MBSTOWCS(wcs_buffer, NOCATGETS("/bin/posix/sh"));
 728         #else
 729         if (posix) {
 730           MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh"));
 731         } else {
 732           MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh"));
 733         }
 734         #endif
 735         (void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
 736 
 737         /*
 738          * Use " FORCE" to simulate a FRC dependency for :: type
 739          * targets with no dependencies.
 740          */
 741         (void) append_prop(force, line_prop);
 742         force->stat.time = file_max_time;
 743 
 744         /* Make sure VPATH is defined before current dir is read */
 745         if ((cp = getenv(vpath_name->string_mb)) != NULL) {
 746                 MBSTOWCS(wcs_buffer, cp);
 747                 (void) SETVAR(vpath_name,
 748                               GETNAME(wcs_buffer, FIND_LENGTH),
 749                               false);
 750         }
 751 
 752         /* Check if there is NO PATH variable. If not we construct one. */
 753         if (getenv(path_name->string_mb) == NULL) {
 754                 vroot_path = NULL;




  29  *      This file contains various unclassified routines. Some main groups:
  30  *              getname
  31  *              Memory allocation
  32  *              String handling
  33  *              Property handling
  34  *              Error message handling
  35  *              Make internal state dumping
  36  *              main routine support
  37  */
  38 
  39 /*
  40  * Included files
  41  */
  42 #include <errno.h>
  43 #include <mk/defs.h>
  44 #include <mksh/macro.h>           /* SETVAR() */
  45 #include <mksh/misc.h>            /* enable_interrupt() */
  46 #include <stdarg.h>               /* va_list, va_start(), va_end() */
  47 #include <vroot/report.h> /* SUNPRO_DEPENDENCIES */
  48 



  49 
  50 #ifdef TEAMWARE_MAKE_CMN
  51 #define MAXJOBS_ADJUST_RFE4694000
  52 
  53 #ifdef MAXJOBS_ADJUST_RFE4694000
  54 extern void job_adjust_fini();
  55 #endif /* MAXJOBS_ADJUST_RFE4694000 */
  56 #endif /* TEAMWARE_MAKE_CMN */
  57 



  58 
  59 /*
  60  * Defined macros
  61  */
  62 
  63 /*
  64  * typedefs & structs
  65  */
  66 
  67 /*
  68  * Static variables
  69  */
  70 
  71 /*
  72  * File table of contents
  73  */
  74 static  void            print_rule(register Name target);
  75 static  void            print_target_n_deps(register Name target);
  76 
  77 /*****************************************


 700         dot_keep_state->special_reader = keep_state_special;
 701         dot_keep_state_file->special_reader = keep_state_file_special;
 702         ignore_name->special_reader = ignore_special;
 703         make_version->special_reader = make_version_special;
 704         no_parallel_name->special_reader = no_parallel_special;
 705         parallel_name->special_reader = parallel_special;
 706         localhost_name->special_reader = localhost_special;
 707         precious->special_reader = precious_special;
 708         sccs_get_name->special_reader = sccs_get_special;
 709         sccs_get_posix_name->special_reader = sccs_get_posix_special;
 710         get_name->special_reader = get_special;
 711         get_posix_name->special_reader = get_posix_special;
 712         silent_name->special_reader = silent_special;
 713         suffixes_name->special_reader = suffixes_special;
 714 
 715         /* The value of $$ is $ */
 716         (void) SETVAR(dollar, dollar, false);
 717         dollar->dollar = false;
 718 
 719         /* Set the value of $(SHELL) */



 720         if (posix) {
 721           MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh"));
 722         } else {
 723           MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh"));
 724         }

 725         (void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
 726 
 727         /*
 728          * Use " FORCE" to simulate a FRC dependency for :: type
 729          * targets with no dependencies.
 730          */
 731         (void) append_prop(force, line_prop);
 732         force->stat.time = file_max_time;
 733 
 734         /* Make sure VPATH is defined before current dir is read */
 735         if ((cp = getenv(vpath_name->string_mb)) != NULL) {
 736                 MBSTOWCS(wcs_buffer, cp);
 737                 (void) SETVAR(vpath_name,
 738                               GETNAME(wcs_buffer, FIND_LENGTH),
 739                               false);
 740         }
 741 
 742         /* Check if there is NO PATH variable. If not we construct one. */
 743         if (getenv(path_name->string_mb) == NULL) {
 744                 vroot_path = NULL;