4,997 ChangeLog.1

This file was deleted.

6,653 ChangeLog.2

This file was deleted.

5,633 ChangeLog.3

This file was deleted.

This file was deleted.

@@ -21,14 +21,7 @@ ACLOCAL_AMFLAGS = -I config

MAKE_HOST = @MAKE_HOST@

# Only process if target is MS-Windows
if WINDOWSENV
MAYBE_W32 = w32
W32INC = -I $(top_srcdir)/w32/include
W32LIB = -Lw32 -lw32
endif

SUBDIRS = glob config po doc $(MAYBE_W32)
SUBDIRS =

bin_PROGRAMS = make
include_HEADERS = gnumake.h
@@ -42,45 +35,25 @@ endif
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
loadapi.c main.c misc.c output.c read.c remake.c rule.c \
signame.c strcache.c variable.c version.c vpath.c hash.c \
strcache.c variable.c version.c vpath.c hash.c \
$(remote)

EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
EXTRA_make_SOURCES = remote-stub.c remote-cstms.c

noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
debug.h getopt.h gettext.h hash.h output.h

make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
$(GUILE_LIBS)
# Only process if target is MS-Windows
if WINDOWSENV
make_LDADD += $(W32LIB)
endif
debug.h getopt.h hash.h output.h

man_MANS = make.1
make_LDADD = @LIBOBJS@ $(GUILE_LIBS)

DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@

AM_CPPFLAGS = $(GLOBINC)
AM_CFLAGS = $(GUILE_CFLAGS)
# Only process if target is MS-Windows
if WINDOWSENV
AM_CPPFLAGS += $(W32INC)
endif


# Extra stuff to include in the distribution.

EXTRA_DIST = README build.sh.in $(man_MANS) \
README.customs README.OS2 \
SCOPTIONS SMakefile \
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
make_msvc_net2003.sln make_msvc_net2003.vcproj \
README.VMS makefile.vms makefile.com config.h-vms \
vmsdir.h vmsfunctions.c vmsify.c vms_exit.c vms_progname.c \
vms_export_symbol.c vms_export_symbol_test.com \
EXTRA_DIST = README build.sh.in \
gmk-default.scm gmk-default.h

# This is built during configure, but behind configure's back
@@ -195,12 +168,4 @@ check-regression: tests/config-flags.pm
fi


# --------------- Maintainer's Section

# Tell automake that I haven't forgotten about this file and it will be
# created before we build a distribution (see maintMakefile in the Git
# distribution).

README:

@MAINT_MAKEFILE@

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

503 alloca.c

This file was deleted.

117 amiga.c

This file was deleted.

18 amiga.h

This file was deleted.

45 ar.c
@@ -116,14 +116,6 @@ ar_member_date (const char *name)

/* Set the archive-member NAME's modtime to now. */

#ifdef VMS
int
ar_touch (const char *name)
{
O (error, NILF, _("touch archive member is not available on VMS"));
return -1;
}
#else
int
ar_touch (const char *name)
{
@@ -168,7 +160,6 @@ ar_touch (const char *name)

return val;
}
#endif /* !VMS */

/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */

