misc.cc (schily-2021-08-14.tar.bz2) | : | misc.cc (schily-2021-09-18.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
*/ | */ | |||
/* | /* | |||
* @(#)misc.cc 1.50 06/12/12 | * @(#)misc.cc 1.50 06/12/12 | |||
*/ | */ | |||
#pragma ident "@(#)misc.cc 1.34 95/10/04" | #pragma ident "@(#)misc.cc 1.34 95/10/04" | |||
/* | /* | |||
* Copyright 2017-2021 J. Schilling | * Copyright 2017-2021 J. Schilling | |||
* | * | |||
* @(#)misc.cc 1.20 21/08/10 2017-2021 J. Schilling | * @(#)misc.cc 1.24 21/09/06 2017-2021 J. Schilling | |||
*/ | */ | |||
#include <schily/mconfig.h> | #include <schily/mconfig.h> | |||
#ifndef lint | #ifndef lint | |||
static UConst char sccsid[] = | static UConst char sccsid[] = | |||
"@(#)misc.cc 1.20 21/08/10 2017-2021 J. Schilling"; | "@(#)misc.cc 1.24 21/09/06 2017-2021 J. Schilling"; | |||
#endif | #endif | |||
/* | /* | |||
* misc.cc | * misc.cc | |||
* | * | |||
* This file contains various unclassified routines. Some main groups: | * This file contains various unclassified routines. Some main groups: | |||
* getname | * getname | |||
* Memory allocation | * Memory allocation | |||
* String handling | * String handling | |||
* Property handling | * Property handling | |||
skipping to change at line 413 | skipping to change at line 413 | |||
for (rule = default_rule; rule != NULL; rule = rule->next) { | for (rule = default_rule; rule != NULL; rule = rule->next) { | |||
(void) printf("\t%s\n", rule->command_line->string_mb); | (void) printf("\t%s\n", rule->command_line->string_mb); | |||
} | } | |||
} | } | |||
/* .IGNORE */ | /* .IGNORE */ | |||
if (ignore_errors) { | if (ignore_errors) { | |||
(void) printf("%s:\n", ignore_name->string_mb); | (void) printf("%s:\n", ignore_name->string_mb); | |||
} | } | |||
#ifdef DO_INCLUDE_FAILED | ||||
/* .INCLUDE_FAILED */ | ||||
if (include_failed) { | ||||
print_rule(include_failed_name); | ||||
} else { | ||||
include_failed_name->dependency_printed = true; | ||||
} | ||||
#endif | ||||
/* .KEEP_STATE: */ | /* .KEEP_STATE: */ | |||
if (keep_state) { | if (keep_state) { | |||
(void) printf("%s:\n\n", dot_keep_state->string_mb); | (void) printf("%s:\n\n", dot_keep_state->string_mb); | |||
} | } | |||
/* .PHONY */ | /* .PHONY */ | |||
(void) printf("%s:", phony->string_mb); | (void) printf("%s:", phony->string_mb); | |||
for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) { | for (p = hashtab.begin(), e = hashtab.end(); p != e; p++) { | |||
if (p->stat.is_phony) { | if (p->stat.is_phony) { | |||
(void) printf(" %s", p->string_mb); | (void) printf(" %s", p->string_mb); | |||
skipping to change at line 686 | skipping to change at line 695 | |||
MBSTOWCS(wcs_buffer, NOCATGETS("")); | MBSTOWCS(wcs_buffer, NOCATGETS("")); | |||
empty_name = GETNAME(wcs_buffer, FIND_LENGTH); | empty_name = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS(" FORCE")); | MBSTOWCS(wcs_buffer, NOCATGETS(" FORCE")); | |||
force = GETNAME(wcs_buffer, FIND_LENGTH); | force = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS("HOST_ARCH")); | MBSTOWCS(wcs_buffer, NOCATGETS("HOST_ARCH")); | |||
host_arch = GETNAME(wcs_buffer, FIND_LENGTH); | host_arch = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS("HOST_MACH")); | MBSTOWCS(wcs_buffer, NOCATGETS("HOST_MACH")); | |||
host_mach = GETNAME(wcs_buffer, FIND_LENGTH); | host_mach = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS(".IGNORE")); | MBSTOWCS(wcs_buffer, NOCATGETS(".IGNORE")); | |||
ignore_name = GETNAME(wcs_buffer, FIND_LENGTH); | ignore_name = GETNAME(wcs_buffer, FIND_LENGTH); | |||
#ifdef DO_INCLUDE_FAILED | ||||
MBSTOWCS(wcs_buffer, NOCATGETS(".INCLUDE_FAILED")); | ||||
include_failed_name = GETNAME(wcs_buffer, FIND_LENGTH); | ||||
#endif | ||||
MBSTOWCS(wcs_buffer, NOCATGETS(".INIT")); | MBSTOWCS(wcs_buffer, NOCATGETS(".INIT")); | |||
init = GETNAME(wcs_buffer, FIND_LENGTH); | init = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS(".LOCAL")); | MBSTOWCS(wcs_buffer, NOCATGETS(".LOCAL")); | |||
localhost_name = GETNAME(wcs_buffer, FIND_LENGTH); | localhost_name = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS(".make.state")); | MBSTOWCS(wcs_buffer, NOCATGETS(".make.state")); | |||
make_state = GETNAME(wcs_buffer, FIND_LENGTH); | make_state = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS("MAKEFLAGS")); | MBSTOWCS(wcs_buffer, NOCATGETS("MAKEFLAGS")); | |||
makeflags = GETNAME(wcs_buffer, FIND_LENGTH); | makeflags = GETNAME(wcs_buffer, FIND_LENGTH); | |||
MBSTOWCS(wcs_buffer, NOCATGETS(".MAKE_VERSION")); | MBSTOWCS(wcs_buffer, NOCATGETS(".MAKE_VERSION")); | |||
make_version = GETNAME(wcs_buffer, FIND_LENGTH); | make_version = GETNAME(wcs_buffer, FIND_LENGTH); | |||
skipping to change at line 760 | skipping to change at line 773 | |||
svr4_name->special_reader = svr4_special; | svr4_name->special_reader = svr4_special; | |||
posix_name->special_reader = posix_special; | posix_name->special_reader = posix_special; | |||
built_last_make_run->special_reader = built_last_make_run_special; | built_last_make_run->special_reader = built_last_make_run_special; | |||
default_rule_name->special_reader = default_special; | default_rule_name->special_reader = default_special; | |||
#ifdef NSE | #ifdef NSE | |||
derived_src->special_reader= derived_src_special; | derived_src->special_reader= derived_src_special; | |||
#endif | #endif | |||
dot_keep_state->special_reader = keep_state_special; | dot_keep_state->special_reader = keep_state_special; | |||
dot_keep_state_file->special_reader = keep_state_file_special; | dot_keep_state_file->special_reader = keep_state_file_special; | |||
ignore_name->special_reader = ignore_special; | ignore_name->special_reader = ignore_special; | |||
#ifdef DO_INCLUDE_FAILED | ||||
include_failed_name->special_reader = include_failed_special; | ||||
#endif | ||||
make_version->special_reader = make_version_special; | make_version->special_reader = make_version_special; | |||
no_parallel_name->special_reader = no_parallel_special; | no_parallel_name->special_reader = no_parallel_special; | |||
#ifdef DO_NOTPARALLEL | #ifdef DO_NOTPARALLEL | |||
notparallel_name->special_reader = notparallel_special; | notparallel_name->special_reader = notparallel_special; | |||
#endif | #endif | |||
parallel_name->special_reader = parallel_special; | parallel_name->special_reader = parallel_special; | |||
localhost_name->special_reader = localhost_special; | localhost_name->special_reader = localhost_special; | |||
phony->special_reader = phony_special; | phony->special_reader = phony_special; | |||
precious->special_reader = precious_special; | precious->special_reader = precious_special; | |||
sccs_get_name->special_reader = sccs_get_special; | sccs_get_name->special_reader = sccs_get_special; | |||
skipping to change at line 781 | skipping to change at line 797 | |||
get_name->special_reader = get_special; | get_name->special_reader = get_special; | |||
get_posix_name->special_reader = get_posix_special; | get_posix_name->special_reader = get_posix_special; | |||
silent_name->special_reader = silent_special; | silent_name->special_reader = silent_special; | |||
suffixes_name->special_reader = suffixes_special; | suffixes_name->special_reader = suffixes_special; | |||
/* The value of $$ is $ */ | /* The value of $$ is $ */ | |||
(void) SETVAR(dollar, dollar, false); | (void) SETVAR(dollar, dollar, false); | |||
dollar->dollar = false; | dollar->dollar = false; | |||
/* Set the value of $(SHELL) */ | /* Set the value of $(SHELL) */ | |||
#ifdef HP_UX | ||||
MBSTOWCS(wcs_buffer, NOCATGETS("/bin/posix/sh")); | ||||
#else | ||||
#if defined(SUN5_0) | #if defined(SUN5_0) | |||
if (posix) { | if (posix) { | |||
#ifdef HAVE__USR_XPG4_BIN_SH | #ifdef HAVE__USR_XPG4_BIN_SH | |||
MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh")); | MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh")); | |||
#else | #else | |||
#ifdef HAVE__OPT_SCHILY_XPG4_BIN_SH | #ifdef HAVE__OPT_SCHILY_XPG4_BIN_SH | |||
MBSTOWCS(wcs_buffer, NOCATGETS("/opt/schily/xpg4/bin/sh")); | MBSTOWCS(wcs_buffer, NOCATGETS("/opt/schily/xpg4/bin/sh")); | |||
#else | #else | |||
#ifdef HAVE__BIN_POSIX_SH | ||||
MBSTOWCS(wcs_buffer, NOCATGETS("/bin/posix/sh")); | ||||
#else | ||||
MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | |||
#endif | #endif | |||
#endif | #endif | |||
#endif | ||||
} else { | } else { | |||
MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | |||
} | } | |||
#else /* ^SUN5_0 */ | #else /* ^SUN5_0 */ | |||
MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh")); | |||
#endif /* ^SUN5_0 */ | #endif /* ^SUN5_0 */ | |||
#endif | ||||
(void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false); | (void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false); | |||
/* | /* | |||
* Use " FORCE" to simulate a FRC dependency for :: type | * Use " FORCE" to simulate a FRC dependency for :: type | |||
* targets with no dependencies. | * targets with no dependencies. | |||
*/ | */ | |||
(void) append_prop(force, line_prop); | (void) append_prop(force, line_prop); | |||
force->stat.time = file_max_time; | force->stat.time = file_max_time; | |||
/* Make sure VPATH is defined before current dir is read */ | /* Make sure VPATH is defined before current dir is read */ | |||
End of changes. 9 change blocks. | ||||
6 lines changed or deleted | 22 lines changed or added |