Print this page
make: unifdef SUN5_0 (defined)
*** 81,93 ****
#include <stdlib.h>
#include <sys/errno.h> /* ENOENT */
#include <sys/stat.h> /* fstat() */
#include <fcntl.h> /* open() */
- #ifdef SUN5_0
# include <sys/systeminfo.h> /* sysinfo() */
- #endif
#include <sys/types.h> /* stat() */
#include <sys/wait.h> /* wait() */
#include <unistd.h> /* execv(), unlink(), access() */
#include <vroot/report.h> /* report_dependency(), get_report_file() */
--- 81,91 ----
*** 160,174 ****
#endif
/*
* File table of contents
*/
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
extern "C" void cleanup_after_exit(void);
- #else
- extern void cleanup_after_exit(int, ...);
- #endif
#ifdef TEAMWARE_MAKE_CMN
extern "C" {
extern void dmake_exit_callback(void);
extern void dmake_message_callback(char *);
--- 158,168 ----
*** 487,501 ****
/*
* If running with .KEEP_STATE, curdir will be set with
* the connected directory.
*/
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
(void) atexit(cleanup_after_exit);
- #else
- (void) on_exit(cleanup_after_exit, (char *) NULL);
- #endif
load_cached_names();
/*
* Set command line flags
--- 481,491 ----
*** 740,763 ****
}
working_on_targets = true;
if (trace_status) {
dump_make_state();
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
fclose(stdout);
fclose(stderr);
exit_status = 0;
- #endif
exit(0);
}
if (list_all_targets) {
dump_target_list();
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
fclose(stdout);
fclose(stderr);
exit_status = 0;
- #endif
exit(0);
}
trace_reader = false;
/*
--- 730,749 ----
*** 802,821 ****
#ifdef NSE
exit(nse_exit_status());
#else
if (build_failed_ever_seen) {
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
if (posix) {
exit_status = 1;
}
- #endif
exit(1);
}
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
exit_status = 0;
- #endif
exit(0);
#endif
/* NOTREACHED */
}
--- 788,803 ----
*** 844,859 ****
* temp_file_name The temp file is removed, if any
* catd the message catalog file
* usage_tracking Should have been constructed in main()
* should destroyed just before exiting
*/
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
extern "C" void
cleanup_after_exit(void)
- #else
- void cleanup_after_exit(int status, ...)
- #endif
{
Running rp;
#ifdef NSE
char push_cmd[NSE_TFS_PUSH_LEN + 3 +
(MAXPATHLEN * MB_LEN_MAX) + 12];
--- 826,837 ----
*** 905,929 ****
if (get_parent() == TRUE) {
#endif
*/
parallel = false;
- #ifdef SUN5_0
/* If we used the SVR4_MAKE, don't build .DONE or .FAILED */
if (!getenv(USE_SVR4_MAKE)){
- #endif
/* 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 defined(SUN5_0) || defined(HP_UX) || defined(linux)
if ((exit_status != 0) && (failed_name->prop != NULL)) {
- #else
- if ((status != 0) && (failed_name->prop != NULL)) {
- #endif
#ifdef TEAMWARE_MAKE_CMN
/*
* [tolik] switch DMake to serial mode
*/
dmake_mode_type = serial_mode;
--- 883,901 ----
*** 941,953 ****
#endif
(void) doname(done, false, true);
}
}
}
- #ifdef SUN5_0
}
- #endif
/*
* Remove the temp file utilities report dependencies thru if it
* is still around
*/
if (temp_file_name != NULL) {
--- 913,923 ----
*** 1120,1134 ****
finish_children(false);
#endif
/* Make sure the processes running under us terminate first */
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
while (wait((int *) NULL) != -1);
- #else
- while (wait((union wait*) NULL) != -1);
- #endif
/* Delete the current targets unless they are precious */
if ((current_target != NULL) &&
current_target->is_member &&
((member = get_prop(current_target->prop, member_prop)) != NULL)) {
current_target = member->body.member.library;
--- 1090,1100 ----
*** 1225,1237 ****
*/
check_state(NULL);
report_dir_enter_leave(false);
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
exit_status = 2;
- #endif
exit(2);
}
/*
* doalarm(sig, ...)
--- 1191,1201 ----
*** 1962,1974 ****
case 'v': /* Version flag */
if (invert_this) {
} else {
#ifdef TEAMWARE_MAKE_CMN
fprintf(stdout, NOCATGETS("dmake: %s\n"), verstring);
- #ifdef SUN5_0
exit_status = 0;
- #endif
exit(0);
#else
warning(catgets(catd, 1, 324, "Ignoring DistributedMake -v option"));
#endif
}
--- 1926,1936 ----
*** 2216,2237 ****
*/
if (read_trace_level > 1) {
trace_reader = true;
}
if (!ignore_default_mk) {
- #if defined(SUN5_0) || defined(HP_UX) || defined(linux)
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);
}
- #else
- MBSTOWCS(wcs_buffer, NOCATGETS("default.mk"));
- default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
- #endif
default_makefile->stat.is_file = true;
(void) read_makefile(default_makefile,
true,
false,
--- 2178,2194 ----