Print this page
make: translate using gettext, rather than the unmaintainable catgets
*** 30,56 ****
*/
/*
* Included files
*/
- #if defined(TEAMWARE_MAKE_CMN)
- # include <avo/intl.h>
- #endif
-
#include <bsd/bsd.h> /* bsd_signal() */
#include <locale.h> /* setlocale() */
#include <libgen.h>
#include <mk/defs.h>
- #include <mksdmsi18n/mksdmsi18n.h> /* libmksdmsi18n_init() */
#include <mksh/macro.h> /* getvar() */
#include <mksh/misc.h> /* getmem(), setup_char_semantics() */
- #if defined(TEAMWARE_MAKE_CMN)
- #endif
-
#include <pwd.h> /* getpwnam() */
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/errno.h> /* ENOENT */
--- 30,48 ----
*** 76,94 ****
/*
* Defined macros
*/
! #define MAKE_PREFIX NOCATGETS("/usr")
! #define LD_SUPPORT_ENV_VAR NOCATGETS("SGS_SUPPORT_32")
! #define LD_SUPPORT_ENV_VAR_32 NOCATGETS("SGS_SUPPORT_32")
! #define LD_SUPPORT_ENV_VAR_64 NOCATGETS("SGS_SUPPORT_64")
! #define LD_SUPPORT_MAKE_LIB NOCATGETS("libmakestate.so.1")
#ifdef __i386
! #define LD_SUPPORT_MAKE_ARCH NOCATGETS("i386")
#elif __sparc
! #define LD_SUPPORT_MAKE_ARCH NOCATGETS("sparc")
#else
#error "Unsupported architecture"
#endif
/*
--- 68,85 ----
/*
* Defined macros
*/
! #define LD_SUPPORT_ENV_VAR "SGS_SUPPORT_32"
! #define LD_SUPPORT_ENV_VAR_32 "SGS_SUPPORT_32"
! #define LD_SUPPORT_ENV_VAR_64 "SGS_SUPPORT_64"
! #define LD_SUPPORT_MAKE_LIB "libmakestate.so.1"
#ifdef __i386
! #define LD_SUPPORT_MAKE_ARCH "i386"
#elif __sparc
! #define LD_SUPPORT_MAKE_ARCH "sparc"
#else
#error "Unsupported architecture"
#endif
/*
*** 161,171 ****
extern void expand_value(Name, register String , Boolean);
static const char verstring[] = "illumos make";
jmp_buf jmpbuffer;
- extern nl_catd catd;
/*
* main(argc, argv)
*
* Parameters:
--- 152,161 ----
*** 216,243 ****
(void) setlocale(LC_ALL, "");
#ifdef DMAKE_STATISTICS
! if (getenv(NOCATGETS("DMAKE_STATISTICS"))) {
getname_stat = true;
}
#endif
! catd = catopen(AVO_DOMAIN_DMAKE, NL_CAT_LOCALE);
!
! // ---> fprintf(stderr, catgets(catd, 15, 666, "--- SUN make ---\n"));
!
!
! /*
! * I put libmksdmsi18n_init() under #ifdef because it requires avo_i18n_init()
! * from avo_util library.
! */
! libmksdmsi18n_init();
!
!
! textdomain(NOCATGETS("SUNW_SPRO_MAKE"));
g_argc = argc;
g_argv = (char **) malloc((g_argc + 1) * sizeof(char *));
for (i = 0; i < argc; i++) {
g_argv[i] = argv[i];
--- 206,224 ----
(void) setlocale(LC_ALL, "");
#ifdef DMAKE_STATISTICS
! if (getenv("DMAKE_STATISTICS")) {
getname_stat = true;
}
#endif
! #ifndef TEXT_DOMAIN
! #define TEXT_DOMAIN "SYS_TEST"
! #endif
! textdomain(TEXT_DOMAIN);
g_argc = argc;
g_argv = (char **) malloc((g_argc + 1) * sizeof(char *));
for (i = 0; i < argc; i++) {
g_argv[i] = argv[i];
*** 293,345 ****
*/
/* Sun OS make standart */
svr4 = false;
posix = false;
! if(!strcmp(argv_zero_string, NOCATGETS("/usr/xpg4/bin/make"))) {
svr4 = false;
posix = true;
} else {
prognameptr = strrchr(argv[0], '/');
if(prognameptr) {
prognameptr++;
} else {
prognameptr = argv[0];
}
! if(!strcmp(prognameptr, NOCATGETS("svr4.make"))) {
svr4 = true;
posix = false;
}
}
! if (getenv(USE_SVR4_MAKE) || getenv(NOCATGETS("USE_SVID"))){
svr4 = true;
posix = false;
}
/*
* Find the dmake_compat_mode: posix, sun, svr4, or gnu_style, .
*/
! char * dmake_compat_mode_var = getenv(NOCATGETS("SUN_MAKE_COMPAT_MODE"));
if (dmake_compat_mode_var != NULL) {
! if (0 == strcasecmp(dmake_compat_mode_var, NOCATGETS("GNU"))) {
gnu_style = true;
}
//svr4 = false;
//posix = false;
}
/*
* Temporary directory set up.
*/
! char * tmpdir_var = getenv(NOCATGETS("TMPDIR"));
if (tmpdir_var != NULL && *tmpdir_var == '/' && strlen(tmpdir_var) < MAXPATHLEN) {
strcpy(mbs_buffer, tmpdir_var);
for (tmpdir_var = mbs_buffer+strlen(mbs_buffer);
*(--tmpdir_var) == '/' && tmpdir_var > mbs_buffer;
*tmpdir_var = '\0');
if (strlen(mbs_buffer) + 32 < MAXPATHLEN) { /* 32 = strlen("/dmake.stdout.%d.%d.XXXXXX") */
! sprintf(mbs_buffer2, NOCATGETS("%s/dmake.tst.%d.XXXXXX"),
mbs_buffer, getpid());
int fd = mkstemp(mbs_buffer2);
if (fd >= 0) {
close(fd);
unlink(mbs_buffer2);
--- 274,326 ----
*/
/* Sun OS make standart */
svr4 = false;
posix = false;
! if(!strcmp(argv_zero_string, "/usr/xpg4/bin/make")) {
svr4 = false;
posix = true;
} else {
prognameptr = strrchr(argv[0], '/');
if(prognameptr) {
prognameptr++;
} else {
prognameptr = argv[0];
}
! if(!strcmp(prognameptr, "svr4.make")) {
svr4 = true;
posix = false;
}
}
! if (getenv(USE_SVR4_MAKE) || getenv("USE_SVID")){
svr4 = true;
posix = false;
}
/*
* Find the dmake_compat_mode: posix, sun, svr4, or gnu_style, .
*/
! char * dmake_compat_mode_var = getenv("SUN_MAKE_COMPAT_MODE");
if (dmake_compat_mode_var != NULL) {
! if (0 == strcasecmp(dmake_compat_mode_var, "GNU")) {
gnu_style = true;
}
//svr4 = false;
//posix = false;
}
/*
* Temporary directory set up.
*/
! char * tmpdir_var = getenv("TMPDIR");
if (tmpdir_var != NULL && *tmpdir_var == '/' && strlen(tmpdir_var) < MAXPATHLEN) {
strcpy(mbs_buffer, tmpdir_var);
for (tmpdir_var = mbs_buffer+strlen(mbs_buffer);
*(--tmpdir_var) == '/' && tmpdir_var > mbs_buffer;
*tmpdir_var = '\0');
if (strlen(mbs_buffer) + 32 < MAXPATHLEN) { /* 32 = strlen("/dmake.stdout.%d.%d.XXXXXX") */
! sprintf(mbs_buffer2, "%s/dmake.tst.%d.XXXXXX",
mbs_buffer, getpid());
int fd = mkstemp(mbs_buffer2);
if (fd >= 0) {
close(fd);
unlink(mbs_buffer2);
*** 348,361 ****
}
}
/* find out if stdout and stderr point to the same place */
if (fstat(1, &out_stat) < 0) {
! fatal(catgets(catd, 1, 165, "fstat of standard out failed: %s"), errmsg(errno));
}
if (fstat(2, &err_stat) < 0) {
! fatal(catgets(catd, 1, 166, "fstat of standard error failed: %s"), errmsg(errno));
}
if ((out_stat.st_dev == err_stat.st_dev) &&
(out_stat.st_ino == err_stat.st_ino)) {
stdout_stderr_same = true;
} else {
--- 329,342 ----
}
}
/* find out if stdout and stderr point to the same place */
if (fstat(1, &out_stat) < 0) {
! fatal(gettext("fstat of standard out failed: %s"), errmsg(errno));
}
if (fstat(2, &err_stat) < 0) {
! fatal(gettext("fstat of standard error failed: %s"), errmsg(errno));
}
if ((out_stat.st_dev == err_stat.st_dev) &&
(out_stat.st_ino == err_stat.st_ino)) {
stdout_stderr_same = true;
} else {
*** 382,464 ****
setup_makeflags_argv();
read_command_options(mf_argc, mf_argv);
read_command_options(argc, argv);
if (debug_level > 0) {
cp = getenv(makeflags->string_mb);
! (void) printf(catgets(catd, 1, 167, "MAKEFLAGS value: %s\n"), cp == NULL ? "" : cp);
}
setup_interrupt(handle_interrupt);
read_files_and_state(argc, argv);
/*
* Find the dmake_output_mode: TXT1, TXT2 or HTML1.
*/
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
if (prop2 == NULL) {
/* DMAKE_OUTPUT_MODE not defined, default to TXT1 mode */
output_mode = txt1_mode;
} else {
dmake_value2 = prop2->body.macro.value;
if ((dmake_value2 == NULL) ||
! (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("TXT1")))) {
output_mode = txt1_mode;
! } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("TXT2"))) {
output_mode = txt2_mode;
! } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("HTML1"))) {
output_mode = html1_mode;
} else {
! warning(catgets(catd, 1, 352, "Unsupported value `%s' for DMAKE_OUTPUT_MODE after -x flag (ignored)"),
dmake_value2->string_mb);
}
}
/*
* Find the dmake_mode: parallel, or serial.
*/
if ((!pmake_cap_r_specified) &&
(!pmake_machinesfile_specified)) {
char *s = strdup(argv[0]);
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
// If we're invoked as 'make' run serially, regardless of DMAKE_MODE
// If we're invoked as 'make' but passed -j, run parallel
// If we're invoked as 'dmake', without DMAKE_MODE, default parallel
// If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
! if ((strcmp(basename(s), NOCATGETS("make")) == 0) &&
!dmake_max_jobs_specified) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else if (prop2 == NULL) {
/* DMAKE_MODE not defined, default based on our name */
char *s = strdup(argv[0]);
! if (strcmp(basename(s), NOCATGETS("dmake")) == 0) {
dmake_mode_type = parallel_mode;
no_parallel = false;
}
} else {
dmake_value2 = prop2->body.macro.value;
! if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("parallel"))) {
dmake_mode_type = parallel_mode;
no_parallel = false;
! } else if (IS_EQUAL(dmake_value2->string_mb, NOCATGETS("serial"))) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else {
! fatal(catgets(catd, 1, 307, "Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
}
}
free(s);
}
parallel_flag = true;
! putenv(strdup(NOCATGETS("DMAKE_CHILD=TRUE")));
//
// If dmake is running with -t option, set dmake_mode_type to serial.
// This is done because doname() calls touch_command() that runs serially.
// If we do not do that, maketool will have problems.
--- 363,445 ----
setup_makeflags_argv();
read_command_options(mf_argc, mf_argv);
read_command_options(argc, argv);
if (debug_level > 0) {
cp = getenv(makeflags->string_mb);
! (void) printf(gettext("MAKEFLAGS value: %s\n"), cp == NULL ? "" : cp);
}
setup_interrupt(handle_interrupt);
read_files_and_state(argc, argv);
/*
* Find the dmake_output_mode: TXT1, TXT2 or HTML1.
*/
! MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
if (prop2 == NULL) {
/* DMAKE_OUTPUT_MODE not defined, default to TXT1 mode */
output_mode = txt1_mode;
} else {
dmake_value2 = prop2->body.macro.value;
if ((dmake_value2 == NULL) ||
! (IS_EQUAL(dmake_value2->string_mb, "TXT1"))) {
output_mode = txt1_mode;
! } else if (IS_EQUAL(dmake_value2->string_mb, "TXT2")) {
output_mode = txt2_mode;
! } else if (IS_EQUAL(dmake_value2->string_mb, "HTML1")) {
output_mode = html1_mode;
} else {
! warning(gettext("Unsupported value `%s' for DMAKE_OUTPUT_MODE after -x flag (ignored)"),
dmake_value2->string_mb);
}
}
/*
* Find the dmake_mode: parallel, or serial.
*/
if ((!pmake_cap_r_specified) &&
(!pmake_machinesfile_specified)) {
char *s = strdup(argv[0]);
! MBSTOWCS(wcs_buffer, "DMAKE_MODE");
dmake_name2 = GETNAME(wcs_buffer, FIND_LENGTH);
prop2 = get_prop(dmake_name2->prop, macro_prop);
// If we're invoked as 'make' run serially, regardless of DMAKE_MODE
// If we're invoked as 'make' but passed -j, run parallel
// If we're invoked as 'dmake', without DMAKE_MODE, default parallel
// If we're invoked as 'dmake' and DMAKE_MODE is set, honour it.
! if ((strcmp(basename(s), "make") == 0) &&
!dmake_max_jobs_specified) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else if (prop2 == NULL) {
/* DMAKE_MODE not defined, default based on our name */
char *s = strdup(argv[0]);
! if (strcmp(basename(s), "dmake") == 0) {
dmake_mode_type = parallel_mode;
no_parallel = false;
}
} else {
dmake_value2 = prop2->body.macro.value;
! if (IS_EQUAL(dmake_value2->string_mb, "parallel")) {
dmake_mode_type = parallel_mode;
no_parallel = false;
! } else if (IS_EQUAL(dmake_value2->string_mb, "serial")) {
dmake_mode_type = serial_mode;
no_parallel = true;
} else {
! fatal(gettext("Unknown dmake mode argument `%s' after -m flag"), dmake_value2->string_mb);
}
}
free(s);
}
parallel_flag = true;
! putenv(strdup("DMAKE_CHILD=TRUE"));
//
// If dmake is running with -t option, set dmake_mode_type to serial.
// This is done because doname() calls touch_command() that runs serially.
// If we do not do that, maketool will have problems.
*** 475,486 ****
* This check is performed only if __DMAKE_SEPARATE_STDERR
* is not set. This variable may be used in order to preserve
* the 'old' behaviour.
*/
out_err_same = true;
! char * dmake_sep_var = getenv(NOCATGETS("__DMAKE_SEPARATE_STDERR"));
! if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, NOCATGETS("NO")))) {
struct stat stdout_stat;
struct stat stderr_stat;
if( (fstat(1, &stdout_stat) == 0)
&& (fstat(2, &stderr_stat) == 0) )
{
--- 456,467 ----
* This check is performed only if __DMAKE_SEPARATE_STDERR
* is not set. This variable may be used in order to preserve
* the 'old' behaviour.
*/
out_err_same = true;
! char * dmake_sep_var = getenv("__DMAKE_SEPARATE_STDERR");
! if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, "NO"))) {
struct stat stdout_stat;
struct stat stderr_stat;
if( (fstat(1, &stdout_stat) == 0)
&& (fstat(2, &stderr_stat) == 0) )
{
*** 608,618 ****
* quest If -q is on we do not run .DONE
* report_dependencies
* True if -P flag on
* running_list List of parallel running processes
* temp_file_name The temp file is removed, if any
- * catd the message catalog file
*/
extern "C" void
cleanup_after_exit(void)
{
Running rp;
--- 589,598 ----
*** 629,656 ****
extern long env_alloc_bytes;
#ifdef DMAKE_STATISTICS
if(getname_stat) {
! printf(NOCATGETS(">>> Getname statistics:\n"));
! printf(NOCATGETS(" Allocated:\n"));
! printf(NOCATGETS(" Names: %ld\n"), getname_names_count);
! printf(NOCATGETS(" Strings: %ld Kb (%ld bytes)\n"), getname_bytes_count/1000, getname_bytes_count);
! printf(NOCATGETS(" Structs: %ld Kb (%ld bytes)\n"), getname_struct_count/1000, getname_struct_count);
! printf(NOCATGETS(" Total bytes: %ld Kb (%ld bytes)\n"), getname_struct_count/1000 + getname_bytes_count/1000, getname_struct_count + getname_bytes_count);
!
! printf(NOCATGETS("\n Unallocated: %ld\n"), freename_names_count);
! printf(NOCATGETS(" Names: %ld\n"), freename_names_count);
! printf(NOCATGETS(" Strings: %ld Kb (%ld bytes)\n"), freename_bytes_count/1000, freename_bytes_count);
! printf(NOCATGETS(" Structs: %ld Kb (%ld bytes)\n"), freename_struct_count/1000, freename_struct_count);
! printf(NOCATGETS(" Total bytes: %ld Kb (%ld bytes)\n"), freename_struct_count/1000 + freename_bytes_count/1000, freename_struct_count + freename_bytes_count);
! printf(NOCATGETS("\n Total used: %ld Kb (%ld bytes)\n"), (getname_struct_count/1000 + getname_bytes_count/1000) - (freename_struct_count/1000 + freename_bytes_count/1000), (getname_struct_count + getname_bytes_count) - (freename_struct_count + freename_bytes_count));
! printf(NOCATGETS("\n>>> Other:\n"));
printf(
! NOCATGETS(" Env (%ld): %ld Kb (%ld bytes)\n"),
env_alloc_num,
env_alloc_bytes/1000,
env_alloc_bytes
);
--- 609,636 ----
extern long env_alloc_bytes;
#ifdef DMAKE_STATISTICS
if(getname_stat) {
! printf(">>> Getname statistics:\n");
! printf(" Allocated:\n");
! printf(" Names: %ld\n", getname_names_count);
! printf(" Strings: %ld Kb (%ld bytes)\n", getname_bytes_count/1000, getname_bytes_count);
! printf(" Structs: %ld Kb (%ld bytes)\n", getname_struct_count/1000, getname_struct_count);
! printf(" Total bytes: %ld Kb (%ld bytes)\n", getname_struct_count/1000 + getname_bytes_count/1000, getname_struct_count + getname_bytes_count);
!
! printf("\n Unallocated: %ld\n", freename_names_count);
! printf(" Names: %ld\n", freename_names_count);
! printf(" Strings: %ld Kb (%ld bytes)\n", freename_bytes_count/1000, freename_bytes_count);
! printf(" Structs: %ld Kb (%ld bytes)\n", freename_struct_count/1000, freename_struct_count);
! printf(" Total bytes: %ld Kb (%ld bytes)\n", freename_struct_count/1000 + freename_bytes_count/1000, freename_struct_count + freename_bytes_count);
! printf("\n Total used: %ld Kb (%ld bytes)\n", (getname_struct_count/1000 + getname_bytes_count/1000) - (freename_struct_count/1000 + freename_bytes_count/1000), (getname_struct_count + getname_bytes_count) - (freename_struct_count + freename_bytes_count));
! printf("\n>>> Other:\n");
printf(
! " Env (%ld): %ld Kb (%ld bytes)\n",
env_alloc_num,
env_alloc_bytes/1000,
env_alloc_bytes
);
*** 662,672 ****
if (!getenv(USE_SVR4_MAKE)){
/* Build the target .DONE or .FAILED if we caught an error */
if (!quest && !list_all_targets) {
Name failed_name;
! MBSTOWCS(wcs_buffer, NOCATGETS(".FAILED"));
failed_name = GETNAME(wcs_buffer, FIND_LENGTH);
if ((exit_status != 0) && (failed_name->prop != NULL)) {
/*
* [tolik] switch DMake to serial mode
*/
--- 642,652 ----
if (!getenv(USE_SVR4_MAKE)){
/* Build the target .DONE or .FAILED if we caught an error */
if (!quest && !list_all_targets) {
Name failed_name;
! MBSTOWCS(wcs_buffer, ".FAILED");
failed_name = GETNAME(wcs_buffer, FIND_LENGTH);
if ((exit_status != 0) && (failed_name->prop != NULL)) {
/*
* [tolik] switch DMake to serial mode
*/
*** 736,749 ****
write_state_file(1, (Boolean) 1);
#if defined (TEAMWARE_MAKE_CMN) && defined (MAXJOBS_ADJUST_RFE4694000)
job_adjust_fini();
#endif
-
- #ifdef TEAMWARE_MAKE_CMN
- catclose(catd);
- #endif
}
/*
* handle_interrupt()
*
--- 716,725 ----
*** 808,826 ****
(void) fprintf(stderr,
"\n*** %s ",
current_target->string_mb);
if (current_target->stat.is_dir) {
(void) fprintf(stderr,
! catgets(catd, 1, 168, "not removed.\n"),
current_target->string_mb);
} else if (unlink(current_target->string_mb) == 0) {
(void) fprintf(stderr,
! catgets(catd, 1, 169, "removed.\n"),
current_target->string_mb);
} else {
(void) fprintf(stderr,
! catgets(catd, 1, 170, "could not be removed: %s.\n"),
current_target->string_mb,
errmsg(errno));
}
}
}
--- 784,802 ----
(void) fprintf(stderr,
"\n*** %s ",
current_target->string_mb);
if (current_target->stat.is_dir) {
(void) fprintf(stderr,
! gettext("not removed.\n"),
current_target->string_mb);
} else if (unlink(current_target->string_mb) == 0) {
(void) fprintf(stderr,
! gettext("removed.\n"),
current_target->string_mb);
} else {
(void) fprintf(stderr,
! gettext("could not be removed: %s.\n"),
current_target->string_mb,
errmsg(errno));
}
}
}
*** 843,861 ****
(void) fprintf(stderr,
"\n*** %s ",
rp->target->string_mb);
if (rp->target->stat.is_dir) {
(void) fprintf(stderr,
! catgets(catd, 1, 171, "not removed.\n"),
rp->target->string_mb);
} else if (unlink(rp->target->string_mb) == 0) {
(void) fprintf(stderr,
! catgets(catd, 1, 172, "removed.\n"),
rp->target->string_mb);
} else {
(void) fprintf(stderr,
! catgets(catd, 1, 173, "could not be removed: %s.\n"),
rp->target->string_mb,
errmsg(errno));
}
}
}
--- 819,837 ----
(void) fprintf(stderr,
"\n*** %s ",
rp->target->string_mb);
if (rp->target->stat.is_dir) {
(void) fprintf(stderr,
! gettext("not removed.\n"),
rp->target->string_mb);
} else if (unlink(rp->target->string_mb) == 0) {
(void) fprintf(stderr,
! gettext("removed.\n"),
rp->target->string_mb);
} else {
(void) fprintf(stderr,
! gettext("could not be removed: %s.\n"),
rp->target->string_mb,
errmsg(errno));
}
}
}
*** 1011,1041 ****
}
if (ch == '?') {
if (svr4) {
fprintf(stderr,
! catgets(catd, 1, 267, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
fprintf(stderr,
! catgets(catd, 1, 268, " [ -j dmake_max_jobs ][ -m dmake_mode ][ -o dmake_odir ]...\n"));
fprintf(stderr,
! catgets(catd, 1, 269, " [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ][ -s ][ -t ][ -v ]\n"));
tptr = strchr(SVR4_CMD_OPTS, optopt);
} else {
fprintf(stderr,
! catgets(catd, 1, 272, "Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
fprintf(stderr,
! catgets(catd, 1, 273, " [ -j dmake_max_jobs ][ -K statefile ][ -m dmake_mode ][ -x MODE_NAME=VALUE ][ -o dmake_odir ]...\n"));
fprintf(stderr,
! catgets(catd, 1, 274, " [ -d ][ -dd ][ -D ][ -DD ][ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -u ][ -w ]\n"));
fprintf(stderr,
! catgets(catd, 1, 275, " [ -q ][ -r ][ -s ][ -S ][ -t ][ -v ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n"));
tptr = strchr(SUNPRO_CMD_OPTS, optopt);
}
if (!tptr) {
! fatal(catgets(catd, 1, 279, "Unknown option `-%c'"), optopt);
} else {
! fatal(catgets(catd, 1, 280, "Missing argument after `-%c'"), optopt);
}
}
--- 987,1017 ----
}
if (ch == '?') {
if (svr4) {
fprintf(stderr,
! gettext("Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
fprintf(stderr,
! gettext(" [ -j dmake_max_jobs ][ -m dmake_mode ][ -o dmake_odir ]...\n"));
fprintf(stderr,
! gettext(" [ -e ][ -i ][ -k ][ -n ][ -p ][ -q ][ -r ][ -s ][ -t ][ -v ]\n"));
tptr = strchr(SVR4_CMD_OPTS, optopt);
} else {
fprintf(stderr,
! gettext("Usage : dmake [ -f makefile ][ -c dmake_rcfile ][ -g dmake_group ]\n"));
fprintf(stderr,
! gettext(" [ -j dmake_max_jobs ][ -K statefile ][ -m dmake_mode ][ -x MODE_NAME=VALUE ][ -o dmake_odir ]...\n"));
fprintf(stderr,
! gettext(" [ -d ][ -dd ][ -D ][ -DD ][ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -u ][ -w ]\n"));
fprintf(stderr,
! gettext(" [ -q ][ -r ][ -s ][ -S ][ -t ][ -v ][ -V ][ target... ][ macro=value... ][ \"macro +=value\"... ]\n"));
tptr = strchr(SUNPRO_CMD_OPTS, optopt);
}
if (!tptr) {
! fatal(gettext("Unknown option `-%c'"), optopt);
} else {
! fatal(gettext("Missing argument after `-%c'"), optopt);
}
}
*** 1058,1098 ****
if (k) {
argv[k] = NULL;
}
break;
case 1: /* -f seen */
! argv[i] = (char *)NOCATGETS("-f");
break;
case 2: /* -c seen */
! argv[i] = (char *)NOCATGETS("-c");
break;
case 4: /* -g seen */
! argv[i] = (char *)NOCATGETS("-g");
break;
case 8: /* -j seen */
! argv[i] = (char *)NOCATGETS("-j");
break;
case 16: /* -M seen */
! argv[i] = (char *)NOCATGETS("-M");
break;
case 32: /* -m seen */
! argv[i] = (char *)NOCATGETS("-m");
break;
case 128: /* -O seen */
! argv[i] = (char *)NOCATGETS("-O");
break;
case 256: /* -K seen */
! argv[i] = (char *)NOCATGETS("-K");
break;
case 512: /* -o seen */
! argv[i] = (char *)NOCATGETS("-o");
break;
case 1024: /* -x seen */
! argv[i] = (char *)NOCATGETS("-x");
break;
default: /* > 1 of -c, f, g, j, K, M, m, O, o, x seen */
! fatal(catgets(catd, 1, 286, "Illegal command line. More than one option requiring\nan argument given in the same argument group"));
}
makefile_next = 0;
current_optind = optind;
}
--- 1034,1074 ----
if (k) {
argv[k] = NULL;
}
break;
case 1: /* -f seen */
! argv[i] = (char *)"-f";
break;
case 2: /* -c seen */
! argv[i] = (char *)"-c";
break;
case 4: /* -g seen */
! argv[i] = (char *)"-g";
break;
case 8: /* -j seen */
! argv[i] = (char *)"-j";
break;
case 16: /* -M seen */
! argv[i] = (char *)"-M";
break;
case 32: /* -m seen */
! argv[i] = (char *)"-m";
break;
case 128: /* -O seen */
! argv[i] = (char *)"-O";
break;
case 256: /* -K seen */
! argv[i] = (char *)"-K";
break;
case 512: /* -o seen */
! argv[i] = (char *)"-o";
break;
case 1024: /* -x seen */
! argv[i] = (char *)"-x";
break;
default: /* > 1 of -c, f, g, j, K, M, m, O, o, x seen */
! fatal(gettext("Illegal command line. More than one option requiring\nan argument given in the same argument group"));
}
makefile_next = 0;
current_optind = optind;
}
*** 1238,1248 ****
}
}
}
/* Allocate memory for the new MAKEFLAGS argv */
mf_argv = (char **) malloc((mf_argc + 1) * sizeof(char *));
! mf_argv[0] = (char *)NOCATGETS("MAKEFLAGS");
/*
* Convert the MAKEFLAGS string value into a vector of char *,
* similar to argv.
*/
cp = cp_orig;
--- 1214,1224 ----
}
}
}
/* Allocate memory for the new MAKEFLAGS argv */
mf_argv = (char **) malloc((mf_argc + 1) * sizeof(char *));
! mf_argv[0] = (char *)"MAKEFLAGS";
/*
* Convert the MAKEFLAGS string value into a vector of char *,
* similar to argv.
*/
cp = cp_orig;
*** 1525,1535 ****
svr4 = true;
return 0;
case 'v': /* Version flag */
if (invert_this) {
} else {
! fprintf(stdout, NOCATGETS("dmake: %s\n"), verstring);
exit_status = 0;
exit(0);
}
return 0;
case 'w': /* Unconditional flag */
--- 1501,1511 ----
svr4 = true;
return 0;
case 'v': /* Version flag */
if (invert_this) {
} else {
! fprintf(stdout, "dmake: %s\n", verstring);
exit_status = 0;
exit(0);
}
return 0;
case 'w': /* Unconditional flag */
*** 1571,1616 ****
char cwdpath[MAXPATHLEN];
uid_t uid;
int done=0;
/* Check if we should use PROJECTDIR when reading the SCCS dir. */
! sccs_dir_path = getenv(NOCATGETS("PROJECTDIR"));
if ((sccs_dir_path != NULL) &&
(sccs_dir_path[0] != (int) slash_char)) {
struct passwd *pwent;
{
uid = getuid();
pwent = getpwuid(uid);
if (pwent == NULL) {
! fatal(catgets(catd, 1, 188, "Bogus USERID "));
}
if ((pwent = getpwnam(sccs_dir_path)) == NULL) {
/*empty block : it'll go & check cwd */
}
else {
! (void) sprintf(path, NOCATGETS("%s/src"), pwent->pw_dir);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
} else {
! (void) sprintf(path, NOCATGETS("%s/source"), pwent->pw_dir);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
}
}
}
if (!done) {
if (getcwd(cwdpath, MAXPATHLEN - 1 )) {
! (void) sprintf(path, NOCATGETS("%s/%s"), cwdpath,sccs_dir_path);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
} else {
! fatal(catgets(catd, 1, 189, "Bogus PROJECTDIR '%s'"), sccs_dir_path);
}
}
}
}
}
--- 1547,1592 ----
char cwdpath[MAXPATHLEN];
uid_t uid;
int done=0;
/* Check if we should use PROJECTDIR when reading the SCCS dir. */
! sccs_dir_path = getenv("PROJECTDIR");
if ((sccs_dir_path != NULL) &&
(sccs_dir_path[0] != (int) slash_char)) {
struct passwd *pwent;
{
uid = getuid();
pwent = getpwuid(uid);
if (pwent == NULL) {
! fatal(gettext("Bogus USERID "));
}
if ((pwent = getpwnam(sccs_dir_path)) == NULL) {
/*empty block : it'll go & check cwd */
}
else {
! (void) sprintf(path, "%s/src", pwent->pw_dir);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
} else {
! (void) sprintf(path, "%s/source", pwent->pw_dir);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
}
}
}
if (!done) {
if (getcwd(cwdpath, MAXPATHLEN - 1 )) {
! (void) sprintf(path, "%s/%s", cwdpath,sccs_dir_path);
if (access(path, F_OK) == 0) {
sccs_dir_path = path;
done = 1;
} else {
! fatal(gettext("Bogus PROJECTDIR '%s'"), sccs_dir_path);
}
}
}
}
}
*** 1808,1826 ****
* Remember current mode. It may be changed after reading makefile
* and we will have to correct MAKEFLAGS variable.
*/
is_xpg4 = posix;
! MBSTOWCS(wcs_buffer, NOCATGETS("KEEP_STATE"));
keep_state_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, NOCATGETS("Makefile"));
Makefile = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, NOCATGETS("makefile"));
makefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, NOCATGETS("s.makefile"));
sdotmakefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, NOCATGETS("s.Makefile"));
sdotMakefile = GETNAME(wcs_buffer, FIND_LENGTH);
/*
* initialize global dependency entry for .NOT_AUTO
*/
--- 1784,1802 ----
* Remember current mode. It may be changed after reading makefile
* and we will have to correct MAKEFLAGS variable.
*/
is_xpg4 = posix;
! MBSTOWCS(wcs_buffer, "KEEP_STATE");
keep_state_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, "Makefile");
Makefile = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, "makefile");
makefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, "s.makefile");
sdotmakefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
! MBSTOWCS(wcs_buffer, "s.Makefile");
sdotMakefile = GETNAME(wcs_buffer, FIND_LENGTH);
/*
* initialize global dependency entry for .NOT_AUTO
*/
*** 1834,1847 ****
if (read_trace_level > 1) {
trace_reader = true;
}
if (!ignore_default_mk) {
if (svr4) {
! MBSTOWCS(wcs_buffer, NOCATGETS("svr4.make.rules"));
default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
} else {
! MBSTOWCS(wcs_buffer, NOCATGETS("make.rules"));
default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
}
default_makefile->stat.is_file = true;
(void) read_makefile(default_makefile,
--- 1810,1823 ----
if (read_trace_level > 1) {
trace_reader = true;
}
if (!ignore_default_mk) {
if (svr4) {
! MBSTOWCS(wcs_buffer, "svr4.make.rules");
default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
} else {
! MBSTOWCS(wcs_buffer, "make.rules");
default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
}
default_makefile->stat.is_file = true;
(void) read_makefile(default_makefile,
*** 1854,1869 ****
* If the user did not redefine the MAKE macro in the
* default makefile (make.rules), then we'd like to
* change the macro value of MAKE to be some form
* of argv[0] for recursive MAKE builds.
*/
! MBSTOWCS(wcs_buffer, NOCATGETS("MAKE"));
def_make_name = GETNAME(wcs_buffer, wslen(wcs_buffer));
def_make_macro = get_prop(def_make_name->prop, macro_prop);
if ((def_make_macro != NULL) &&
(IS_EQUAL(def_make_macro->body.macro.value->string_mb,
! NOCATGETS("make")))) {
MBSTOWCS(wcs_buffer, argv_zero_string);
new_make_value = GETNAME(wcs_buffer, wslen(wcs_buffer));
(void) SETVAR(def_make_name,
new_make_value,
false);
--- 1830,1845 ----
* If the user did not redefine the MAKE macro in the
* default makefile (make.rules), then we'd like to
* change the macro value of MAKE to be some form
* of argv[0] for recursive MAKE builds.
*/
! MBSTOWCS(wcs_buffer, "MAKE");
def_make_name = GETNAME(wcs_buffer, wslen(wcs_buffer));
def_make_macro = get_prop(def_make_name->prop, macro_prop);
if ((def_make_macro != NULL) &&
(IS_EQUAL(def_make_macro->body.macro.value->string_mb,
! "make"))) {
MBSTOWCS(wcs_buffer, argv_zero_string);
new_make_value = GETNAME(wcs_buffer, wslen(wcs_buffer));
(void) SETVAR(def_make_name,
new_make_value,
false);
*** 1991,2050 ****
append_char('w', &makeflags_string);
append_char('w', &makeflags_string_posix);
}
/* -c dmake_rcfile */
if (dmake_rcfile_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
dmake_rcfile = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_rcfile, &makeflags_string);
append_makeflags_string(dmake_rcfile, &makeflags_string_posix);
}
/* -g dmake_group */
if (dmake_group_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_GROUP"));
dmake_group = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_group, &makeflags_string);
append_makeflags_string(dmake_group, &makeflags_string_posix);
}
/* -j dmake_max_jobs */
if (dmake_max_jobs_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS"));
dmake_max_jobs = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_max_jobs, &makeflags_string);
append_makeflags_string(dmake_max_jobs, &makeflags_string_posix);
}
/* -m dmake_mode */
if (dmake_mode_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
dmake_mode = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_mode, &makeflags_string);
append_makeflags_string(dmake_mode, &makeflags_string_posix);
}
/* -x dmake_compat_mode */
// if (dmake_compat_mode_specified) {
! // MBSTOWCS(wcs_buffer, NOCATGETS("SUN_MAKE_COMPAT_MODE"));
// dmake_compat_mode = GETNAME(wcs_buffer, FIND_LENGTH);
// append_makeflags_string(dmake_compat_mode, &makeflags_string);
// append_makeflags_string(dmake_compat_mode, &makeflags_string_posix);
// }
/* -x dmake_output_mode */
if (dmake_output_mode_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
dmake_output_mode = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_output_mode, &makeflags_string);
append_makeflags_string(dmake_output_mode, &makeflags_string_posix);
}
/* -o dmake_odir */
if (dmake_odir_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_ODIR"));
dmake_odir = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_odir, &makeflags_string);
append_makeflags_string(dmake_odir, &makeflags_string_posix);
}
/* -M pmake_machinesfile */
if (pmake_machinesfile_specified) {
! MBSTOWCS(wcs_buffer, NOCATGETS("PMAKE_MACHINESFILE"));
pmake_machinesfile = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(pmake_machinesfile, &makeflags_string);
append_makeflags_string(pmake_machinesfile, &makeflags_string_posix);
}
/* -R */
--- 1967,2026 ----
append_char('w', &makeflags_string);
append_char('w', &makeflags_string_posix);
}
/* -c dmake_rcfile */
if (dmake_rcfile_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_RCFILE");
dmake_rcfile = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_rcfile, &makeflags_string);
append_makeflags_string(dmake_rcfile, &makeflags_string_posix);
}
/* -g dmake_group */
if (dmake_group_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_GROUP");
dmake_group = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_group, &makeflags_string);
append_makeflags_string(dmake_group, &makeflags_string_posix);
}
/* -j dmake_max_jobs */
if (dmake_max_jobs_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_MAX_JOBS");
dmake_max_jobs = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_max_jobs, &makeflags_string);
append_makeflags_string(dmake_max_jobs, &makeflags_string_posix);
}
/* -m dmake_mode */
if (dmake_mode_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_MODE");
dmake_mode = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_mode, &makeflags_string);
append_makeflags_string(dmake_mode, &makeflags_string_posix);
}
/* -x dmake_compat_mode */
// if (dmake_compat_mode_specified) {
! // MBSTOWCS(wcs_buffer, "SUN_MAKE_COMPAT_MODE");
// dmake_compat_mode = GETNAME(wcs_buffer, FIND_LENGTH);
// append_makeflags_string(dmake_compat_mode, &makeflags_string);
// append_makeflags_string(dmake_compat_mode, &makeflags_string_posix);
// }
/* -x dmake_output_mode */
if (dmake_output_mode_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
dmake_output_mode = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_output_mode, &makeflags_string);
append_makeflags_string(dmake_output_mode, &makeflags_string_posix);
}
/* -o dmake_odir */
if (dmake_odir_specified) {
! MBSTOWCS(wcs_buffer, "DMAKE_ODIR");
dmake_odir = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(dmake_odir, &makeflags_string);
append_makeflags_string(dmake_odir, &makeflags_string_posix);
}
/* -M pmake_machinesfile */
if (pmake_machinesfile_specified) {
! MBSTOWCS(wcs_buffer, "PMAKE_MACHINESFILE");
pmake_machinesfile = GETNAME(wcs_buffer, FIND_LENGTH);
append_makeflags_string(pmake_machinesfile, &makeflags_string);
append_makeflags_string(pmake_machinesfile, &makeflags_string_posix);
}
/* -R */
*** 2063,2079 ****
maybe_append_prop(makeflags, macro_prop)->
body.macro.exported = true;
if (makeflags_string.buffer.start[1] != (int) nul_char) {
if (makeflags_string.buffer.start[1] != (int) space_char) {
! MBSTOWCS(wcs_buffer, NOCATGETS("MFLAGS"));
(void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
GETNAME(makeflags_string.buffer.start,
FIND_LENGTH),
false);
} else {
! MBSTOWCS(wcs_buffer, NOCATGETS("MFLAGS"));
(void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
GETNAME(makeflags_string.buffer.start + 2,
FIND_LENGTH),
false);
}
--- 2039,2055 ----
maybe_append_prop(makeflags, macro_prop)->
body.macro.exported = true;
if (makeflags_string.buffer.start[1] != (int) nul_char) {
if (makeflags_string.buffer.start[1] != (int) space_char) {
! MBSTOWCS(wcs_buffer, "MFLAGS");
(void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
GETNAME(makeflags_string.buffer.start,
FIND_LENGTH),
false);
} else {
! MBSTOWCS(wcs_buffer, "MFLAGS");
(void) SETVAR(GETNAME(wcs_buffer, FIND_LENGTH),
GETNAME(makeflags_string.buffer.start + 2,
FIND_LENGTH),
false);
}
*** 2141,2151 ****
(argv[i][0] == (int) hyphen_char) &&
(argv[i][1] == 'f') &&
(argv[i][2] == (int) nul_char)) {
argv[i] = NULL; /* Remove -f */
if (i >= argc - 1) {
! fatal(catgets(catd, 1, 190, "No filename argument after -f flag"));
}
MBSTOWCS(wcs_buffer, argv[++i]);
primary_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
(void) read_makefile(primary_makefile, true, true, true);
argv[i] = NULL; /* Remove filename */
--- 2117,2127 ----
(argv[i][0] == (int) hyphen_char) &&
(argv[i][1] == 'f') &&
(argv[i][2] == (int) nul_char)) {
argv[i] = NULL; /* Remove -f */
if (i >= argc - 1) {
! fatal(gettext("No filename argument after -f flag"));
}
MBSTOWCS(wcs_buffer, argv[++i]);
primary_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
(void) read_makefile(primary_makefile, true, true, true);
argv[i] = NULL; /* Remove filename */
*** 2176,2186 ****
(Property) NULL,
(wchar_t *) NULL);
if (!posix) {
if (makefile_name->stat.is_file) {
if (Makefile->stat.is_file) {
! warning(catgets(catd, 1, 310, "Both `makefile' and `Makefile' exist"));
}
primary_makefile = makefile_name;
makefile_read = read_makefile(makefile_name,
false,
false,
--- 2152,2162 ----
(Property) NULL,
(wchar_t *) NULL);
if (!posix) {
if (makefile_name->stat.is_file) {
if (Makefile->stat.is_file) {
! warning(gettext("Both `makefile' and `Makefile' exist"));
}
primary_makefile = makefile_name;
makefile_read = read_makefile(makefile_name,
false,
false,
*** 2199,2209 ****
enum sccs_stat save_m_has_sccs = NO_SCCS;
enum sccs_stat save_M_has_sccs = NO_SCCS;
if (makefile_name->stat.is_file) {
if (Makefile->stat.is_file) {
! warning(catgets(catd, 1, 191, "Both `makefile' and `Makefile' exist"));
}
}
if (makefile_name->stat.is_file) {
if (makefile_name->stat.has_sccs == NO_SCCS) {
primary_makefile = makefile_name;
--- 2175,2185 ----
enum sccs_stat save_m_has_sccs = NO_SCCS;
enum sccs_stat save_M_has_sccs = NO_SCCS;
if (makefile_name->stat.is_file) {
if (Makefile->stat.is_file) {
! warning(gettext("Both `makefile' and `Makefile' exist"));
}
}
if (makefile_name->stat.is_file) {
if (makefile_name->stat.has_sccs == NO_SCCS) {
primary_makefile = makefile_name;
*** 2309,2325 ****
* If the user did not redefine the ARFLAGS macro in the
* default makefile (make.rules), then we'd like to
* change the macro value of ARFLAGS to be in accordance
* with "POSIX" requirements.
*/
! MBSTOWCS(wcs_buffer, NOCATGETS("ARFLAGS"));
name = GETNAME(wcs_buffer, wslen(wcs_buffer));
macro = get_prop(name->prop, macro_prop);
if ((macro != NULL) && /* Maybe (macro == NULL) || ? */
(IS_EQUAL(macro->body.macro.value->string_mb,
! NOCATGETS("rv")))) {
! MBSTOWCS(wcs_buffer, NOCATGETS("-rv"));
value = GETNAME(wcs_buffer, wslen(wcs_buffer));
(void) SETVAR(name,
value,
false);
}
--- 2285,2301 ----
* If the user did not redefine the ARFLAGS macro in the
* default makefile (make.rules), then we'd like to
* change the macro value of ARFLAGS to be in accordance
* with "POSIX" requirements.
*/
! MBSTOWCS(wcs_buffer, "ARFLAGS");
name = GETNAME(wcs_buffer, wslen(wcs_buffer));
macro = get_prop(name->prop, macro_prop);
if ((macro != NULL) && /* Maybe (macro == NULL) || ? */
(IS_EQUAL(macro->body.macro.value->string_mb,
! "rv"))) {
! MBSTOWCS(wcs_buffer, "-rv");
value = GETNAME(wcs_buffer, wslen(wcs_buffer));
(void) SETVAR(name,
value,
false);
}
*** 2375,2386 ****
if((make_state->hash.length == 1)&&
(make_state->string_mb[0] == '/')) {
make_state->hash.length = 0;
make_state->string_mb[0] = '\0';
}
! sprintf(state_file_str_mb,NOCATGETS("%s%s"),
! make_state->string_mb,NOCATGETS("/.make.state"));
make_state = &state_filename;
/* adjust the length to reflect the appended string */
make_state->hash.length += 12;
}
} else { /* the file doesn't exist or no permission */
--- 2351,2362 ----
if((make_state->hash.length == 1)&&
(make_state->string_mb[0] == '/')) {
make_state->hash.length = 0;
make_state->string_mb[0] = '\0';
}
! sprintf(state_file_str_mb,"%s%s",
! make_state->string_mb,"/.make.state");
make_state = &state_filename;
/* adjust the length to reflect the appended string */
make_state->hash.length += 12;
}
} else { /* the file doesn't exist or no permission */
*** 2391,2404 ****
strncpy(tmp_path, make_state->string_mb,
(slashp - make_state->string_mb));
tmp_path[slashp - make_state->string_mb]=0;
if(strlen(tmp_path)) {
if(stat(tmp_path, &make_state_stat)) {
! warning(catgets(catd, 1, 192, "directory %s for .KEEP_STATE_FILE does not exist"),tmp_path);
}
if (access(tmp_path, F_OK) != 0) {
! warning(catgets(catd, 1, 193, "can't access dir %s"),tmp_path);
}
}
}
}
if (report_dependencies_level != 1) {
--- 2367,2380 ----
strncpy(tmp_path, make_state->string_mb,
(slashp - make_state->string_mb));
tmp_path[slashp - make_state->string_mb]=0;
if(strlen(tmp_path)) {
if(stat(tmp_path, &make_state_stat)) {
! warning(gettext("directory %s for .KEEP_STATE_FILE does not exist"),tmp_path);
}
if (access(tmp_path, F_OK) != 0) {
! warning(gettext("can't access dir %s"),tmp_path);
}
}
}
}
if (report_dependencies_level != 1) {
*** 2458,2537 ****
case 1: /* -f seen */
++i;
continue;
case 2: /* -c seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 194, "No dmake rcfile argument after -c flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_RCFILE"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 4: /* -g seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 195, "No dmake group argument after -g flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_GROUP"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 8: /* -j seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 196, "No dmake max jobs argument after -j flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MAX_JOBS"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 16: /* -M seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 323, "No pmake machinesfile argument after -M flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("PMAKE_MACHINESFILE"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 32: /* -m seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 197, "No dmake mode argument after -m flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_MODE"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 256: /* -K seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 288, "No makestate filename argument after -K flag"));
}
MBSTOWCS(wcs_buffer, argv[i+1]);
make_state = GETNAME(wcs_buffer, FIND_LENGTH);
keep_state = true;
argv[i] = NULL;
argv[i+1] = NULL;
continue;
case 512: /* -o seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 312, "No dmake output dir argument after -o flag"));
}
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_ODIR"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 1024: /* -x seen */
if (argv[i+1] == NULL) {
! fatal(catgets(catd, 1, 351, "No argument after -x flag"));
}
! length = strlen( NOCATGETS("SUN_MAKE_COMPAT_MODE="));
! if (strncmp(argv[i+1], NOCATGETS("SUN_MAKE_COMPAT_MODE="), length) == 0) {
argv[i+1] = &argv[i+1][length];
! MBSTOWCS(wcs_buffer, NOCATGETS("SUN_MAKE_COMPAT_MODE"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
dmake_compat_mode_specified = dmake_add_mode_specified;
break;
}
! length = strlen( NOCATGETS("DMAKE_OUTPUT_MODE="));
! if (strncmp(argv[i+1], NOCATGETS("DMAKE_OUTPUT_MODE="), length) == 0) {
argv[i+1] = &argv[i+1][length];
! MBSTOWCS(wcs_buffer, NOCATGETS("DMAKE_OUTPUT_MODE"));
name = GETNAME(wcs_buffer, FIND_LENGTH);
dmake_output_mode_specified = dmake_add_mode_specified;
} else {
! warning(catgets(catd, 1, 354, "Unknown argument `%s' after -x flag (ignored)"),
argv[i+1]);
argv[i] = argv[i + 1] = NULL;
continue;
}
break;
--- 2434,2513 ----
case 1: /* -f seen */
++i;
continue;
case 2: /* -c seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No dmake rcfile argument after -c flag"));
}
! MBSTOWCS(wcs_buffer, "DMAKE_RCFILE");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 4: /* -g seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No dmake group argument after -g flag"));
}
! MBSTOWCS(wcs_buffer, "DMAKE_GROUP");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 8: /* -j seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No dmake max jobs argument after -j flag"));
}
! MBSTOWCS(wcs_buffer, "DMAKE_MAX_JOBS");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 16: /* -M seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No pmake machinesfile argument after -M flag"));
}
! MBSTOWCS(wcs_buffer, "PMAKE_MACHINESFILE");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 32: /* -m seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No dmake mode argument after -m flag"));
}
! MBSTOWCS(wcs_buffer, "DMAKE_MODE");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 256: /* -K seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No makestate filename argument after -K flag"));
}
MBSTOWCS(wcs_buffer, argv[i+1]);
make_state = GETNAME(wcs_buffer, FIND_LENGTH);
keep_state = true;
argv[i] = NULL;
argv[i+1] = NULL;
continue;
case 512: /* -o seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No dmake output dir argument after -o flag"));
}
! MBSTOWCS(wcs_buffer, "DMAKE_ODIR");
name = GETNAME(wcs_buffer, FIND_LENGTH);
break;
case 1024: /* -x seen */
if (argv[i+1] == NULL) {
! fatal(gettext("No argument after -x flag"));
}
! length = strlen( "SUN_MAKE_COMPAT_MODE=");
! if (strncmp(argv[i+1], "SUN_MAKE_COMPAT_MODE=", length) == 0) {
argv[i+1] = &argv[i+1][length];
! MBSTOWCS(wcs_buffer, "SUN_MAKE_COMPAT_MODE");
name = GETNAME(wcs_buffer, FIND_LENGTH);
dmake_compat_mode_specified = dmake_add_mode_specified;
break;
}
! length = strlen( "DMAKE_OUTPUT_MODE=");
! if (strncmp(argv[i+1], "DMAKE_OUTPUT_MODE=", length) == 0) {
argv[i+1] = &argv[i+1][length];
! MBSTOWCS(wcs_buffer, "DMAKE_OUTPUT_MODE");
name = GETNAME(wcs_buffer, FIND_LENGTH);
dmake_output_mode_specified = dmake_add_mode_specified;
} else {
! warning(gettext("Unknown argument `%s' after -x flag (ignored)"),
argv[i+1]);
argv[i] = argv[i + 1] = NULL;
continue;
}
break;
*** 2613,2640 ****
static void
append_makeflags_string(Name name, register String makeflags_string)
{
const char *option;
! if (strcmp(name->string_mb, NOCATGETS("DMAKE_GROUP")) == 0) {
! option = NOCATGETS(" -g ");
! } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_MAX_JOBS")) == 0) {
! option = NOCATGETS(" -j ");
! } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_MODE")) == 0) {
! option = NOCATGETS(" -m ");
! } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_ODIR")) == 0) {
! option = NOCATGETS(" -o ");
! } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_RCFILE")) == 0) {
! option = NOCATGETS(" -c ");
! } else if (strcmp(name->string_mb, NOCATGETS("PMAKE_MACHINESFILE")) == 0) {
! option = NOCATGETS(" -M ");
! } else if (strcmp(name->string_mb, NOCATGETS("DMAKE_OUTPUT_MODE")) == 0) {
! option = NOCATGETS(" -x DMAKE_OUTPUT_MODE=");
! } else if (strcmp(name->string_mb, NOCATGETS("SUN_MAKE_COMPAT_MODE")) == 0) {
! option = NOCATGETS(" -x SUN_MAKE_COMPAT_MODE=");
} else {
! fatal(catgets(catd, 1, 289, "Internal error: name not recognized in append_makeflags_string()"));
}
Property prop = maybe_append_prop(name, macro_prop);
if( prop == 0 || prop->body.macro.value == 0 ||
prop->body.macro.value->string_mb == 0 ) {
return;
--- 2589,2616 ----
static void
append_makeflags_string(Name name, register String makeflags_string)
{
const char *option;
! if (strcmp(name->string_mb, "DMAKE_GROUP") == 0) {
! option = " -g ";
! } else if (strcmp(name->string_mb, "DMAKE_MAX_JOBS") == 0) {
! option = " -j ";
! } else if (strcmp(name->string_mb, "DMAKE_MODE") == 0) {
! option = " -m ";
! } else if (strcmp(name->string_mb, "DMAKE_ODIR") == 0) {
! option = " -o ";
! } else if (strcmp(name->string_mb, "DMAKE_RCFILE") == 0) {
! option = " -c ";
! } else if (strcmp(name->string_mb, "PMAKE_MACHINESFILE") == 0) {
! option = " -M ";
! } else if (strcmp(name->string_mb, "DMAKE_OUTPUT_MODE") == 0) {
! option = " -x DMAKE_OUTPUT_MODE=";
! } else if (strcmp(name->string_mb, "SUN_MAKE_COMPAT_MODE") == 0) {
! option = " -x SUN_MAKE_COMPAT_MODE=";
} else {
! fatal(gettext("Internal error: name not recognized in append_makeflags_string()"));
}
Property prop = maybe_append_prop(name, macro_prop);
if( prop == 0 || prop->body.macro.value == 0 ||
prop->body.macro.value->string_mb == 0 ) {
return;
*** 2691,2705 ****
* you can get blank lines in *environment.
*/
if (!value) {
continue;
}
! MBSTOWCS(wcs_buffer2, NOCATGETS("SHELL="));
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
continue;
}
! MBSTOWCS(wcs_buffer2, NOCATGETS("MAKEFLAGS="));
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
report_pwd = true;
/*
* In POSIX mode we do not want MAKEFLAGS to be readonly.
* If the MAKEFLAGS macro is subsequently set by the makefile,
--- 2667,2681 ----
* you can get blank lines in *environment.
*/
if (!value) {
continue;
}
! MBSTOWCS(wcs_buffer2, "SHELL=");
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
continue;
}
! MBSTOWCS(wcs_buffer2, "MAKEFLAGS=");
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
report_pwd = true;
/*
* In POSIX mode we do not want MAKEFLAGS to be readonly.
* If the MAKEFLAGS macro is subsequently set by the makefile,
*** 2718,2728 ****
* .make.dependency.xxx. When make is invoked by another make
* (recursive make), we don't want to read this because then
* the child make will end up writing to the parent
* directory's .make.state and clobbering them.
*/
! MBSTOWCS(wcs_buffer2, NOCATGETS("SUNPRO_DEPENDENCIES"));
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
continue;
}
macro = GETNAME(name, value - name);
--- 2694,2704 ----
* .make.dependency.xxx. When make is invoked by another make
* (recursive make), we don't want to read this because then
* the child make will end up writing to the parent
* directory's .make.state and clobbering them.
*/
! MBSTOWCS(wcs_buffer2, "SUNPRO_DEPENDENCIES");
if (IS_WEQUALN(name, wcs_buffer2, wslen(wcs_buffer2))) {
continue;
}
macro = GETNAME(name, value - name);
*** 2866,2888 ****
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(catgets(catd, 1, 293, "`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(catgets(catd, 1, 294, "`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
default_target_to_build->stat.time = file_no_time;
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(catgets(catd, 1, 295, "`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
--- 2842,2864 ----
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(gettext("`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(gettext("`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
default_target_to_build->stat.time = file_no_time;
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(gettext("`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
*** 2920,2930 ****
false);
}
gather_recursive_deps();
if (build_failed_seen) {
build_failed_ever_seen = true;
! warning(catgets(catd, 1, 200, "Target `%s' not remade because of errors"),
default_target_to_build->string_mb);
}
build_failed_seen = false;
if (report_dependencies_level > 0) {
print_dependencies(default_target_to_build,
--- 2896,2906 ----
false);
}
gather_recursive_deps();
if (build_failed_seen) {
build_failed_ever_seen = true;
! warning(gettext("Target `%s' not remade because of errors"),
default_target_to_build->string_mb);
}
build_failed_seen = false;
if (report_dependencies_level > 0) {
print_dependencies(default_target_to_build,
*** 2943,2964 ****
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(catgets(catd, 1, 296, "`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(catgets(catd, 1, 297, "`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(catgets(catd, 1, 298, "`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
--- 2919,2940 ----
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(gettext("`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(gettext("`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(gettext("`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
*** 2968,2995 ****
* If no file arguments have been encountered,
* make the first name encountered that doesnt start with a dot
*/
if (!target_to_make_found) {
if (default_target_to_build == NULL) {
! fatal(catgets(catd, 1, 202, "No arguments to build"));
}
commands_done = false;
top_level_target = get_wstring(default_target_to_build->string_mb);
report_recursion(default_target_to_build);
! if (getenv(NOCATGETS("SPRO_EXPAND_ERRORS"))){
! (void) printf(NOCATGETS("::(%s)\n"),
default_target_to_build->string_mb);
}
result = doname_parallel(default_target_to_build, true, false);
gather_recursive_deps();
if (build_failed_seen) {
build_failed_ever_seen = true;
! warning(catgets(catd, 1, 203, "Target `%s' not remade because of errors"),
default_target_to_build->string_mb);
}
build_failed_seen = false;
if (report_dependencies_level > 0) {
print_dependencies(default_target_to_build,
--- 2944,2971 ----
* If no file arguments have been encountered,
* make the first name encountered that doesnt start with a dot
*/
if (!target_to_make_found) {
if (default_target_to_build == NULL) {
! fatal(gettext("No arguments to build"));
}
commands_done = false;
top_level_target = get_wstring(default_target_to_build->string_mb);
report_recursion(default_target_to_build);
! if (getenv("SPRO_EXPAND_ERRORS")){
! (void) printf("::(%s)\n",
default_target_to_build->string_mb);
}
result = doname_parallel(default_target_to_build, true, false);
gather_recursive_deps();
if (build_failed_seen) {
build_failed_ever_seen = true;
! warning(gettext("Target `%s' not remade because of errors"),
default_target_to_build->string_mb);
}
build_failed_seen = false;
if (report_dependencies_level > 0) {
print_dependencies(default_target_to_build,
*** 3006,3027 ****
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(catgets(catd, 1, 299, "`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(catgets(catd, 1, 300, "`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(catgets(catd, 1, 301, "`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
--- 2982,3003 ----
!quest &&
(report_dependencies_level == 0) /* &&
(exists(default_target_to_build) > file_doesnt_exist) */) {
if (posix) {
if (!commands_done) {
! (void) printf(gettext("`%s' is updated.\n"),
default_target_to_build->string_mb);
} else {
if (no_action_was_taken) {
! (void) printf(gettext("`%s': no action was taken.\n"),
default_target_to_build->string_mb);
}
}
} else {
if (!commands_done &&
(exists(default_target_to_build) > file_doesnt_exist)) {
! (void) printf(gettext("`%s' is up to date.\n"),
default_target_to_build->string_mb);
}
}
}
}
*** 3194,3238 ****
char rcwd[MAXPATHLEN];
static char * mlev = NULL;
char * make_level_str = NULL;
int make_level_val = 0;
! make_level_str = getenv(NOCATGETS("MAKELEVEL"));
if(make_level_str) {
make_level_val = atoi(make_level_str);
}
if(mlev == NULL) {
mlev = (char*) malloc(MAXPATHLEN);
}
if(entering) {
! sprintf(mlev, NOCATGETS("MAKELEVEL=%d"), make_level_val + 1);
} else {
make_level_val--;
! sprintf(mlev, NOCATGETS("MAKELEVEL=%d"), make_level_val);
}
putenv(mlev);
if(report_cwd) {
if(make_level_val <= 0) {
if(entering) {
sprintf( rcwd
! , catgets(catd, 1, 329, "dmake: Entering directory `%s'\n")
, get_current_path());
} else {
sprintf( rcwd
! , catgets(catd, 1, 331, "dmake: Leaving directory `%s'\n")
, get_current_path());
}
} else {
if(entering) {
sprintf( rcwd
! , catgets(catd, 1, 333, "dmake[%d]: Entering directory `%s'\n")
, make_level_val, get_current_path());
} else {
sprintf( rcwd
! , catgets(catd, 1, 335, "dmake[%d]: Leaving directory `%s'\n")
, make_level_val, get_current_path());
}
}
! printf(NOCATGETS("%s"), rcwd);
}
}
--- 3170,3214 ----
char rcwd[MAXPATHLEN];
static char * mlev = NULL;
char * make_level_str = NULL;
int make_level_val = 0;
! make_level_str = getenv("MAKELEVEL");
if(make_level_str) {
make_level_val = atoi(make_level_str);
}
if(mlev == NULL) {
mlev = (char*) malloc(MAXPATHLEN);
}
if(entering) {
! sprintf(mlev, "MAKELEVEL=%d", make_level_val + 1);
} else {
make_level_val--;
! sprintf(mlev, "MAKELEVEL=%d", make_level_val);
}
putenv(mlev);
if(report_cwd) {
if(make_level_val <= 0) {
if(entering) {
sprintf( rcwd
! , gettext("dmake: Entering directory `%s'\n")
, get_current_path());
} else {
sprintf( rcwd
! , gettext("dmake: Leaving directory `%s'\n")
, get_current_path());
}
} else {
if(entering) {
sprintf( rcwd
! , gettext("dmake[%d]: Entering directory `%s'\n")
, make_level_val, get_current_path());
} else {
sprintf( rcwd
! , gettext("dmake[%d]: Leaving directory `%s'\n")
, make_level_val, get_current_path());
}
}
! printf("%s", rcwd);
}
}