10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER START
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * The contents of this file are subject to the terms of the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Common Development and Distribution License (the "License").
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You may not use this file except in compliance with the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * See the License for the specific language governing permissions
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * and limitations under the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * When distributing Covered Code, include this CDDL HEADER in each
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * If applicable, add the following below this CDDL HEADER, with the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * fields enclosed by brackets "[]" replaced with your own identifying
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER END
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Use is subject to license terms.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * This file contains various unclassified routines. Some main groups:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Memory allocation
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * String handling
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Property handling
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Error message handling
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Make internal state dumping
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * main routine support
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Included files
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <stdarg.h> /* va_list, va_start(), va_end() */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#include <vroot/report.h> /* SUNPRO_DEPENDENCIES */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Defined macros
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * typedefs & structs
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Static variables
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * File table of contents
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowestatic void print_target_n_deps(register Name target);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Memory allocation
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * free_chain()
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * frees a chain of Name_vector's
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * ptr Pointer to the first element in the chain
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * to be freed.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * String manipulation
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Nameblock property handling
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Error message handling
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * fatal(format, args...)
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Print a message and die
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * format printf type format string
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * args Arguments to match the format
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * fatal_in_progress Indicates if this is a recursive call
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * parallel_process_cnt Do we need to wait for anything?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * report_pwd Should we report the current path?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) fprintf(stderr, gettext("%s: Fatal error: "), getprogname());
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Let all parallel children finish */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * warning(format, args...)
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Print a message and continue.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * format printf type format string
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * args Arguments to match the format
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * report_pwd Should we report the current path?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) fprintf(stderr, gettext("%s: Warning: "), getprogname());
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * time_to_string(time)
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Take a numeric time value and produce
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * a proper string representation.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Return value:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * The string representation of the time
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * time The time we need to translate
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * get_current_path()
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Stuff current_path with the current path if it isnt there already.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Make internal state dumping
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * This is a set of routines for dumping the internal make state
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Used for the -p option
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * dump_make_state()
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Dump make's internal state to stdout
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * svr4 Was ".SVR4" seen in makefile?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * svr4_name The Name ".SVR4", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * posix Was ".POSIX" seen in makefile?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * posix_name The Name ".POSIX", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * default_rule Points to the .DEFAULT rule
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * default_rule_name The Name ".DEFAULT", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * default_target_to_build The first target to print
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * dot_keep_state The Name ".KEEP_STATE", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * dot_keep_state_file The Name ".KEEP_STATE_FILE", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * hashtab The make hash table for Name blocks
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * ignore_errors Was ".IGNORE" seen in makefile?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * ignore_name The Name ".IGNORE", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * keep_state Was ".KEEP_STATE" seen in makefile?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * percent_list The list of % rules
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * precious The Name ".PRECIOUS", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * sccs_get_name The Name ".SCCS_GET", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * sccs_get_posix_name The Name ".SCCS_GET_POSIX", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * get_name The Name ".GET", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * get_posix_name The Name ".GET_POSIX", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * sccs_get_rule Points to the ".SCCS_GET" rule
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * silent Was ".SILENT" seen in makefile?
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * silent_name The Name ".SILENT", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * suffixes The suffix list from ".SUFFIXES"
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * suffixes_name The Name ".SUFFIX", printed
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Default target */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .POSIX */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .DEFAULT */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:\n", default_rule_name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (rule = default_rule; rule != NULL; rule = rule->next) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("\t%s\n", rule->command_line->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .IGNORE */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:\n", ignore_name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .KEEP_STATE: */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:\n\n", dot_keep_state->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .PRECIOUS */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .SCCS_GET */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:\n", sccs_get_name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (rule = sccs_get_rule; rule != NULL; rule = rule->next) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("\t%s\n", rule->command_line->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .SILENT */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:\n", silent_name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* .SUFFIXES: */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("%s:", suffixes_name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (dep = suffixes; dep != NULL; dep = dep->next) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* % rules */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf(" %s", percent_depe->name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("\t%s\n", rule->command_line->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Suffix rules */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe if (wcb.get_string()[0] == (int) period_char) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Macro assignments */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe if (((prop = get_prop(p->prop, macro_prop)) != NULL) &&
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Conditional macro assignments */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (prop = get_prop(p->prop, conditional_prop);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe prop = get_prop(prop->next, conditional_prop)) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* All other dependencies */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * print_rule(target)
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Print the rule for one target
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * target Target we print rule for
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe ((line = get_prop(target->prop, line_prop)) == NULL) ||
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (dependency = line->body.line.dependencies;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf(" %s", dependency->name->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) printf("\t%s\n", rule->command_line->string_mb);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe if ((line = get_prop(target->prop, line_prop)) == NULL) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe for (dependency = line->body.line.dependencies;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe/*****************************************
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * main() support
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * load_cached_names()
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Load the vector of cached names
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Parameters:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Global variables used:
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Many many pointers to Name blocks.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Load the cached_names struct */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe built_last_make_run = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe conditionals = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * A version of make was released with NSE 1.0 that used
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * VERSION-1.1 but this version is identical to VERSION-1.0.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * The version mismatch code makes a special case for this
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * situation. If the version number is changed from 1.0
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * it should go to 1.2.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe current_make_version = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe default_rule_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe dot_keep_state = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe dot_keep_state_file = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe ignore_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe localhost_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe make_version = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe no_parallel_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe parallel_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe recursive_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe sccs_get_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe sccs_get_posix_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe get_posix_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe silent_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe suffixes_name = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe sunpro_dependencies = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe target_arch = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe target_mach = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe virtual_root = GETNAME(wcs_buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Mark special targets so that the reader treats them properly */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe built_last_make_run->special_reader = built_last_make_run_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe default_rule_name->special_reader = default_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe dot_keep_state->special_reader = keep_state_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe dot_keep_state_file->special_reader = keep_state_file_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe make_version->special_reader = make_version_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe no_parallel_name->special_reader = no_parallel_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe parallel_name->special_reader = parallel_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe localhost_name->special_reader = localhost_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe sccs_get_name->special_reader = sccs_get_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe sccs_get_posix_name->special_reader = sccs_get_posix_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe get_posix_name->special_reader = get_posix_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe suffixes_name->special_reader = suffixes_special;
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* The value of $$ is $ */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Set the value of $(SHELL) */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Use " FORCE" to simulate a FRC dependency for :: type
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * targets with no dependencies.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Make sure VPATH is defined before current dir is read */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe if ((cp = getenv(vpath_name->string_mb)) != NULL) {
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe /* Check if there is NO PATH variable. If not we construct one. */
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * iterate on list of conditional macros in np, and place them in
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * a String_rec starting with, and separated by the '$' character.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowecond_macros_into_string(Name np, String_rec *buffer)
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Put the version number at the start of the string
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe append_string(wcs_buffer, buffer, FIND_LENGTH);
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Add the rest of the conditional macros to the buffer
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe macro_list != NULL; macro_list = macro_list->next){