@@ -183,9 +174,6 @@ struct ar_glob_state
{
const char *arname;
const char *pattern;
#ifdef VMS
char *suffix;
#endif
unsigned int size;
struct nameseq *chain;
unsigned int n;
@@ -206,12 +194,6 @@ ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
{
/* We have a match. Add it to the chain. */
struct nameseq *new = xcalloc (state->size);
#ifdef VMS
if (state->suffix)
new->name = strcache_add(
concat(5, state->arname, "(", mem, state->suffix, ")"));
else
#endif
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
new->next = state->chain;
state->chain = new;
@@ -264,45 +246,18 @@ ar_glob (const char *arname, const char *member_pattern, unsigned int size)
struct nameseq *n;
const char **names;
unsigned int i;
#ifdef VMS
char *vms_member_pattern;
#endif
if (! glob_pattern_p (member_pattern, 1))
return 0;

/* Scan the archive for matches.
ar_glob_match will accumulate them in STATE.chain. */
state.arname = arname;
state.pattern = member_pattern;
#ifdef VMS
{
/* In a copy of the pattern, find the suffix, save it and remove it from
the pattern */
char *lastdot;
vms_member_pattern = xstrdup(member_pattern);
lastdot = strrchr(vms_member_pattern, '.');
state.suffix = lastdot;
if (lastdot)
{
state.suffix = xstrdup(lastdot);
*lastdot = 0;
}
state.pattern = vms_member_pattern;
}
#endif
state.size = size;
state.chain = 0;
state.n = 0;
ar_scan (arname, ar_glob_match, &state);

#ifdef VMS
/* Deallocate any duplicated string */
free(vms_member_pattern);
if (state.suffix)
{
free(state.suffix);
}
#endif

if (state.chain == 0)
return 0;
289 arscan.c
@@ -29,267 +29,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */

#ifndef NO_ARCHIVES

#ifdef VMS
#include <lbrdef.h>
#include <mhddef.h>
#include <credef.h>
#include <descrip.h>
#include <ctype.h>
#include <ssdef.h>
#include <stsdef.h>
#include <rmsdef.h>

/* This symbol should be present in lbrdef.h. */
#ifndef LBR$_HDRTRUNC
#pragma extern_model save
#pragma extern_model globalvalue
extern unsigned int LBR$_HDRTRUNC;
#pragma extern_model restore
#endif

#include <unixlib.h>
#include <lbr$routines.h>

const char *
vmsify (const char *name, int type);

/* Time conversion from VMS to Unix
Conversion from local time (stored in library) to GMT (needed for gmake)
Note: The tm_gmtoff element is a VMS extension to the ANSI standard. */
static time_t
vms_time_to_unix(void *vms_time)
{
struct tm *tmp;
time_t unix_time;

unix_time = decc$fix_time(vms_time);
tmp = localtime(&unix_time);
unix_time -= tmp->tm_gmtoff;

return unix_time;
}


/* VMS library routines need static variables for callback */
static void *VMS_lib_idx;

static const void *VMS_saved_arg;

static long int (*VMS_function) ();

static long int VMS_function_ret;


/* This is a callback procedure for lib$get_index */
static int
VMS_get_member_info(struct dsc$descriptor_s *module, unsigned long *rfa)
{
int status, i;
const int truncated = 0; /* Member name may be truncated */
time_t member_date; /* Member date */
char *filename;
unsigned int buffer_length; /* Actual buffer length */

/* Unused constants - Make does not actually use most of these */
const int file_desc = -1; /* archive file descriptor for reading the data */
const int header_position = 0; /* Header position */
const int data_position = 0; /* Data position in file */
const int data_size = 0; /* Data size */
const int uid = 0; /* member gid */
const int gid = 0; /* member gid */
const int mode = 0; /* member protection mode */
/* End of unused constants */

static struct dsc$descriptor_s bufdesc =
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };

/* Only need the module definition */
struct mhddef *mhd;

/* If a previous callback is non-zero, just return that status */
if (VMS_function_ret)
{
return SS$_NORMAL;
}

/* lbr_set_module returns more than just the module header. So allocate
a buffer which is big enough: the maximum LBR$C_MAXHDRSIZ. That's at
least bigger than the size of struct mhddef.
If the request is too small, a buffer truncated warning is issued so
it can be reissued with a larger buffer.
We do not care if the buffer is truncated, so that is still a success. */
mhd = xmalloc(LBR$C_MAXHDRSIZ);
bufdesc.dsc$a_pointer = (char *) mhd;
bufdesc.dsc$w_length = LBR$C_MAXHDRSIZ;

status = lbr$set_module(&VMS_lib_idx, rfa, &bufdesc, &buffer_length, 0);

if ((status != LBR$_HDRTRUNC) && !$VMS_STATUS_SUCCESS(status))
{
ON(error, NILF,
_("lbr$set_module() failed to extract module info, status = %d"),
status);

lbr$close(&VMS_lib_idx);

return status;
}

#ifdef TEST
/* When testing this code, it is useful to know the length returned */
printf("Input length = %d, actual = %d\n",
bufdesc.dsc$w_length, buffer_length);
#endif

/* Conversion from VMS time to C time.
VMS defectlet - mhddef is sub-optimal, for the time, it has a 32 bit
longword, mhd$l_datim, and a 32 bit fill instead of two longwords, or
equivalent. */
member_date = vms_time_to_unix(&mhd->mhd$l_datim);
free(mhd);

/* Here we have a problem. The module name on VMS does not have
a file type, but the filename pattern in the "VMS_saved_arg"
may have one.
But only the method being called knows how to interpret the
filename pattern.
There are currently two different formats being used.
This means that we need a VMS specific code in those methods
to handle it. */
filename = xmalloc(module->dsc$w_length + 1);

/* TODO: We may need an option to preserve the case of the module
For now force the module name to lower case */
for (i = 0; i < module->dsc$w_length; i++)
filename[i] = _tolower((unsigned char )module->dsc$a_pointer[i]);

filename[i] = '\0';

VMS_function_ret = (*VMS_function)(file_desc, filename, truncated,
header_position, data_position, data_size, member_date, uid, gid, mode,
VMS_saved_arg);

free(filename);
return SS$_NORMAL;
}


/* Takes three arguments ARCHIVE, FUNCTION and ARG.
Open the archive named ARCHIVE, find its members one by one,
and for each one call FUNCTION with the following arguments:
archive file descriptor for reading the data,
member name,
member name might be truncated flag,
member header position in file,
member data position in file,
member data size,
member date,
member uid,
member gid,
member protection mode,
ARG.
NOTE: on VMS systems, only name, date, and arg are meaningful!
The descriptor is poised to read the data of the member
when FUNCTION is called. It does not matter how much
data FUNCTION reads.
If FUNCTION returns nonzero, we immediately return
what FUNCTION returned.
Returns -1 if archive does not exist,
Returns -2 if archive has invalid format.
Returns 0 if have scanned successfully. */

long int
ar_scan (const char *archive, ar_member_func_t function, const void *varg)
{
char *vms_archive;

static struct dsc$descriptor_s libdesc =
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };

const unsigned long func = LBR$C_READ;
const unsigned long type = LBR$C_TYP_UNK;
const unsigned long index = 1;
unsigned long lib_idx;
int status;

VMS_saved_arg = varg;

/* Null archive string can show up in test and cause an access violation */
if (archive == NULL)
{
/* Null filenames do not exist */
return -1;
}

/* archive path name must be in VMS format */
vms_archive = (char *) vmsify(archive, 0);

status = lbr$ini_control(&VMS_lib_idx, &func, &type, 0);

if (!$VMS_STATUS_SUCCESS(status))
{
ON(error, NILF, _("lbr$ini_control() failed with status = %d"), status);
return -2;
}

libdesc.dsc$a_pointer = vms_archive;
libdesc.dsc$w_length = strlen(vms_archive);

status = lbr$open(&VMS_lib_idx, &libdesc, 0, NULL, 0, NULL, 0);

if (!$VMS_STATUS_SUCCESS(status))
{

/* TODO: A library format failure could mean that this is a file
generated by the GNU AR utility and in that case, we need to
take the UNIX codepath. This will also take a change to the
GNV AR wrapper program. */

switch (status)
{
case RMS$_FNF:
/* Archive does not exist */
return -1;
default:
#ifndef TEST
OSN(error, NILF,
_("unable to open library '%s' to lookup member status %d"),
archive, status);
#endif
/* For library format errors, specification says to return -2 */
return -2;
}
}

VMS_function = function;

/* Clear the return status, as we are supposed to stop calling the
callback function if it becomes non-zero, and this is a static
variable. */
VMS_function_ret = 0;

status = lbr$get_index(&VMS_lib_idx, &index, VMS_get_member_info, NULL, 0);

lbr$close(&VMS_lib_idx);

/* Unless a failure occurred in the lbr$ routines, return the
the status from the 'function' routine. */
if ($VMS_STATUS_SUCCESS(status))
{
return VMS_function_ret;
}

/* This must be something wrong with the library and an error
message should already have been printed. */
return -2;
}

#else /* !VMS */

/* SCO Unix's compiler defines both of these. */
#ifdef M_UNIX
@@ -801,7 +540,6 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
close (desc);
return 0;
}
#endif /* !VMS */

/* Return nonzero iff NAME matches MEM.
If TRUNCATED is nonzero, MEM may be truncated to
@@ -816,7 +554,6 @@ ar_name_equal (const char *name, const char *mem, int truncated)
if (p != 0)
name = p + 1;

#ifndef VMS
if (truncated)
{
#ifdef AIAMAG
@@ -833,33 +570,8 @@ ar_name_equal (const char *name, const char *mem, int truncated)
}

return !strcmp (name, mem);
#else
/* VMS members do not have suffixes, but the filenames usually
have.
Do we need to strip VMS disk/directory format paths?
Most VMS compilers etc. by default are case insensitive
but produce uppercase external names, incl. module names.
However the VMS librarian (ar) and the linker by default
are case sensitive: they take what they get, usually
uppercase names. So for the non-default settings of the
compilers etc. there is a need to have a case sensitive
mode. */
{
int len;
len = strlen(mem);
int match;
char *dot;
if ((dot=strrchr(name,'.')))
match = (len == dot - name) && !strncasecmp(name, mem, len);
else
match = !strcasecmp (name, mem);
return match;
}
#endif /* !VMS */
}

#ifndef VMS
/* ARGSUSED */
static long int
ar_member_pos (int desc UNUSED, const char *mem, int truncated,
@@ -936,7 +648,6 @@ ar_member_touch (const char *arname, const char *memname)
errno = i;
return -3;
}
#endif

#ifdef TEST

This file was deleted.

This file was deleted.

@@ -20,24 +20,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "variable.h"
#include "job.h"
#include "commands.h"
#ifdef WINDOWS32
#include <windows.h>
#include "w32err.h"
#endif

#if VMS
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
#else
# define FILE_LIST_SEPARATOR ' '
#endif

int remote_kill (int id, int sig);

#ifndef HAVE_UNISTD_H
int getpid ();
#endif


static unsigned long
dep_hash_1 (const void *key)
{
@@ -487,25 +474,6 @@ int handling_fatal_signal = 0;
RETSIGTYPE
fatal_error_signal (int sig)
{
#ifdef __MSDOS__
extern int dos_status, dos_command_running;

if (dos_command_running)
{
/* That was the child who got the signal, not us. */
dos_status |= (sig << 8);
return;
}
remove_intermediates (1);
exit (EXIT_FAILURE);
#else /* not __MSDOS__ */
#ifdef _AMIGA
remove_intermediates (1);
if (sig == SIGINT)
fputs (_("*** Break.\n"), stderr);

exit (10);
#else /* not Amiga */
#ifdef WINDOWS32
extern HANDLE main_thread;

@@ -600,8 +568,6 @@ fatal_error_signal (int sig)
if (kill (getpid (), sig) < 0)
pfatal_with_name ("kill");
#endif /* not WINDOWS32 */
#endif /* not Amiga */
#endif /* not __MSDOS__ */
}

/* Delete FILE unless it's precious or not actually a file (phony),

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.